forked from tsutsui/mule1.1-netbsd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-install
executable file
·38 lines (33 loc) · 991 Bytes
/
build-install
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/sh
# Shell script for building and installing Emacs.
# This is an alternative to `make install',
# and it still exists just because it always has.
set -x
EMACS=/usr/local/emacs
BIN=/usr/local/bin
/bin/sed "s;/usr/local/emacs;$EMACS;" < src/paths.h-dist > src/paths.h
(cd etc; make) || exit 1
(cd src; make) || exit 1
# The double quotes prevent an error from sh on Suns
# when the directory does not exist yet.
# We use sh -c pwd instead of just pwd because on some systems (Suns?)
# plan pwd tends to give back the specified name sometimes.
if [ `sh -c pwd` != "`(cd $EMACS; sh -c pwd)`" ]
then
mv `pwd` $EMACS
if [ $? != '0' ]
then
mkdir $EMACS
echo mv `pwd` to $EMACS failed--using tar to copy.
tar cf - . | (cd $EMACS; umask 0; tar xf -)
if [ $? != '0' ]
then
echo tar-copying `pwd` to $EMACS failed.
exit 1
fi
fi
fi
cp $EMACS/etc/[ce]tags $BIN
cp $EMACS/etc/emacsclient $BIN
mv $EMACS/src/xemacs $BIN/emacs
rm $EMACS/src/temacs