annotate install-octave.in @ 3164:45490c020e47

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