Mercurial > hg > octave-lojdl
changeset 2623:e7e72101b86c
[project @ 1997-01-26 04:29:33 by jwe]
author | jwe |
---|---|
date | Sun, 26 Jan 1997 04:30:20 +0000 |
parents | bcfaa40e4d7b |
children | 7e24c1f29db4 |
files | doinstall.sh install-octave octave-sh octave.sh |
diffstat | 4 files changed, 26 insertions(+), 219 deletions(-) [+] |
line wrap: on
line diff
deleted file mode 100755 --- a/doinstall.sh +++ /dev/null @@ -1,199 +0,0 @@ -#!/bin/sh -# -# doinstall.sh -- install script for binary distributions. -# -# John W. Eaton -# jwe@che.utexas.edu -# Department of Chemical Engineering -# The University of Texas at Austin - -# ask octave to tell us the version number -version=`./octave -v 2>/dev/null | awk '/version/ { print $NF }'` - -if test -z "$version" -then - echo "doinstall.sh: unable to extract version number from Octave!" - exit 1 -fi - -# ask octave to tell us the target host type -target_host_type=`echo computer | ./octave -q` - -if test -z "$target_host_type" -then - echo "doinstall.sh: unable to extract host type from Octave!" - exit 1 -fi - -# ==================== Where To Install Things ==================== - -# The default location for installation. Everything is placed in -# subdirectories of this directory. The default values for many of -# the variables below are expressed in terms of this one, so you may -# not need to change them. This defaults to /usr/local. -prefix=/usr/local - -prefix="/usr/local" -if test $# -eq 1 -then - prefix=$1 -else - if test $# -gt 1 - then - echo "usage: doinstall.sh [prefix-directory]" - exit 1 - fi -fi - -# Like `prefix', but used for architecture-specific files. -exec_prefix="$prefix" - -# Where to install Octave and other binaries that people will want to -# run directly. -bindir="$exec_prefix/bin" - -# Where to install architecture-independent data files. ${fcnfiledir} -# and ${localfcnfiledir} are subdirectories of this. -datadir="$prefix/lib" - -# Where to install and expect libraries like libcruft.a, liboctave.a, -# and libreadline.a, executable files to be run by Octave rather than -# directly by users, and other architecture-dependent data. -# ${archlibdir} is a subdirectory of this. -libdir="$exec_prefix/lib" - -# Where to install Octave's include files. The default is -# ${prefix}/include/octave -includedir="$prefix/include/octave" - -# Where to install Octave's man pages, and what extension they should -# have. The default is ${prefix}/man/man1 -mandir="$prefix/man/man1" -manext="1" - -# Where to install and expect the info files describing Octave.. -infodir="$prefix/info" - -# ==================== Octave-specific directories ==================== - -# These variables hold the values Octave will actually use. They are -# based on the values of the standard Make variables above. - -# Where to install the function file distributed with -# Octave. This includes the Octave version, so that the -# function files for different versions of Octave will install -# themselves in separate directories. -fcnfiledir="$datadir/octave/$version/m" - -# Directories Octave should search for function files specific -# to this site (i.e. customizations), before consulting -# ${fcnfiledir}. This should be a colon-separated list of -# directories. -localfcnfiledir="$datadir/octave/site/m" -localfcnfilepath="$localfcnfiledir//" - -# Where to put executables to be run by Octave rather than -# the user. This path usually includes the Octave version -# and configuration name, so that multiple configurations -# for multiple versions of Octave may be installed at once. -archlibdir="$libdir/octave/$version/exec/$target_host_type" - -# Where to put object files that will by dynamically loaded. -# This path usually includes the Octave version and configuration -# name, so that multiple configurations for multiple versions of -# Octave may be installed at once. -octfiledir="$libdir/octave/$version/oct/$target_host_type" - -# Directories Octave should search for object files that will be -# dynamically loaded and that are specific to this site -# (i.e. customizations), before consulting ${octfiledir}. This should -# be a colon-separated list of directories. -localoctfiledir="$datadir/octave/site/oct/$target_host_type" -localoctfilepath="$localoctfiledir//" - -# Where Octave will search to find its function files. Before -# changing this, check to see if your purpose wouldn't -# better be served by changing localfcnfilepath. This -# should be a colon-separated list of directories. -fcnfilepath=".:$localoctfilepath:$localfcnfilepath:$octfiledir//:$fcnfiledir//" - -# Where Octave will search to find image files. -imagedir="$datadir/octave/$version/imagelib" -imagepath=".:$imagedir//" - -cat << EOF -Installing octave in subdirectories of $prefix. - - Binaries: $bindir - Function files: $fcnfiledir - Demo images: $imagedir - Info files: $infodir - Man page: $mandir - -EOF - -DIRS_TO_MAKE="$bindir $datadir $libdir $includedir $mandir $infodir \ - $fcnfiledir $archlibdir $octfiledir $imagedir \ - $localfcnfiledir $localoctfiledir" - -./mkinstalldirs $DIRS_TO_MAKE -chmod 755 $DIRS_TO_MAKE - -if test "$prefix" = /usr/local -then - echo "installing ./octave as $bindir/octave" - cp octave $bindir/octave - chmod 755 $bindir/octave -else - echo "installing octave.sh as $bindir/octave" - sed "s|@OCTAVE_HOME@|$prefix|" octave.sh > octave.tmp - cp octave.tmp $bindir/octave - chmod 755 $bindir/octave - - echo "installing ./octave as $bindir/octave.bin" - cp octave $bindir/octave.bin - chmod 755 $bindir/octave.bin -fi - -echo "installing octtopnm as $archlibdir/octtopnm" -cp octtopnm $archlibdir/octtopnm -chmod 755 $archlibdir/octtopnm - -echo "installing octave-bug as $bindir/octave-bug" -cp octave-bug $bindir/octave-bug -chmod 755 $bindir/octave-bug - -echo "installing function files in $fcnfiledir" -( cd scripts - ../mkinstalldirs `find . -type d -print | sed -e 's,^\./,,' -e "s,^,$fcnfiledir/,"` - for f in `find . \( -name '*.m' -o -name octaverc \) -print` - do - cp $f $fcnfiledir/$f - chmod 644 $fcnfiledir/$f - done ) - -echo "installing image files in $imagedir" -( cd scripts - for f in `find . -name '*.img' -print` - do - file=`basename $f` - cp $f $imagedir/$file - chmod 644 $imagedir/$file - done ) - -echo "creating ls-R file in $datadir/octave" -ls -R $datadir/octave > $datadir/octave/ls-R - -echo "installing info files in $infodir" -for f in doc/octave.info* -do - file=`basename $f` - cp $f $infodir/$file - chmod 644 $infodir/$file -done - -echo "installing man page in $mandir" -cp doc/octave.1 $mandir/octave.$manext -chmod 644 $mandir/octave.$manext - -exit 0
--- a/install-octave +++ b/install-octave @@ -1,6 +1,6 @@ #!/bin/sh # -# doinstall.sh -- install script for binary distributions. +# install-octave -- install script for binary distributions. # # John W. Eaton # jwe@bevo.che.wisc.edu @@ -12,7 +12,7 @@ if test -z "$version" then - echo "doinstall.sh: no version number!" + echo "install-octave: no version number!" exit 1 fi @@ -21,7 +21,7 @@ if test -z "$target_host_type" then - echo "doinstall.sh: host archetecture not found!" + echo "install-octave: host archetecture not found!" exit 1 fi @@ -60,7 +60,7 @@ else if test $# -gt 1 then - echo "usage: doinstall.sh [prefix-directory]" + echo "usage: install-octave [prefix-directory]" exit 1 fi fi @@ -196,10 +196,9 @@ cp src/octave $bindir/octave chmod 755 $bindir/octave else - echo "installing octave.sh as $bindir/octave" - sed "s|@OCTAVE_HOME@|$prefix|; s|@LD_LIBRARY_PATH@|$libdir|" octave.sh \ - > octave.tmp - cp octave.tmp $bindir/octave + echo "installing octave-sh as $bindir/octave" + sed "s|@OCTAVE_HOME@|$prefix|; s|@LD_LIBRARY_PATH@|$libdir|" octave-sh \ + > $bindir/octave chmod 755 $bindir/octave echo "installing src/octave as $bindir/octave.bin"
new file mode 100755 --- /dev/null +++ b/octave-sh @@ -0,0 +1,19 @@ +#!/bin/sh +# +# Wrapper for octave for binary installations that can't install +# octave in /usr/local/bin. +# +# The real binary should be installed in as octave.bin, and this file +# should be installed in the same directory as octave. + +if test -n "$LD_LIBRARY_PATH"; then + LD_LIBRARY_PATH="@LD_LIBRARY_PATH@:$LD_LIBRARY_PATH" +else + LD_LIBRARY_PATH="@LD_LIBRARY_PATH@" +fi +export LD_LIBRARY_PATH + +OCTAVE_HOME=@OCTAVE_HOME@ +export OCTAVE_HOME + +exec $OCTAVE_HOME/bin/octave.bin $*
deleted file mode 100755 --- a/octave.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -# -# Wrapper for octave for binary installations that can't install -# octave in /usr/local/bin. -# -# The real binary should be installed in as octave.bin, and this file -# should be installed in the same directory as octave. - -OCTAVE_HOME=@OCTAVE_HOME@ -export OCTAVE_HOME - -exec $OCTAVE_HOME/bin/octave.bin $*