annotate run-octave.in @ 12312:b10ea6efdc58 release-3-4-x ss-3-3-91

version is now 3.3.91
author John W. Eaton <jwe@octave.org>
date Mon, 31 Jan 2011 08:36:58 -0500
parents fd0a3ac60b0e
children 12814f1fbbd2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5786
9c3c903f037e [project @ 2006-05-03 20:03:41 by jwe]
jwe
parents:
diff changeset
1 #! /bin/sh
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 7001
diff changeset
2 ##
7017
a1dbe9d80eee [project @ 2007-10-12 21:27:11 by jwe]
jwe
parents: 7016
diff changeset
3 ## run-octave -- run Octave in the build tree.
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 7001
diff changeset
4 ##
11523
fd0a3ac60b0e update copyright notices
John W. Eaton <jwe@octave.org>
parents: 11452
diff changeset
5 ## Copyright (C) 2006-2011 John W. Eaton
7017
a1dbe9d80eee [project @ 2007-10-12 21:27:11 by jwe]
jwe
parents: 7016
diff changeset
6 ##
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 7001
diff changeset
7 ## This file is part of Octave.
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 7001
diff changeset
8 ##
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 7001
diff changeset
9 ## Octave is free software; you can redistribute it and/or modify it
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 7001
diff changeset
10 ## under the terms of the GNU General Public License as published by the
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 7001
diff changeset
11 ## Free Software Foundation; either version 3 of the License, or (at
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 7001
diff changeset
12 ## your option) any later version.
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 7001
diff changeset
13 ##
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 7001
diff changeset
14 ## Octave is distributed in the hope that it will be useful, but WITHOUT
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 7001
diff changeset
15 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 7001
diff changeset
16 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 7001
diff changeset
17 ## for more details.
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 7001
diff changeset
18 ##
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 7001
diff changeset
19 ## You should have received a copy of the GNU General Public License
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 7001
diff changeset
20 ## along with Octave; see the file COPYING. If not, see
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 7001
diff changeset
21 ## <http://www.gnu.org/licenses/>.
6125
a1754033bc6c [project @ 2006-10-29 17:05:53 by jwe]
jwe
parents: 6074
diff changeset
22
7244
5a9561046b89 [project @ 2007-12-04 02:27:27 by jwe]
jwe
parents: 7017
diff changeset
23 AWK=%AWK%
5a9561046b89 [project @ 2007-12-04 02:27:27 by jwe]
jwe
parents: 7017
diff changeset
24 FIND=%FIND%
8005
c0d7eb662384 run-octave.in: use sed to append : to path elements
John W. Eaton <jwe@octave.org>
parents: 7579
diff changeset
25 SED=%SED%
6125
a1754033bc6c [project @ 2006-10-29 17:05:53 by jwe]
jwe
parents: 6074
diff changeset
26
a1754033bc6c [project @ 2006-10-29 17:05:53 by jwe]
jwe
parents: 6074
diff changeset
27 # FIXME -- is there a better way to handle the possibility of spaces
a1754033bc6c [project @ 2006-10-29 17:05:53 by jwe]
jwe
parents: 6074
diff changeset
28 # in these names?
a1754033bc6c [project @ 2006-10-29 17:05:53 by jwe]
jwe
parents: 6074
diff changeset
29
6131
9a6e5cae5275 [project @ 2006-11-01 18:25:54 by jwe]
jwe
parents: 6129
diff changeset
30 top_srcdir='%abs_top_srcdir%'
9a6e5cae5275 [project @ 2006-11-01 18:25:54 by jwe]
jwe
parents: 6129
diff changeset
31 builddir='%builddir%'
6125
a1754033bc6c [project @ 2006-10-29 17:05:53 by jwe]
jwe
parents: 6074
diff changeset
32
a1754033bc6c [project @ 2006-10-29 17:05:53 by jwe]
jwe
parents: 6074
diff changeset
33 d1="$top_srcdir/test"
a1754033bc6c [project @ 2006-10-29 17:05:53 by jwe]
jwe
parents: 6074
diff changeset
34 d2="$top_srcdir/scripts"
a1754033bc6c [project @ 2006-10-29 17:05:53 by jwe]
jwe
parents: 6074
diff changeset
35 d3="$builddir/scripts"
a1754033bc6c [project @ 2006-10-29 17:05:53 by jwe]
jwe
parents: 6074
diff changeset
36 d4="$builddir/src"
a1754033bc6c [project @ 2006-10-29 17:05:53 by jwe]
jwe
parents: 6074
diff changeset
37
9381
f9ab19428cd8 * run-octave.in: Exclude @-files from path. Remove CVS exclusions.
Robert T. Short <octave@phaselockedsystems.com>
parents: 9132
diff changeset
38 d1_list=`$FIND "$d1" -type d -a ! \( \( -name private -o -name '@*' \) -a -prune \) -exec echo '{}' ';' | $SED 's/$/:/'`
f9ab19428cd8 * run-octave.in: Exclude @-files from path. Remove CVS exclusions.
Robert T. Short <octave@phaselockedsystems.com>
parents: 9132
diff changeset
39 d2_list=`$FIND "$d2" -type d -a ! \( \( -name private -o -name '@*' \) -a -prune \) -exec echo '{}' ';' | $SED 's/$/:/'`
f9ab19428cd8 * run-octave.in: Exclude @-files from path. Remove CVS exclusions.
Robert T. Short <octave@phaselockedsystems.com>
parents: 9132
diff changeset
40 d3_list=`$FIND "$d3" -type d -a ! \( \( -name private -o -name '@*' \) -a -prune \) -exec echo '{}' ';' | $SED 's/$/:/'`
f9ab19428cd8 * run-octave.in: Exclude @-files from path. Remove CVS exclusions.
Robert T. Short <octave@phaselockedsystems.com>
parents: 9132
diff changeset
41 d4_list=`$FIND "$d4" -type d -a ! \( \( -name private -o -name '@*' \) -a -prune \) -exec echo '{}' ';' | $SED 's/$/:/'`
6125
a1754033bc6c [project @ 2006-10-29 17:05:53 by jwe]
jwe
parents: 6074
diff changeset
42
6827
647cad232070 [project @ 2007-08-24 16:38:05 by jwe]
jwe
parents: 6732
diff changeset
43 d1_path=`echo "$d1_list" | $AWK '{ t = (s $0); s = t; } END { sub (/:$/, "", s); print s; }'`
647cad232070 [project @ 2007-08-24 16:38:05 by jwe]
jwe
parents: 6732
diff changeset
44 d2_path=`echo "$d2_list" | $AWK '{ t = (s $0); s = t; } END { sub (/:$/, "", s); print s; }'`
647cad232070 [project @ 2007-08-24 16:38:05 by jwe]
jwe
parents: 6732
diff changeset
45 d3_path=`echo "$d3_list" | $AWK '{ t = (s $0); s = t; } END { sub (/:$/, "", s); print s; }'`
647cad232070 [project @ 2007-08-24 16:38:05 by jwe]
jwe
parents: 6732
diff changeset
46 d4_path=`echo "$d4_list" | $AWK '{ t = (s $0); s = t; } END { sub (/:$/, "", s); print s; }'`
6125
a1754033bc6c [project @ 2006-10-29 17:05:53 by jwe]
jwe
parents: 6074
diff changeset
47
a1754033bc6c [project @ 2006-10-29 17:05:53 by jwe]
jwe
parents: 6074
diff changeset
48 LOADPATH="$d1_path:$d2_path:$d3_path:$d4_path"
5814
67bf9b4f2ae2 [project @ 2006-05-11 21:58:34 by jwe]
jwe
parents: 5793
diff changeset
49 IMAGEPATH="$top_srcdir/scripts/image"
8940
6994961bf1f4 use doc-cache instead of DOC for doc cache file name
John W. Eaton <jwe@octave.org>
parents: 8920
diff changeset
50 DOCFILE="$builddir/doc/interpreter/doc-cache"
9794
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents: 9613
diff changeset
51 INFOFILE="$top_srcdir/doc/interpreter/octave.info"
6125
a1754033bc6c [project @ 2006-10-29 17:05:53 by jwe]
jwe
parents: 6074
diff changeset
52
11452
e1a5bf3ea1d9 Add a GUD mode option to run-octave.in
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents: 9794
diff changeset
53 ## Checking for string equality below with prepended x's in order to
e1a5bf3ea1d9 Add a GUD mode option to run-octave.in
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents: 9794
diff changeset
54 ## handle problems with empty strings.
5786
9c3c903f037e [project @ 2006-05-03 20:03:41 by jwe]
jwe
parents:
diff changeset
55 if [ $# -gt 0 ]; then
9c3c903f037e [project @ 2006-05-03 20:03:41 by jwe]
jwe
parents:
diff changeset
56 if [ "x$1" = "x-g" ]; then
6987
deb175b6e4a1 [project @ 2007-10-09 18:39:15 by jwe]
jwe
parents: 6827
diff changeset
57 driver="gdb --args"
5786
9c3c903f037e [project @ 2006-05-03 20:03:41 by jwe]
jwe
parents:
diff changeset
58 shift
11452
e1a5bf3ea1d9 Add a GUD mode option to run-octave.in
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents: 9794
diff changeset
59 elif [ "x$1" = "x-gud" ]; then
e1a5bf3ea1d9 Add a GUD mode option to run-octave.in
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents: 9794
diff changeset
60 ## Frontends for gdb (e.g. Emacs's GUD mode) need --annotate=3
e1a5bf3ea1d9 Add a GUD mode option to run-octave.in
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents: 9794
diff changeset
61 driver="gdb --annotate=3 --args"
e1a5bf3ea1d9 Add a GUD mode option to run-octave.in
Jordi Gutiérrez Hermoso <jordigh@gmail.com>
parents: 9794
diff changeset
62 shift
5786
9c3c903f037e [project @ 2006-05-03 20:03:41 by jwe]
jwe
parents:
diff changeset
63 elif [ "x$1" = "x-valgrind" ]; then
9c3c903f037e [project @ 2006-05-03 20:03:41 by jwe]
jwe
parents:
diff changeset
64 driver="valgrind --tool=memcheck"
9c3c903f037e [project @ 2006-05-03 20:03:41 by jwe]
jwe
parents:
diff changeset
65 shift
9c3c903f037e [project @ 2006-05-03 20:03:41 by jwe]
jwe
parents:
diff changeset
66 elif [ "x$1" = "x-strace" ]; then
9c3c903f037e [project @ 2006-05-03 20:03:41 by jwe]
jwe
parents:
diff changeset
67 driver="strace -o octave.trace"
9c3c903f037e [project @ 2006-05-03 20:03:41 by jwe]
jwe
parents:
diff changeset
68 shift
9c3c903f037e [project @ 2006-05-03 20:03:41 by jwe]
jwe
parents:
diff changeset
69 fi
9c3c903f037e [project @ 2006-05-03 20:03:41 by jwe]
jwe
parents:
diff changeset
70 fi
6125
a1754033bc6c [project @ 2006-10-29 17:05:53 by jwe]
jwe
parents: 6074
diff changeset
71
7001
8b0cfeb06365 [project @ 2007-10-10 18:02:59 by jwe]
jwe
parents: 6987
diff changeset
72 OCTAVE_SITE_INITFILE="$top_srcdir/scripts/startup/main-rcfile" \
9794
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents: 9613
diff changeset
73 exec $builddir/libtool --mode=execute $driver \
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents: 9613
diff changeset
74 "$builddir/src/octave" --no-init-path --path="$LOADPATH" \
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents: 9613
diff changeset
75 --image-path="$IMAGEPATH" --doc-cache-file="$DOCFILE" \
0d4613a736e9 convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents: 9613
diff changeset
76 --info-file="$INFOFILE" "$@"