491
|
1 # This is the distribution Makefile for Emacs. config.emacs can make
|
|
2 # most of the changes to this file you might want, so try that first.
|
|
3
|
|
4 # make all to compile and build Emacs
|
|
5 # make install to install it
|
|
6 # make install.sysv to install on system V.
|
|
7 # make install.xenix to install on Xenix
|
|
8 # make tags to update tags tables
|
|
9 #
|
|
10 # make distclean to delete everything that wasn't in the distribution
|
|
11 # This is a very dangerous thing to do!
|
|
12 # make clean
|
|
13 # This is a little less dangerous.
|
|
14
|
|
15 SHELL = /bin/sh
|
|
16
|
|
17 # ==================== Where to install things ====================
|
|
18 # Note that on system V you must change MANDIR to /usr/local/man/man1.
|
|
19
|
|
20 # Where to install all of Emacs's data files - the lisp code,
|
|
21 # documentation tree, and the architecture-dependent and -independent
|
|
22 # libraries. If this is not the directory we're building under
|
|
23 # already, the `install' targets will move or copy it there. The
|
|
24 # default definitions for the variables below are expressed in terms
|
|
25 # of this one, so you may not need to change them.
|
|
26 LIBROOT=/u/emacs
|
|
27
|
|
28 # This is where the `install' make target should place the binaries
|
|
29 # people will want to run directly (like etags and Emacs itself).
|
|
30 INSTALLBIN=/usr/local/bin
|
|
31
|
|
32 # Emacs will search this path to find its elisp files. This should be
|
|
33 # a colon-separated list of directories. Strictly speaking, all the
|
|
34 # elisp files should go under DATADIR (below), since both elisp source
|
|
35 # and compiled elisp are completely portable, but it's traditional to
|
|
36 # give the lisp files their own subdirectory.
|
|
37 LISPPATH=/u/emacs/lisp
|
|
38
|
|
39 # Emacs will look here for its architecture-independent files (like
|
|
40 # the tutorial and the zippy database).
|
|
41 DATADIR=/u/emacs/share-lib
|
|
42
|
|
43 # Emacs will look here for its architecture-dependent files, like
|
|
44 # executables for its utilities.
|
|
45 LIBDIR=/u/emacs/arch-lib
|
|
46
|
|
47 # The locking directory, where the Emacs locking code keeps track of
|
|
48 # which files are currently being edited.
|
|
49 LOCKDIR=/u/emacs/lock
|
|
50
|
|
51 # This is where the `install' make target should place the man pages
|
|
52 # for the binaries it installs.
|
|
53 MANDIR= /usr/man/man1
|
|
54
|
|
55
|
|
56
|
|
57 # Flags passed down to subdirectory makefiles.
|
|
58 MFLAGS=
|
|
59
|
|
60 # Subdirectories to make recursively. `lisp' is not included
|
|
61 # because the compiled lisp files are part of the distribution
|
|
62 # and you cannot remake them without installing Emacs first.
|
|
63 SUBDIR= lib-src src
|
|
64
|
|
65 # Subdirectories to install
|
|
66 COPYDIR= arch-lib share-lib info lisp
|
|
67
|
|
68 # Subdirectories to clean
|
|
69 CLEANDIR= ${COPYDIR} lisp/term
|
|
70
|
|
71 all: src/paths.h ${SUBDIR}
|
|
72
|
|
73 src/paths.h: Makefile src/paths.h-dist
|
|
74 /bin/sed < src/paths.h-dist > src/paths.h \
|
|
75 -e 's;/usr/local/lib/emacs;${LIBROOT};g' \
|
|
76 -e 's;\(#.*PATH_LOADSEARCH\).*$$;\1 "$(LISPPATH)";' \
|
|
77 -e 's;\(#.*PATH_EXEC\).*$$;\1 "$(LIBDIR)";' \
|
|
78 -e 's;\(#.*PATH_DATA\).*$$;\1 "$(DATADIR)";' \
|
|
79 -e 's;\(#.*LOCK\).*$$;\1 "$(LOCKDIR)/";'
|
|
80
|
|
81 src: lib-src
|
|
82
|
|
83 .RECURSIVE: ${SUBDIR}
|
|
84
|
|
85 ${SUBDIR}: FRC
|
|
86 cd $@; make ${MFLAGS} all
|
|
87
|
|
88 install: all mkdir lockdir
|
|
89 -if [ `/bin/pwd` != `(cd ${LIBROOT}; /bin/pwd)` ] ; then \
|
|
90 tar cf - ${COPYDIR} | (cd ${LIBROOT}; umask 0; tar xBf - ) ;\
|
|
91 for i in ${CLEANDIR}; do \
|
|
92 (rm -rf ${LIBROOT}/$$i/RCS; \
|
|
93 rm -f ${LIBROOT}/$$i/\#*; \
|
|
94 rm -f ${LIBROOT}/$$i/*~); \
|
|
95 done \
|
|
96 else true; \
|
|
97 fi
|
|
98 install -c -s arch-lib/emacsclient ${INSTALLBIN}/emacsclient
|
|
99 install -c -s arch-lib/etags ${INSTALLBIN}/etags
|
|
100 install -c -s arch-lib/ctags ${INSTALLBIN}/ctags
|
|
101 install -c -s -m 1755 src/xemacs ${INSTALLBIN}/xemacs
|
|
102 install -c -m 444 share-lib/emacs.1 ${MANDIR}/emacs.1
|
|
103 -rm -f ${INSTALLBIN}/emacs
|
|
104 mv ${INSTALLBIN}/xemacs ${INSTALLBIN}/emacs
|
|
105
|
|
106 install.sysv: all mkdir lockdir
|
|
107 -if [ `/bin/pwd` != `(cd ${LIBROOT}; /bin/pwd)` ] ; then \
|
|
108 find ${COPYDIR} -print | cpio -pdum ${LIBROOT} ;\
|
|
109 for i in ${CLEANDIR}; do \
|
|
110 (rm -rf ${LIBROOT}/$$i/RCS; \
|
|
111 rm -f ${LIBROOT}/$$i/\#*; \
|
|
112 rm -f ${LIBROOT}/$$i/*~); \
|
|
113 done \
|
|
114 else true; \
|
|
115 fi
|
|
116 -cpset arch-lib/emacsclient ${INSTALLBIN}/emacsclient 755 bin bin
|
|
117 -cpset arch-lib/etags ${INSTALLBIN}/etags 755 bin bin
|
|
118 -cpset arch-lib/ctags ${INSTALLBIN}/ctags 755 bin bin
|
|
119 -cpset share-lib/emacs.1 ${MANDIR}/emacs.1 444 bin bin
|
|
120 -/bin/rm -f ${INSTALLBIN}/emacs
|
|
121 -cpset src/xemacs ${INSTALLBIN}/emacs 1755 bin bin
|
|
122
|
|
123 install.xenix: all mkdir lockdir
|
|
124 if [ `pwd` != `(cd ${LIBROOT}; pwd)` ] ; then \
|
|
125 tar cf - ${COPYDIR} | (cd ${LIBROOT}; umask 0; tar xpf - ) ;\
|
|
126 for i in ${CLEANDIR}; do \
|
|
127 (rm -rf ${LIBROOT}/$$i/RCS; \
|
|
128 rm -f ${LIBROOT}/$$i/\#*; \
|
|
129 rm -f ${LIBROOT}/$$i/*~); \
|
|
130 done \
|
|
131 else true; \
|
|
132 fi
|
|
133 cp arch-lib/etags arch-lib/ctags arch-lib/emacsclient ${INSTALLBIN}
|
|
134 chmod 755 ${INSTALLBIN}/etags ${INSTALLBIN}/ctags ${INSTALLBIN}/emacsclient
|
|
135 cp share-lib/emacs.1 ${MANDIR}/emacs.1
|
|
136 chmod 444 ${MANDIR}/emacs.1
|
|
137 -mv -f ${INSTALLBIN}/emacs ${INSTALLBIN}/emacs.old
|
|
138 cp src/xemacs ${INSTALLBIN}/emacs
|
|
139 chmod 1755 ${INSTALLBIN}/emacs
|
|
140 -rm -f ${INSTALLBIN}/emacs.old
|
|
141
|
|
142 mkdir: FRC
|
|
143 -mkdir ${LIBROOT}
|
|
144 -chmod 777 ${LIBROOT}
|
|
145
|
|
146 distclean:
|
|
147 for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} distclean); done
|
|
148
|
|
149 clean:
|
|
150 cd src; make clean
|
|
151 cd lib-src; make clean
|
|
152
|
|
153 lockdir:
|
|
154 -mkdir ${LOCKDIR}
|
|
155 -chmod 777 ${LOCKDIR}
|
|
156
|
|
157 FRC:
|
|
158
|
|
159 tags: lib-src
|
|
160 cd src; ../arch-lib/etags *.[ch] ../lisp/*.el ../lisp/term/*.el
|