Mercurial > hg > octave-nkf
view run-octave.in @ 6021:60f9ced8ab53 ss-2-9-9
[project @ 2006-10-02 20:02:20 by jwe]
author | jwe |
---|---|
date | Mon, 02 Oct 2006 20:02:21 +0000 |
parents | e049385342f6 |
children | 3dbbbec85190 |
line wrap: on
line source
#! /bin/sh top_srcdir=%abs_top_srcdir% builddir=%builddir% ## FIXME -- this will fail for filenames with embedded spaces... dirs="$top_srcdir/test $top_srcdir/scripts $builddir/scripts $builddir/src" dirs=$(find $dirs -type d -a ! \( \( -name CVS -o -name private \) -a -prune \)) for d in $dirs; do LOADPATH=$LOADPATH:$d done LOADPATH=$(echo $LOADPATH | sed 's|^:||') IMAGEPATH="$top_srcdir/scripts/image" args="--path=$LOADPATH --image-path=$IMAGEPATH" if [ $(pwd) = "$builddir" ]; then sed "s|^set args.*$|set args $args|" .gdbinit > .gdbinit-tmp mv .gdbinit-tmp .gdbinit fi if [ $# -gt 0 ]; then if [ "x$1" = "x-g" ]; then driver="gdb" args="" shift elif [ "x$1" = "x-valgrind" ]; then driver="valgrind --tool=memcheck" shift elif [ "x$1" = "x-strace" ]; then driver="strace -o octave.trace" shift fi fi OCTAVE_SITE_INITFILE=$top_srcdir/scripts/startup/main-rcfile \ LD_LIBRARY_PATH="$builddir/src:$builddir/liboctave:$builddir/libcruft:$LD_LIBRARY_PATH" \ exec $driver $builddir/src/octave $args "$@"