Mercurial > hg > octave-nkf
view run-octave.in @ 6088:32ea759ea27e
[project @ 2006-10-25 19:39:00 by jwe]
author | jwe |
---|---|
date | Wed, 25 Oct 2006 19:39:00 +0000 |
parents | 1839d551521b |
children | a1754033bc6c |
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 [ $# -gt 0 ]; then if [ "x$1" = "x-g" ]; then driver="gdb" if [ $(/bin/pwd) = "$builddir" ]; then sed "s|^set args.*$|set args $args|" .gdbinit > .gdbinit-tmp mv .gdbinit-tmp .gdbinit fi 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 \ %library_path_var%="$builddir/src:$builddir/liboctave:$builddir/libcruft:$%library_path_var%" \ exec $driver $builddir/src/octave $args "$@"