annotate build-ins.in @ 22456:b7bf9b05f494

(INSTALL_INFO): New variable. (install): Run install-info.
author Richard M. Stallman <rms@gnu.org>
date Sat, 13 Jun 1998 01:29:43 +0000
parents 1541c518f769
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
522
bacdab90fa8b *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 491
diff changeset
1 #!/bin/sh -x
491
77c38d1bc8a8 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
2 #
77c38d1bc8a8 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
3 #Shell script for building and installing Emacs.
77c38d1bc8a8 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
4
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
5 # ==================== Where To Install Things ====================
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
6
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
7 # The default location for installation. Everything is placed in
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
8 # subdirectories of this directory. This directory must exist when
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
9 # you start installation. The default values for many of the
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
10 # variables below are expressed in terms of this one, so you may not
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
11 # need to change them.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
12 prefix=/usr/local
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
13
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
14 # Where to install Emacs and other binaries that people will want to
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
15 # run directly (like etags).
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
16 bindir=${prefix}/bin
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
17
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
18 # A directory under which we will install many of Emacs's files. The
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
19 # default values for many of the variables below are expressed in
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
20 # terms of this one, so you may not need to change them.
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
21 emacsdir=${prefix}/emacs-19.0
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
22
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
23 # Where to install and expect the architecture-independent data files
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
24 # (like the tutorial and the Zippy database).
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
25 datadir=${emacsdir}/etc
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
26
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
27 # Where to install the elisp files distributed with Emacs. Strictly
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
28 # speaking, all the elisp files should go under datadir (above), since
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
29 # both elisp source and compiled elisp are completely portable, but
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
30 # it's traditional to give the lisp files their own subdirectory.
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
31 lispdir=${emacsdir}/lisp
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
32
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
33 # Directories Emacs should search for elisp files specific to this
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
34 # site (i.e. customizations), before consulting ${lispdir}. This
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
35 # should be a colon-separated list of directories.
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
36 locallisppath=${emacsdir}/local-lisp
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
37
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
38 # Where Emacs will search to find its elisp files. Before changing
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
39 # this, check to see if your purpose wouldn't better be served by
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
40 # changing locallisppath. This should be a colon-separated list of
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
41 # directories.
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
42 lisppath=${locallisppath}:${lispdir}
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
43
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
44 # Where Emacs will search for its elisp files before dumping. This is
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
45 # only used during the process of compiling Emacs, to help Emacs find
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
46 # its lisp files before they've been installed in their final
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
47 # location. It's usually identical to lisppath, except that the entry
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
48 # for the directory containing the installed lisp files has been
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
49 # replaced with ../lisp. This should be a colon-separated list of
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
50 # directories.
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
51 dumplisppath=../lisp
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
52
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
53 # Where to install and expect the files that Emacs modifies as it
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
54 # runs. These files are all architecture-independent. Right now,
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
55 # the only such data is the locking directory.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
56 statedir=${emacsdir}
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
57
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
58 # Where to create and expect the locking directory, where the Emacs
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
59 # locking code keeps track of which files are currently being edited.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
60 lockdir=${statedir}/lock
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
61
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
62 # Where to install and expect executable files to be run by Emacs
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
63 # rather than directly by users, and other architecture-dependent
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
64 # data.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
65 libdir=${emacsdir}/arch-lib
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
66
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
67 # Where to install Emacs's man pages.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
68 mandir=/usr/man/man1
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
69
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
70 # Where to install and expect the info files describing Emacs. In the
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
71 # past, this defaulted to a subdirectory of ${prefix}/lib/emacs, but
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
72 # since there are now many packages documented with the texinfo
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
73 # system, it is inappropriate to imply that it is part of Emacs.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
74 infodir=${prefix}/info
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
75
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
76 removenullpaths="sed -e 's/^://' -e 's/:"'$'"//' -e 's/::/:/'"
491
77c38d1bc8a8 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
77
621
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
78 lisppath=`echo ${lisppath} | ${removenullpaths}` ; \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
79 dumplisppath=`echo ${dumplisppath} | ${removenullpaths}` ; \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
80 /bin/sed < src/paths.h.in > src/paths.h \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
81 -e 's;\(#.*PATH_LOADSEARCH\).*$$;\1 "'$${lisppath}'";' \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
82 -e 's;\(#.*PATH_DUMPLOADSEARCH\).*$$;\1 "'$${dumplisppath}'";' \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
83 -e 's;\(#.*PATH_EXEC\).*$$;\1 "${libdir}";' \
eca8812e61cd *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 617
diff changeset
84 -e 's;\(#.*PATH_DATA\).*$$;\1 "${datadir}";' \
625
ce011f7cd03f entered into RCS
Jim Blandy <jimb@redhat.com>
parents: 621
diff changeset
85 -e 's;\(#.*PATH_LOCK\).*$$;\1 "${lockdir}/";'
491
77c38d1bc8a8 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
86
77c38d1bc8a8 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
87 (cd lib-src; make) || exit 1
77c38d1bc8a8 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
88 (cd src; make) || exit 1
77c38d1bc8a8 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
89
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
90 # Subdirectories to install, and where they'll go.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
91 copydir=arch-lib etc info lisp
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
92 copydests=${libdir} ${datadir} ${infodir} ${lispdir}
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
93
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
94 # If any of the directories are below ${emacsdir} or ${statedir}, create them.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
95 for dir in ${copydests}; do
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
96 case "${dir}" in
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
97 ${emacsdir}/* )
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
98 if [ ! -d ${emacsdir} ]; then
7544
1541c518f769 (copydests): Get rid of spurious `-'s.
Richard M. Stallman <rms@gnu.org>
parents: 4794
diff changeset
99 mkdir ${emacsdir}
1541c518f769 (copydests): Get rid of spurious `-'s.
Richard M. Stallman <rms@gnu.org>
parents: 4794
diff changeset
100 chmod 777 ${emacsdir}
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
101 fi
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
102 ;;
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
103 ${statedir}/* )
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
104 if [ ! -d ${statedir} ]; then
7544
1541c518f769 (copydests): Get rid of spurious `-'s.
Richard M. Stallman <rms@gnu.org>
parents: 4794
diff changeset
105 mkdir ${statedir}
1541c518f769 (copydests): Get rid of spurious `-'s.
Richard M. Stallman <rms@gnu.org>
parents: 4794
diff changeset
106 chmod 777 ${statedir}
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
107 fi
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
108 ;;
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
109 esac
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
110 done
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
111
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
112 set ${copydests}
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
113 for dir in ${copydir} ; do
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
114 dest=$1 ; shift
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
115 mv ${dir} ${dest}
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
116 if [ $? != 0 ]; then
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
117 echo mv ${dir} to ${dest} failed -- using tar to copy.
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
118 if [ `/bin/pwd`/${dir} != `(cd ${dest}; /bin/pwd)` ] ; then
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
119 (cd ${dir}; tar cf - . ) | (cd ${dest}; umask 0; tar xf - )
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
120 if [ $? != 0 ]; then
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
121 echo "tar-copying ${dir} to ${dest} failed too. I give up."
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
122 exit 1
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
123 fi
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
124 for subdir in `find ${dest} -type d ! -name RCS -print` ; do
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
125 rm -rf ${subdir}/RCS
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
126 rm -f ${subdir}/\#*
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
127 rm -f ${subdir}/*~
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
128 done
522
bacdab90fa8b *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 491
diff changeset
129 fi
bacdab90fa8b *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 491
diff changeset
130 fi
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
131 done
491
77c38d1bc8a8 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
132
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
133 cp ${libdir}/[ce]tags ${bindir}
4794
b0eeade85c1f Change src/xemacs to src/emacs. We no longer create src/xemacs, so
Brian Fox <bfox@gnu.org>
parents: 625
diff changeset
134 mv src/emacs ${BINDIR}/emacs
617
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
135 rm src/temacs
cde1f15848c6 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 604
diff changeset
136 chmod 777 ${bindir}/[ce]tags ${bindir}/emacs