2004-05-22 00:05:20 +00:00
|
|
|
#! /bin/sh
|
|
|
|
|
2014-02-05 11:42:17 +00:00
|
|
|
# run
|
|
|
|
# This file is part of the YATE Project http://YATE.null.ro
|
|
|
|
#
|
|
|
|
# This is a generated file. You should never need to modify it.
|
|
|
|
# Take a look at the source file run.in instead.
|
|
|
|
#
|
|
|
|
# Yet Another Telephony Engine - a fully featured software PBX and IVR
|
|
|
|
# Copyright (C) 2005-2014 Null Team
|
|
|
|
#
|
|
|
|
# This software is distributed under multiple licenses;
|
|
|
|
# see the COPYING file in the main directory for licensing
|
|
|
|
# information for this specific distribution.
|
|
|
|
#
|
|
|
|
# This use of this software may be subject to additional restrictions.
|
|
|
|
# See the LEGAL file in the main directory for details.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
|
|
|
|
|
2005-06-17 17:17:24 +00:00
|
|
|
# Script to run Yate from the build directory, optionally under gdb or valgrind
|
|
|
|
|
2004-05-22 00:05:20 +00:00
|
|
|
yate="./yate"
|
|
|
|
set_conf="-c ./conf.d"
|
|
|
|
set_mods="-m ./modules"
|
2007-11-15 23:06:36 +00:00
|
|
|
set_share="-e ./share"
|
2005-05-05 17:02:18 +00:00
|
|
|
if [ "$1" = "--executable" ]; then
|
|
|
|
shift
|
|
|
|
yate="$1"
|
|
|
|
shift
|
|
|
|
fi
|
2007-05-11 14:38:30 +00:00
|
|
|
if [ "$1" = "--there" ]; then
|
|
|
|
shift
|
|
|
|
cd `dirname "$0"`
|
2014-02-07 11:40:44 +00:00
|
|
|
wd=`pwd`
|
|
|
|
set_conf="-c $wd/conf.d"
|
|
|
|
set_mods="-m $wd/modules"
|
|
|
|
set_share="-e $wd/share"
|
2007-05-11 14:38:30 +00:00
|
|
|
fi
|
2004-05-22 00:05:20 +00:00
|
|
|
if [ "$1" = "--gdb" ]; then
|
|
|
|
shift
|
|
|
|
yate="gdb --args $yate"
|
|
|
|
fi
|
|
|
|
if [ "$1" = "--core" ]; then
|
|
|
|
shift
|
|
|
|
yate="gdb $yate core*"
|
|
|
|
set_conf=""
|
|
|
|
set_mods=""
|
|
|
|
fi
|
2008-09-16 12:34:16 +00:00
|
|
|
if [ "$1" = "--backtrace" ]; then
|
|
|
|
shift
|
|
|
|
yate="gdb -x tools/gdb-bt-all.txt $yate core*"
|
|
|
|
set_conf=""
|
|
|
|
set_mods=""
|
|
|
|
exec </dev/null 2>&1
|
|
|
|
fi
|
2004-05-22 00:05:20 +00:00
|
|
|
if [ "$1" = "--valgrind" ]; then
|
|
|
|
shift
|
|
|
|
yate="valgrind $1 $yate"
|
|
|
|
shift
|
|
|
|
fi
|
2011-11-03 13:19:11 +00:00
|
|
|
if [ "$1" = "--callgrind" ]; then
|
|
|
|
shift
|
|
|
|
export LD_BIND_NOW=yes
|
2011-11-03 14:40:58 +00:00
|
|
|
yate="valgrind --tool=callgrind --dump-instr=yes --simulate-cache=yes --zero-before=*TelEngine*Engine*internalStatisticsStart* $1 $yate -Du"
|
2011-11-03 13:19:11 +00:00
|
|
|
shift
|
|
|
|
fi
|
2004-05-22 00:05:20 +00:00
|
|
|
|
|
|
|
for opt in $@; do
|
|
|
|
case "$opt" in
|
|
|
|
-c)
|
|
|
|
set_conf=
|
|
|
|
;;
|
|
|
|
-m)
|
|
|
|
set_mods=
|
|
|
|
;;
|
2007-11-15 23:06:36 +00:00
|
|
|
-e)
|
|
|
|
set_share=
|
|
|
|
;;
|
2004-05-22 00:05:20 +00:00
|
|
|
esac
|
|
|
|
done
|
2011-11-03 13:19:11 +00:00
|
|
|
|
2013-08-19 13:16:29 +00:00
|
|
|
LD_LIBRARY_PATH=.@H323_RUN@:$LD_LIBRARY_PATH PWLIB_ASSERT_ACTION=C exec $yate $set_conf $set_mods $set_share "$@"
|