Mercurial > hg > octave-nkf
view run-octave.in @ 5849:e89f8bae317b
[project @ 2006-06-09 04:46:25 by jwe]
author | jwe |
---|---|
date | Fri, 09 Jun 2006 04:46:25 +0000 |
parents | 67bf9b4f2ae2 |
children | e049385342f6 |
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" \ exec $driver $builddir/src/octave $args "$@"