add a wrapper to launch the vst-scanner manually
[ardour.git] / gtk2_ardour / arscan
1 #!/bin/sh
2 TOP=`dirname "$0"`/..
3 . $TOP/build/gtk2_ardour/ardev_common_waf.sh
4 export UBUNTU_MENUPROXY=""
5
6 if [ $# -gt 0 ] ; then
7     case $1 in
8         -g|--gdb) DBG=gdb; shift ;;
9     esac
10     case $1 in
11         --valgrind) DBG=valgrind; shift ;;
12     esac
13     case $1 in
14         --callgrind) DBG=callgrind; shift ;;
15     esac
16 fi
17
18 if test -z "$DBG"; then
19         exec $TOP/build/libs/fst/ardour-vst-scanner "$@"
20 fi
21
22 if test "$DBG" = "valgrind"; then
23         export ARDOUR_RUNNING_UNDER_VALGRIND=TRUE
24         exec valgrind \
25                 --error-limit=no --num-callers=50 \
26                 --tool=memcheck \
27                 --track-origins=yes \
28                  --leak-check=full --show-leak-kinds=all \
29                 --suppressions=${TOP}/tools/valgrind.supp \
30                 $TOP/build/libs/fst/ardour-vst-scanner "$@"
31 fi
32
33 if test "$DBG" = "callgrind"; then
34         exec valgrind \
35                 --error-limit=no --num-callers=50 \
36                 --tool=callgrind \
37                 --separate-callers=3 \
38                 --separate-threads=yes \
39                 --collect-systime=yes \
40                 --collect-jumps=yes \
41                 $TOP/build/libs/fst/ardour-vst-scanner "$@"
42 fi
43
44 if test -n "`which gdb`"; then
45         exec gdb --args $TOP/build/libs/fst/ardour-vst-scanner "$@"
46 fi
47 if test -n "`which lldb`"; then
48         exec lldb -- $TOP/build/libs/fst/ardour-vst-scanner "$@"
49 fi