octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

testing without installing


From: Paul Kienzle
Subject: testing without installing
Date: Mon, 6 Jan 2003 13:02:53 -0500
User-agent: Mutt/1.2.5.1i

Here is a public domain script which I wrote to test a 
new version of octave without installing it.  Is there 
a better way to do this?

Paul Kienzle
address@hidden


#!/bin/sh

if test "$1" = --help ; then cat <<EOF
Run the compiled octave without installing it.  Make sure you are in
the octave root directory before running.

This may not work if octave is configured using --enable-shared --with-rpath, 
and if you have already installed the current version. That's because the 
rpath specified in the binary takes precedence over LD_LIBRARY_PATH.  If 
you encounter this problem, you can:
   (a) use --preload as the first option to preload the libraries (this 
       works on Linux, but maybe not on other OSes),
   (b) reconfigure using --enable-static --disable-shared --enable-dl,
   (c) change OCTAVE_VERSION in src/version.h, reconfigure and recompile, or
   (d) reconfigure using --without-rpath and recompile (but you will need to
       reconfigure using --with-rpath and recompile before installing).

Octave is run without sourcing .octaverc first.  You can do this explicitly
on startup using source("~/.octaverc").
EOF
    exit
fi

if test ! -f src/octave.cc ; then
    echo "Not in the octave root directory"
    exit
fi

BASE=`pwd`
OCTAVE=$BASE/src/octave
ARGS="--norc --path .:$BASE/scripts//:$BASE/src"

if test "$1" = --preload ; then
    shift
    LIBCRUFT=$BASE/libcruft/libcruft.so
    LIBOCTAVE=$BASE/liboctave/liboctave.so
    LIBOCTINTERP=$BASE/src/liboctinterp.so
    PRELOAD=$LIBCRUFT:$LIBOCTAVE:$LIBOCTINTERP
    LD_PRELOAD=$PRELOAD ldd $OCTAVE
    LD_PRELOAD=$PRELOAD $OCTAVE $ARGS $*
else
    LIBPATH=$BASE/libcruft:$BASE/liboctave:$BASE/src
    LD_LIBRARY_PATH=$LIBPATH ldd $OCTAVE
    LD_LIBRARY_PATH=$LIBPATH $OCTAVE $ARGS $*
fi



reply via email to

[Prev in Thread] Current Thread [Next in Thread]