annotate install-octave.in @ 3176:fccab8e7d35f

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