5786
|
1 #! /bin/sh |
5793
|
2 top_srcdir=%abs_top_srcdir% |
5786
|
3 builddir=%builddir% |
5814
|
4 ## FIXME -- this will fail for filenames with embedded spaces... |
|
5 dirs="$top_srcdir/test $top_srcdir/scripts $builddir/scripts $builddir/src" |
|
6 dirs=$(find $dirs -type d -a ! \( \( -name CVS -o -name private \) -a -prune \)) |
|
7 for d in $dirs; do |
|
8 LOADPATH=$LOADPATH:$d |
|
9 done |
|
10 LOADPATH=$(echo $LOADPATH | sed 's|^:||') |
|
11 IMAGEPATH="$top_srcdir/scripts/image" |
|
12 args="--path=$LOADPATH --image-path=$IMAGEPATH" |
|
13 if [ $(pwd) = "$builddir" ]; then |
|
14 sed "s|^set args.*$|set args $args|" .gdbinit > .gdbinit-tmp |
|
15 mv .gdbinit-tmp .gdbinit |
|
16 fi |
5786
|
17 if [ $# -gt 0 ]; then |
|
18 if [ "x$1" = "x-g" ]; then |
|
19 driver="gdb" |
|
20 args="" |
|
21 shift |
|
22 elif [ "x$1" = "x-valgrind" ]; then |
|
23 driver="valgrind --tool=memcheck" |
|
24 shift |
|
25 elif [ "x$1" = "x-strace" ]; then |
|
26 driver="strace -o octave.trace" |
|
27 shift |
|
28 fi |
|
29 fi |
|
30 OCTAVE_SITE_INITFILE=$top_srcdir/scripts/startup/main-rcfile \ |
|
31 LD_LIBRARY_PATH="$builddir/src:$builddir/liboctave:$builddir/libcruft" \ |
|
32 exec $driver $builddir/src/octave $args "$@" |
|
33 |