annotate admin/run_forge @ 12669:1c92b4b26ced octave-forge

releasePKG.m: exclude .hg* files of export as of bug #45669
author jpicarbajal
date Fri, 31 Jul 2015 19:49:28 +0000
parents 185c49a73acc
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1550
87ff1192bf31 Add libs and bins to the octave-forge runtime environment for "make run"
pkienzle
parents:
diff changeset
1 #! /bin/sh
87ff1192bf31 Add libs and bins to the octave-forge runtime environment for "make run"
pkienzle
parents:
diff changeset
2
87ff1192bf31 Add libs and bins to the octave-forge runtime environment for "make run"
pkienzle
parents:
diff changeset
3 # Walk the octave-forge tree (starting in the root) searching for
87ff1192bf31 Add libs and bins to the octave-forge runtime environment for "make run"
pkienzle
parents:
diff changeset
4 # all the directories that are supposed to be installed.
87ff1192bf31 Add libs and bins to the octave-forge runtime environment for "make run"
pkienzle
parents:
diff changeset
5 # Add each directory and any data subdirectories to the LOADPATH for octave.
87ff1192bf31 Add libs and bins to the octave-forge runtime environment for "make run"
pkienzle
parents:
diff changeset
6 # Add any bin directories to the EXEC_PATH.
87ff1192bf31 Add libs and bins to the octave-forge runtime environment for "make run"
pkienzle
parents:
diff changeset
7 # Add any DLL directories to the system PATH.
87ff1192bf31 Add libs and bins to the octave-forge runtime environment for "make run"
pkienzle
parents:
diff changeset
8 # Set LD_LIBRARY_PATH and DYLD_LIBRARY_PATH for any .so and .dylib files found.
87ff1192bf31 Add libs and bins to the octave-forge runtime environment for "make run"
pkienzle
parents:
diff changeset
9 #
87ff1192bf31 Add libs and bins to the octave-forge runtime environment for "make run"
pkienzle
parents:
diff changeset
10 # You must call this from the root of the octave-forge tree, using, e.g.,
87ff1192bf31 Add libs and bins to the octave-forge runtime environment for "make run"
pkienzle
parents:
diff changeset
11 # admin/run_forge octave --norc -q
87ff1192bf31 Add libs and bins to the octave-forge runtime environment for "make run"
pkienzle
parents:
diff changeset
12 #
87ff1192bf31 Add libs and bins to the octave-forge runtime environment for "make run"
pkienzle
parents:
diff changeset
13 # Normally this is called for you, using the run target from make:
87ff1192bf31 Add libs and bins to the octave-forge runtime environment for "make run"
pkienzle
parents:
diff changeset
14 # make run
87ff1192bf31 Add libs and bins to the octave-forge runtime environment for "make run"
pkienzle
parents:
diff changeset
15
87ff1192bf31 Add libs and bins to the octave-forge runtime environment for "make run"
pkienzle
parents:
diff changeset
16 ROOT=`pwd`
87ff1192bf31 Add libs and bins to the octave-forge runtime environment for "make run"
pkienzle
parents:
diff changeset
17 BINPATH="$PATH"
87ff1192bf31 Add libs and bins to the octave-forge runtime environment for "make run"
pkienzle
parents:
diff changeset
18 LDPATH="$LD_LIBRARY_PATH"
87ff1192bf31 Add libs and bins to the octave-forge runtime environment for "make run"
pkienzle
parents:
diff changeset
19 DYLDPATH="$DYLD_LIBRARY_PATH"
2423
2c1169bbf968 packages, packages, packages
adb014
parents: 2400
diff changeset
20 OCTPATH="$OCTAVE_PATH:../"
1550
87ff1192bf31 Add libs and bins to the octave-forge runtime environment for "make run"
pkienzle
parents:
diff changeset
21 # XXX FIXME XXX strictly speaking, the default octave bin directories
87ff1192bf31 Add libs and bins to the octave-forge runtime environment for "make run"
pkienzle
parents:
diff changeset
22 # should be in the middle of EXECPATH and PATH, but it should be safe
87ff1192bf31 Add libs and bins to the octave-forge runtime environment for "make run"
pkienzle
parents:
diff changeset
23 # to put them at the end since octave probably isn't overriding anything
87ff1192bf31 Add libs and bins to the octave-forge runtime environment for "make run"
pkienzle
parents:
diff changeset
24 # on the system. We may also want to pick up the OCTAVE_EXEC_PATH if
87ff1192bf31 Add libs and bins to the octave-forge runtime environment for "make run"
pkienzle
parents:
diff changeset
25 # there is one.
87ff1192bf31 Add libs and bins to the octave-forge runtime environment for "make run"
pkienzle
parents:
diff changeset
26 EXECPATH="$PATH:"
2423
2c1169bbf968 packages, packages, packages
adb014
parents: 2400
diff changeset
27 for f in code/* install/*; do
3967
185c49a73acc More replaces of use of CVS with SVN
adb014
parents: 2423
diff changeset
28 # exclude SVN directories, only include directories, skip NOINSTALL
2247
64599a4ed03e Remove bashisms from mktest.sh and run_forge
adb014
parents: 1720
diff changeset
29 case "$f" in
3967
185c49a73acc More replaces of use of CVS with SVN
adb014
parents: 2423
diff changeset
30 */.svn) ;;
2247
64599a4ed03e Remove bashisms from mktest.sh and run_forge
adb014
parents: 1720
diff changeset
31 *)
64599a4ed03e Remove bashisms from mktest.sh and run_forge
adb014
parents: 1720
diff changeset
32 if test -d $f -a ! -f $f/NOINSTALL; then
1550
87ff1192bf31 Add libs and bins to the octave-forge runtime environment for "make run"
pkienzle
parents:
diff changeset
33 OCTPATH="$ROOT/$f:$OCTPATH"
87ff1192bf31 Add libs and bins to the octave-forge runtime environment for "make run"
pkienzle
parents:
diff changeset
34
2423
2c1169bbf968 packages, packages, packages
adb014
parents: 2400
diff changeset
35 # if in a package source directory add inst/ src/
2c1169bbf968 packages, packages, packages
adb014
parents: 2400
diff changeset
36 if test -d "$f/inst"; then OCTPATH="$ROOT/$f/inst:$OCTPATH"; fi
2c1169bbf968 packages, packages, packages
adb014
parents: 2400
diff changeset
37 if test -d "$f/src"; then OCTPATH="$ROOT/$f/src:$OCTPATH"; fi
2c1169bbf968 packages, packages, packages
adb014
parents: 2400
diff changeset
38
1550
87ff1192bf31 Add libs and bins to the octave-forge runtime environment for "make run"
pkienzle
parents:
diff changeset
39 # if there is install data, include in on the path
87ff1192bf31 Add libs and bins to the octave-forge runtime environment for "make run"
pkienzle
parents:
diff changeset
40 if test -d "$f/data"; then OCTPATH="$ROOT/$f/data:$OCTPATH"; fi
87ff1192bf31 Add libs and bins to the octave-forge runtime environment for "make run"
pkienzle
parents:
diff changeset
41
87ff1192bf31 Add libs and bins to the octave-forge runtime environment for "make run"
pkienzle
parents:
diff changeset
42 # make sure we can find supporting binaries
87ff1192bf31 Add libs and bins to the octave-forge runtime environment for "make run"
pkienzle
parents:
diff changeset
43 if test -d "$f/bin"; then EXECPATH="$ROOT/$f/bin:$EXECPATH"; fi
1720
b4586377f0a6 [for Dan McMahill] use INSTALL_SCRIPT for scripts
pkienzle
parents: 1550
diff changeset
44 if test -d "$f/scripts"; then EXECPATH="$ROOT/$f/scripts:$EXECPATH"; fi
1550
87ff1192bf31 Add libs and bins to the octave-forge runtime environment for "make run"
pkienzle
parents:
diff changeset
45
87ff1192bf31 Add libs and bins to the octave-forge runtime environment for "make run"
pkienzle
parents:
diff changeset
46 # supporting libraries need to be available as well
87ff1192bf31 Add libs and bins to the octave-forge runtime environment for "make run"
pkienzle
parents:
diff changeset
47 check=`echo $f/*.dll`
87ff1192bf31 Add libs and bins to the octave-forge runtime environment for "make run"
pkienzle
parents:
diff changeset
48 if test "$check" != "$f/*.dll"; then BINPATH="$ROOT/$f:$BINPATH"; fi
87ff1192bf31 Add libs and bins to the octave-forge runtime environment for "make run"
pkienzle
parents:
diff changeset
49 check=`echo $f/*.so`
87ff1192bf31 Add libs and bins to the octave-forge runtime environment for "make run"
pkienzle
parents:
diff changeset
50 if test "$check" != "$f/*.so"; then LDPATH="$ROOT/$f:$LDPATH"; fi
87ff1192bf31 Add libs and bins to the octave-forge runtime environment for "make run"
pkienzle
parents:
diff changeset
51 check=`echo $f/*.dylib`
87ff1192bf31 Add libs and bins to the octave-forge runtime environment for "make run"
pkienzle
parents:
diff changeset
52 if test "$check" != "$f/*.dylib"; then DYLDPATH="$ROOT/$f:$DYLDPATH"; fi
87ff1192bf31 Add libs and bins to the octave-forge runtime environment for "make run"
pkienzle
parents:
diff changeset
53 fi
2247
64599a4ed03e Remove bashisms from mktest.sh and run_forge
adb014
parents: 1720
diff changeset
54 esac
1550
87ff1192bf31 Add libs and bins to the octave-forge runtime environment for "make run"
pkienzle
parents:
diff changeset
55 done
2247
64599a4ed03e Remove bashisms from mktest.sh and run_forge
adb014
parents: 1720
diff changeset
56 LD_LIBRARY_PATH="$LDPATH"
64599a4ed03e Remove bashisms from mktest.sh and run_forge
adb014
parents: 1720
diff changeset
57 DYLD_LIBRARY_PATH="$DYLDPATH"
64599a4ed03e Remove bashisms from mktest.sh and run_forge
adb014
parents: 1720
diff changeset
58 PATH="$BINPATH"
2423
2c1169bbf968 packages, packages, packages
adb014
parents: 2400
diff changeset
59 OCTAVE_LOADPATH="$OCTPATH"
2247
64599a4ed03e Remove bashisms from mktest.sh and run_forge
adb014
parents: 1720
diff changeset
60 OCTAVE_EXEC_PATH="$EXECPATH"
2423
2c1169bbf968 packages, packages, packages
adb014
parents: 2400
diff changeset
61 export LD_LIBRARY_PATH DYLD_LIBRARY_PATH PATH OCTAVE_LOADPATH OCTAVE_EXEC_PATH
1550
87ff1192bf31 Add libs and bins to the octave-forge runtime environment for "make run"
pkienzle
parents:
diff changeset
62 $*