1992-01-31 20:02:34 +00:00
|
|
|
#!/bin/sh -x
|
1992-01-14 07:27:56 +00:00
|
|
|
#
|
|
|
|
#Shell script for building and installing Emacs.
|
|
|
|
|
|
|
|
# Where to install all of Emacs's data files - the lisp code,
|
|
|
|
# documentation tree, and the architecture-dependent and -independent
|
|
|
|
# libaries. The default definitions for the variables below are
|
|
|
|
# expressed in terms of this one, so you may not need to change them.
|
|
|
|
# set LIBROOT=/usr/local/lib/emacs-19.0
|
1992-04-01 11:14:15 +00:00
|
|
|
LIBROOT=/home/gd/gnu/emacs
|
1992-01-14 07:27:56 +00:00
|
|
|
|
|
|
|
# Emacs will search this path to find its elisp files. This should be
|
|
|
|
# a colon-separated list of directories. Strictly speaking, all the
|
|
|
|
# elisp files should go under DATADIR (below), since both elisp source
|
|
|
|
# and compiled elisp are completely portable, but it's traditional to
|
|
|
|
# give the lisp files their own subdirectory.
|
1992-04-01 11:14:15 +00:00
|
|
|
LISPPATH=/home/gd/gnu/emacs/local-lisp:/home/gd/gnu/emacs/lisp
|
1992-01-14 07:27:56 +00:00
|
|
|
|
|
|
|
# Emacs will look here for its architecture-independent files (like
|
|
|
|
# the tutorial and the zippy database).
|
1992-04-01 11:14:15 +00:00
|
|
|
DATADIR=/home/gd/gnu/emacs/etc
|
1992-01-14 07:27:56 +00:00
|
|
|
|
|
|
|
# Emacs will look here for its architecture-dependent files, like
|
|
|
|
# executables for its utilities.
|
1992-04-01 11:14:15 +00:00
|
|
|
LIBDIR=/home/gd/gnu/emacs/arch-lib
|
1992-01-14 07:27:56 +00:00
|
|
|
|
|
|
|
# The locking directory, where the Emacs locking code keeps track of
|
|
|
|
# which files are currently being edited.
|
|
|
|
# set LOCKDIR=${LIBROOT}/lock
|
1992-04-01 11:14:15 +00:00
|
|
|
LOCKDIR=/home/gd/gnu/emacs/lock
|
1992-01-14 07:27:56 +00:00
|
|
|
|
|
|
|
# This is where build-install should place the binaries people will
|
|
|
|
# want to run directly (like etags and Emacs itself).
|
1992-01-31 20:02:34 +00:00
|
|
|
BINDIR=/usr/local/bin
|
1992-01-14 07:27:56 +00:00
|
|
|
|
|
|
|
/bin/sed < src/paths.h-dist > src/paths.h \
|
1992-01-31 20:02:34 +00:00
|
|
|
-e 's;\(#.*PATH_LOADSEARCH\).*$;\1 "'${LISPPATH}'";' \
|
|
|
|
-e 's;\(#.*PATH_EXEC\).*$;\1 "'${LIBDIR}'";' \
|
|
|
|
-e 's;\(#.*PATH_DATA\).*$;\1 "'${DATADIR}'";' \
|
|
|
|
-e 's;\(#.*LOCK\).*$;\1 "'${LOCKDIR}'/";'
|
1992-01-14 07:27:56 +00:00
|
|
|
|
|
|
|
(cd lib-src; make) || exit 1
|
|
|
|
(cd src; make) || exit 1
|
|
|
|
|
1992-01-31 20:02:34 +00:00
|
|
|
if [ `pwd` != `(cd ${LIBROOT}; pwd)` ]; then
|
1992-01-14 07:27:56 +00:00
|
|
|
mv `pwd` ${LIBROOT}
|
1992-01-31 20:02:34 +00:00
|
|
|
if [ $? != '0' ]; then
|
1992-01-14 07:27:56 +00:00
|
|
|
mkdir ${LIBROOT}
|
|
|
|
echo mv `pwd` to ${LIBROOT} failed--using tar to copy.
|
|
|
|
tar cf - . | (cd ${LIBROOT}; umask 0; tar xf -)
|
1992-01-31 20:02:34 +00:00
|
|
|
if [ $? != '0' ]; then
|
1992-01-14 07:27:56 +00:00
|
|
|
echo tar-copying `pwd` to ${LIBROOT} failed.
|
|
|
|
exit 1
|
1992-01-31 20:02:34 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
1992-01-14 07:27:56 +00:00
|
|
|
|
1992-01-31 20:02:34 +00:00
|
|
|
cp ${LIBROOT}/etc/[ce]tags ${BINDIR}
|
1992-01-14 07:27:56 +00:00
|
|
|
mv ${LIBROOT}/src/xemacs ${BINDIR}/emacs
|
|
|
|
rm ${LIBROOT}/src/temacs
|
1992-01-31 20:02:34 +00:00
|
|
|
chmod 777 ${BINDIR}/[ce]tags ${BINDIR}/emacs
|