annotate install-octave.in @ 3162:7c96e85c76db

[project @ 1998-04-08 18:19:35 by jwe]
author jwe
date Wed, 08 Apr 1998 18:21:04 +0000
parents 4696773a14b1
children 45490c020e47
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3160
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
1 #!/bin/sh
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
2 #
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
3 # install-octave -- install script for binary distributions.
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
4 #
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
5 # John W. Eaton
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
6 # jwe@bevo.che.wisc.edu
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
7 # University of Wisconsin-Madison
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
8 # Department of Chemical Engineering
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
9
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
10 # get version
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
11 version=`cat VERSION 2> /dev/null`
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
12
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
13 if test -z "$version"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
14 then
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
15 echo "install-octave: no version number!"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
16 exit 1
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
17 fi
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
18
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
19 # get host type
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
20 canonical_host_type=`cat ARCH 2> /dev/null`
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
21
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
22 if test -z "$canonical_host_type"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
23 then
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
24 echo "install-octave: host archetecture not found!"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
25 exit 1
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
26 fi
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
27
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
28 have_find=true
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
29 case "$canonical_host_type" in
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
30 *-*-cygwin32)
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
31 have_find=false
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
32 ;;
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
33 esac
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
34
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
35 distdir=`pwd`
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
36
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
37 # Check whether to use -n or \c to keep echo from printing a newline
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
38 # character. Stolen from autoconf, which borrowed the idea from dist 3.0.
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
39
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
40 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
41 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
42 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
43 echo_n=
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
44 echo_c='
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
45 '
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
46 else
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
47 echo_n=-n
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
48 echo_c=
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
49 fi
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
50 else
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
51 echo_n=
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
52 echo_c='\c'
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
53 fi
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
54
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
55 EXE=@EXE@
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
56
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
57 # ==================== Where To Install Things ====================
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
58
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
59 # The default location for installation. Everything is placed in
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
60 # subdirectories of this directory. The default values for many of
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
61 # the variables below are expressed in terms of this one, so you may
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
62 # not need to change them. This defaults to /usr/local.
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
63 prefix=@prefix@
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
64
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
65 alt_dir=false
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
66 if test $# -eq 1
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
67 then
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
68 alt_dir=true
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
69 prefix=$1
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
70 else
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
71 if test $# -gt 1
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
72 then
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
73 echo "usage: install-octave [prefix-directory]"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
74 exit 1
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
75 fi
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
76 fi
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
77
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
78 # Like `prefix', but used for architecture-specific files.
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
79 exec_prefix="$prefix"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
80
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
81 # Where to install Octave and other binaries that people will want to
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
82 # run directly.
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
83 bindir="$exec_prefix/bin"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
84
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
85 # Where to install architecture-independent data files. ${fcnfiledir}
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
86 # and ${localfcnfiledir} are subdirectories of this.
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
87 datadir="$prefix/share"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
88
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
89 libdir="$exec_prefix/lib"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
90
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
91 # Where to install and expect libraries like libcruft.a and liboctave.a.
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
92 octlibdir="$libdir/octave-$version"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
93
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
94 # Where to install and expect executable programs to be run by Octave
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
95 # rather than directly by users.
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
96 libexecdir="$exec_prefix/libexec"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
97
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
98 includedir="$prefix/include"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
99
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
100 # Where to install Octave's include files. The default is
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
101 # ${prefix}/include/octave-$version
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
102 octincludedir=$includedir/octave-$version
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
103
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
104 # Where to install Octave's man pages, and what extension they should
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
105 # have. The default is ${prefix}/man/man1
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
106 mandir="$prefix/man/man1"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
107 manext="1"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
108
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
109 # Where to install and expect the info files describing Octave..
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
110 infodir="$prefix/info"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
111
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
112 # The fill path to the default info file.
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
113 infofile="$infodir/octave.info"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
114
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
115 # ==================== Octave-specific directories ====================
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
116
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
117 # These variables hold the values Octave will actually use. They are
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
118 # based on the values of the standard Make variables above.
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
119
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
120 # Where to install the function file distributed with
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
121 # Octave. This includes the Octave version, so that the
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
122 # function files for different versions of Octave will install
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
123 # themselves in separate directories.
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
124 fcnfiledir="$datadir/octave/$version/m"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
125
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
126 # Directories Octave should search for function files specific
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
127 # to this site (i.e. customizations), before consulting
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
128 # ${fcnfiledir}. This should be a colon-separated list of
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
129 # directories.
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
130 localfcnfiledir="$datadir/octave/site/m"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
131 localfcnfilepath="$localfcnfiledir//"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
132
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
133 # Where to put executables to be run by Octave rather than
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
134 # the user. This path usually includes the Octave version
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
135 # and configuration name, so that multiple configurations
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
136 # for multiple versions of Octave may be installed at once.
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
137 archlibdir="$libexecdir/octave/$version/exec/$canonical_host_type"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
138
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
139 # Where to put executables to be run by Octave rather than by the
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
140 # user that are specific to this site.
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
141 localarchlibdir="$libexecdir/octave/site/exec/$canonical_host_type"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
142
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
143 # Where to put object files that will by dynamically loaded.
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
144 # This path usually includes the Octave version and configuration
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
145 # name, so that multiple configurations for multiple versions of
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
146 # Octave may be installed at once.
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
147 octfiledir="$libexecdir/octave/$version/oct/$canonical_host_type"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
148
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
149 # Directories Octave should search for object files that will be
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
150 # dynamically loaded and that are specific to this site
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
151 # (i.e. customizations), before consulting ${octfiledir}. This should
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
152 # be a colon-separated list of directories.
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
153 localoctfiledir="$libexecdir/octave/site/oct/$canonical_host_type"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
154 localoctfilepath="$localoctfiledir//"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
155
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
156 # Where Octave will search to find its function files. Before
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
157 # changing this, check to see if your purpose wouldn't
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
158 # better be served by changing localfcnfilepath. This
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
159 # should be a colon-separated list of directories.
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
160 fcnfilepath=".:$localoctfilepath:$localfcnfilepath:$octfiledir//:$fcnfiledir//"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
161
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
162 # Where Octave will search to find image files.es.
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
163 imagedir="$datadir/octave/$version/imagelib"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
164 imagepath=".:$imagedir//"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
165
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
166 cat << EOF
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
167 Installing octave in the following subdirectories of
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
168 $prefix:
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
169
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
170 bindir: `echo $bindir | sed "s,^$prefix/,,"`
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
171 datadir: `echo $datadir | sed "s,^$prefix/,,"`
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
172 libdir: `echo $libdir | sed "s,^$prefix/,,"`
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
173 octlibdir: `echo $octlibdir | sed "s,^$prefix/,,"`
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
174 includedir: `echo $includedir | sed "s,^$prefix/,,"`
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
175 octincludedir: `echo $octincludedir | sed "s,^$prefix/,,"`
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
176 mandir: `echo $mandir | sed "s,^$prefix/,,"`
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
177 infodir: `echo $infodir | sed "s,^$prefix/,,"`
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
178 fcnfiledir: `echo $fcnfiledir | sed "s,^$prefix/,,"`
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
179 localfcnfiledir: `echo $localfcnfiledir | sed "s,^$prefix/,,"`
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
180 archlibdir: `echo $archlibdir | sed "s,^$prefix/,,"`
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
181 localarchlibdir: `echo $localarchlibdir | sed "s,^$prefix/,,"`
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
182 octfiledir: `echo $octfiledir | sed "s,^$prefix/,,"`
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
183 localoctfiledir: `echo $localoctfiledir | sed "s,^$prefix/,,"`
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
184 imagedir: `echo $imagedir | sed "s,^$prefix/,,"`
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
185
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
186 EOF
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
187
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
188 echo $echo_n "Is this correct [y/N]? " $echo_c
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
189
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
190 read ans
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
191
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
192 case "$ans" in
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
193 y | Y | yes | YES)
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
194 ;;
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
195 *)
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
196 exit 1
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
197 ;;
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
198 esac
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
199
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
200 DIRS_TO_MAKE="$bindir $datadir $libdir $octlibdir $libexecdir \
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
201 $includedir $octincludedir $mandir $infodir $fcnfiledir \
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
202 $localfcnfiledir $archlibdir $localarchlibdir \
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
203 $octfiledir $localoctfiledir $imagedir"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
204
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
205 ./mkinstalldirs $DIRS_TO_MAKE
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
206
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
207 if test "$prefix" = /usr/local
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
208 then
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
209 echo "installing src/octave as $bindir/octave"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
210 cp src/octave $bindir/octave
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
211 chmod 755 $bindir/octave
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
212 else
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
213 echo "installing octave-sh as $bindir/octave"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
214 sed "s|@OCTAVE_HOME@|$prefix|; s|@LD_LIBRARY_PATH@|$octlibdir|" octave-sh \
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
215 > $bindir/octave
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
216 chmod 755 $bindir/octave
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
217
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
218 echo "installing src/octave as $bindir/octave.bin"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
219 cp src/octave $bindir/octave.bin
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
220 chmod 755 $bindir/octave.bin
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
221 fi
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
222
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
223 echo "installing octave-bug as $bindir/octave-bug"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
224 cp octave-bug $bindir/octave-bug
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
225 chmod 755 $bindir/octave-bug
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
226
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
227 echo "installing info as $archlibdir/info"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
228 cp info/info $archlibdir/info
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
229 chmod 755 $archlibdir/info
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
230
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
231 if test -f LIBRARIES; then
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
232 echo "installing shared libraries in $octlibdir"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
233 for f in `cat LIBRARIES`
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
234 do
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
235 file=`basename $f`
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
236 cp $f $octlibdir/$file
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
237 chmod 644 $octlibdir/$file
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
238 done
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
239 fi
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
240
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
241 if $have_find; then
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
242 oct_files=`find . -name '*.oct' -print`
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
243 if test -n "$oct_files"; then
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
244 echo "installing .oct files in $octfiledir"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
245 cd src
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
246 for f in $oct_files
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
247 do
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
248 file=`basename $f`
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
249 cp $f $octfiledir/$file
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
250 chmod 755 $octfiledir/$file
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
251 done
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
252 if test -f links-to-make; then
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
253 cat links-to-make | while read src dest
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
254 do
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
255 if test -n "$src" && test -n "$dest"; then
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
256 cd $octfiledir
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
257 ln $src $dest
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
258 fi
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
259 done
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
260 fi
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
261 cd $distdir
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
262 fi
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
263 fi
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
264
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
265 echo "installing .m files in $fcnfiledir"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
266 cd scripts
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
267 tar cf - . | ( cd $fcnfiledir ; tar xf - )
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
268 if $have_find; then
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
269 find $fcnfiledir -type f -print | xargs chmod 0644
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
270 find $fcnfiledir -name '*.img' -print | xargs rm -f
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
271 fi
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
272 cd $distdir
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
273
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
274 echo "installing image files in $imagedir"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
275 cd scripts/image
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
276 cp *.img $imagedir
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
277 chmod 644 $imagedir/*.img
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
278 cd $distdir
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
279
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
280 echo "creating ls-R file in $datadir/octave"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
281 ls -LR $datadir/octave > $datadir/octave/ls-R
3162
7c96e85c76db [project @ 1998-04-08 18:19:35 by jwe]
jwe
parents: 3160
diff changeset
282 chmod 644 $datadir/octave/ls-R
3160
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
283
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
284 echo "creating ls-R file in $libexecdir/octave"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
285 ls -LR $libexecdir/octave > $libexecdir/octave/ls-R
3162
7c96e85c76db [project @ 1998-04-08 18:19:35 by jwe]
jwe
parents: 3160
diff changeset
286 chmod 644 $libexecdir/octave/ls-R
3160
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
287
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
288 echo "installing info files in $infodir"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
289 for f in doc/interpreter/octave.info*
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
290 do
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
291 file=`basename $f`
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
292 cp $f $infodir/$file
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
293 chmod 644 $infodir/$file
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
294 done
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
295
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
296 echo "installing man page in $mandir"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
297 cp doc/interpreter/octave.1 $mandir/octave.$manext
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
298 chmod 644 $mandir/octave.$manext
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
299
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
300 case "$canonical_host_type" in
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
301 *-*-cygwin32)
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
302 if $alt_dir; then
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
303 echo "*** You have specified an installation directory different"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
304 echo "*** from the default. For Octave to run properly, you must"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
305 echo "*** set the environment variable OCTAVE_HOME to"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
306 echo "***"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
307 echo "*** $prefix"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
308 echo "***"
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
309 echo "*** before starting Octave."
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
310 fi
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
311 ;;
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
312 esac
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
313
4696773a14b1 [project @ 1998-03-02 06:18:12 by jwe]
jwe
parents:
diff changeset
314 exit 0