617
|
1 # DIST: This is the distribution Makefile for Emacs. configure can
|
|
2 # DIST: make most of the changes to this file you might want, so try
|
|
3 # DIST: that first.
|
491
|
4
|
617
|
5 # make all to compile and build Emacs.
|
|
6 # make install to install it.
|
|
7 # make install.sysv to install on system V. Note that on system V you
|
|
8 # must change mandir to /usr/local/man/man1.
|
|
9 # make install.xenix to install on Xenix.
|
596
|
10 # make install.aix to install on AIX.
|
617
|
11 # make tags to update tags tables.
|
491
|
12 #
|
617
|
13 # make distclean to delete everything that wasn't in the distribution.
|
491
|
14 # This is a very dangerous thing to do!
|
|
15 # make clean
|
617
|
16 # This is a little less dangerous.
|
621
|
17 # make dist
|
|
18 # This produces a tar file from the current source tree suitable
|
|
19 # for redistribution.
|
491
|
20
|
|
21 SHELL = /bin/sh
|
|
22
|
617
|
23 # ==================== Where To Install Things ====================
|
|
24
|
|
25 # The default location for installation. Everything is placed in
|
|
26 # subdirectories of this directory. This directory must exist when
|
|
27 # you start installation. The default values for many of the
|
|
28 # variables below are expressed in terms of this one, so you may not
|
|
29 # need to change them.
|
|
30 prefix=/usr/local
|
|
31
|
|
32 # Where to install Emacs and other binaries that people will want to
|
|
33 # run directly (like etags).
|
621
|
34 bindir=${prefix}/bin
|
491
|
35
|
617
|
36 # A directory under which we will install many of Emacs's files. The
|
|
37 # default values for many of the variables below are expressed in
|
|
38 # terms of this one, so you may not need to change them.
|
621
|
39 emacsdir=${prefix}/emacs-19.0
|
617
|
40
|
|
41 # Where to install and expect the architecture-independent data files
|
|
42 # (like the tutorial and the Zippy database).
|
621
|
43 datadir=${emacsdir}/etc
|
491
|
44
|
617
|
45 # Where to install the elisp files distributed with Emacs. Strictly
|
|
46 # speaking, all the elisp files should go under datadir (above), since
|
|
47 # both elisp source and compiled elisp are completely portable, but
|
|
48 # it's traditional to give the lisp files their own subdirectory.
|
621
|
49 lispdir=${emacsdir}/lisp
|
617
|
50
|
|
51 # Directories Emacs should search for elisp files specific to this
|
621
|
52 # site (i.e. customizations), before consulting ${lispdir}. This
|
617
|
53 # should be a colon-separated list of directories.
|
621
|
54 locallisppath=${emacsdir}/local-lisp
|
491
|
55
|
617
|
56 # Where Emacs will search to find its elisp files. Before changing
|
|
57 # this, check to see if your purpose wouldn't better be served by
|
|
58 # changing locallisppath. This should be a colon-separated list of
|
|
59 # directories.
|
621
|
60 lisppath=${locallisppath}:${lispdir}
|
491
|
61
|
621
|
62 # Where Emacs will search for its elisp files while building. This is
|
617
|
63 # only used during the process of compiling Emacs, to help Emacs find
|
|
64 # its lisp files before they've been installed in their final
|
|
65 # location. It's usually identical to lisppath, except that the entry
|
|
66 # for the directory containing the installed lisp files has been
|
|
67 # replaced with ../lisp. This should be a colon-separated list of
|
|
68 # directories.
|
621
|
69 buildlisppath=../lisp
|
491
|
70
|
617
|
71 # Where to install and expect the files that Emacs modifies as it
|
|
72 # runs. These files are all architecture-independent. Right now,
|
|
73 # the only such data is the locking directory.
|
621
|
74 statedir=${emacsdir}
|
617
|
75
|
|
76 # Where to create and expect the locking directory, where the Emacs
|
|
77 # locking code keeps track of which files are currently being edited.
|
621
|
78 lockdir=${statedir}/lock
|
491
|
79
|
617
|
80 # Where to install and expect executable files to be run by Emacs
|
|
81 # rather than directly by users, and other architecture-dependent
|
|
82 # data.
|
621
|
83 libdir=${emacsdir}/arch-lib
|
491
|
84
|
617
|
85 # Where to install Emacs's man pages.
|
|
86 mandir=/usr/man/man1
|
|
87
|
|
88 # Where to install and expect the info files describing Emacs. In the
|
621
|
89 # past, this defaulted to a subdirectory of ${prefix}/lib/emacs, but
|
617
|
90 # since there are now many packages documented with the texinfo
|
|
91 # system, it is inappropriate to imply that it is part of Emacs.
|
621
|
92 infodir=${prefix}/info
|
491
|
93
|
|
94
|
617
|
95 # ==================== Utility Programs for the Build ====================
|
|
96
|
|
97 # Allow the user to specify the install program.
|
|
98 INSTALL = install
|
|
99 INSTALLFLAGS = -c
|
|
100 INSTALL_PROGRAM = ${INSTALL}
|
|
101 INSTALL_DATA = ${INSTALL}
|
|
102
|
|
103
|
|
104 # ============================= Targets ==============================
|
491
|
105
|
|
106 # Flags passed down to subdirectory makefiles.
|
617
|
107 MFLAGS =
|
491
|
108
|
|
109 # Subdirectories to make recursively. `lisp' is not included
|
|
110 # because the compiled lisp files are part of the distribution
|
|
111 # and you cannot remake them without installing Emacs first.
|
617
|
112 SUBDIR = lib-src src
|
491
|
113
|
617
|
114 # Subdirectories to install, and where they'll go.
|
|
115 COPYDIR = arch-lib etc info lisp
|
621
|
116 COPYDESTS = ${libdir} ${datadir} ${infodir} ${lispdir}
|
491
|
117
|
|
118 all: src/paths.h ${SUBDIR}
|
|
119
|
617
|
120 removenullpaths=sed -e 's/^://' -e 's/:$$//' -e 's/::/:/'
|
|
121
|
|
122 src/paths.h: Makefile src/paths.h.in
|
621
|
123 lisppath=`echo ${lisppath} | ${removenullpaths}` ; \
|
|
124 buildlisppath=`echo ${buildlisppath} | ${removenullpaths}` ; \
|
|
125 /bin/sed < src/paths.h.in > src/paths.h \
|
617
|
126 -e 's;\(#.*PATH_LOADSEARCH\).*$$;\1 "'$${lisppath}'";' \
|
621
|
127 -e 's;\(#.*PATH_DUMPLOADSEARCH\).*$$;\1 "'$${buildlisppath}'";' \
|
|
128 -e 's;\(#.*PATH_EXEC\).*$$;\1 "${libdir}";' \
|
|
129 -e 's;\(#.*PATH_DATA\).*$$;\1 "${datadir}";' \
|
|
130 -e 's;\(#.*PATH_LOCK\).*$$;\1 "${lockdir}/";' \
|
|
131 -e 's;\(#.*PATH_SUPERLOCK\).*$$;\1 "${lockdir}/!!!SuperLock!!!";'
|
491
|
132
|
|
133 src: lib-src
|
|
134
|
|
135 .RECURSIVE: ${SUBDIR}
|
|
136
|
|
137 ${SUBDIR}: FRC
|
|
138 cd $@; make ${MFLAGS} all
|
|
139
|
|
140 install: all mkdir lockdir
|
617
|
141 -set ${COPYDESTS} ; \
|
|
142 for dir in ${COPYDIR} ; do \
|
|
143 dest=$$1 ; shift ; \
|
|
144 if [ `/bin/pwd`/$${dir} != `(cd $${dest}; /bin/pwd)` ] ; then \
|
|
145 (cd $${dir}; tar cf - . ) | (cd $${dest}; umask 0; tar xf - ) ; \
|
|
146 for subdir in `find $${dest} -type d ! -name RCS -print` ; do \
|
|
147 rm -rf $${subdir}/RCS ; \
|
|
148 rm -f $${subdir}/\#* ; \
|
|
149 rm -f $${subdir}/*~ ; \
|
|
150 done ; \
|
|
151 fi ; \
|
|
152 done
|
|
153 ${INSTALL_PROGRAM} ${INSTALLFLAGS} -c arch-lib/emacsclient ${bindir}/emacsclient
|
|
154 ${INSTALL_PROGRAM} ${INSTALLFLAGS} -c arch-lib/etags ${bindir}/etags
|
|
155 ${INSTALL_PROGRAM} ${INSTALLFLAGS} -c arch-lib/ctags ${bindir}/ctags
|
|
156 ${INSTALL_PROGRAM} ${INSTALLFLAGS} -c -m 1755 src/xemacs ${bindir}/xemacs
|
|
157 ${INSTALL_DATA} ${INSTALLFLAGS} -c -m 444 etc/emacs.1 ${mandir}/emacs.1
|
|
158 -rm -f ${bindir}/emacs
|
|
159 mv ${bindir}/xemacs ${bindir}/emacs
|
491
|
160
|
|
161 install.sysv: all mkdir lockdir
|
617
|
162 -set ${COPYDESTS} ; \
|
|
163 for dir in ${COPYDIR} ; do \
|
|
164 dest=$$1 ; shift ; \
|
|
165 if [ `/bin/pwd`/$${dir} != `(cd $${dest}; /bin/pwd)` ] ; then \
|
|
166 (cd $${dir}; find . -print | cpio -pdum ${dest} ) ; \
|
|
167 for subdir in `find $${dest} -type d ! -name RCS -print` ; do \
|
|
168 rm -rf $${subdir}/RCS ; \
|
|
169 rm -f $${subdir}/\#* ; \
|
|
170 rm -f $${subdir}/*~ ; \
|
|
171 done ; \
|
|
172 fi ; \
|
|
173 done
|
|
174 -cpset arch-lib/emacsclient ${bindir}/emacsclient 755 bin bin
|
|
175 -cpset arch-lib/etags ${bindir}/etags 755 bin bin
|
|
176 -cpset arch-lib/ctags ${bindir}/ctags 755 bin bin
|
|
177 -cpset etc/emacs.1 ${mandir}/emacs.1 444 bin bin
|
|
178 -/bin/rm -f ${bindir}/emacs
|
|
179 -cpset src/xemacs ${bindir}/emacs 1755 bin bin
|
491
|
180
|
|
181 install.xenix: all mkdir lockdir
|
617
|
182 -set ${COPYDESTS} ; \
|
|
183 for dir in ${COPYDIR} ; do \
|
|
184 dest=$$1 ; shift ; \
|
|
185 if [ `/bin/pwd`/$${dir} != `(cd $${dest}; /bin/pwd)` ] ; then \
|
|
186 (cd $${dir}; tar cf - . ) | (cd $${dest}; umask 0; tar xpf - ) ; \
|
|
187 for subdir in `find $${dest} -type d ! -name RCS -print` ; do \
|
|
188 rm -rf $${subdir}/RCS ; \
|
|
189 rm -f $${subdir}/\#* ; \
|
|
190 rm -f $${subdir}/*~ ; \
|
|
191 done ; \
|
|
192 fi ; \
|
|
193 done
|
|
194 cp arch-lib/etags arch-lib/ctags arch-lib/emacsclient ${bindir}
|
|
195 chmod 755 ${bindir}/etags ${bindir}/ctags ${bindir}/emacsclient
|
|
196 cp etc/emacs.1 ${mandir}/emacs.1
|
|
197 chmod 444 ${mandir}/emacs.1
|
|
198 -mv -f ${bindir}/emacs ${bindir}/emacs.old
|
|
199 cp src/xemacs ${bindir}/emacs
|
|
200 chmod 1755 ${bindir}/emacs
|
|
201 -rm -f ${bindir}/emacs.old
|
491
|
202
|
596
|
203 install.aix: all mkdir lockdir
|
617
|
204 -set ${COPYDESTS} ; \
|
|
205 for dir in ${COPYDIR} ; do \
|
|
206 dest=$$1 ; shift ; \
|
|
207 if [ `/bin/pwd`/$${dir} != `(cd $${dest}; /bin/pwd)` ] ; then \
|
|
208 (cd $${dir}; tar cf - . ) | (cd $${dest}; umask 0; tar xBf - ) ; \
|
|
209 for subdir in `find $${dest} -type d ! -name RCS -print` ; do \
|
|
210 rm -rf $${subdir}/RCS ; \
|
|
211 rm -f $${subdir}/\#* ; \
|
|
212 rm -f $${subdir}/*~ ; \
|
|
213 done ; \
|
|
214 fi ; \
|
|
215 done
|
|
216 ${INSTALL_PROGRAM} ${INSTALLFLAGS} -f ${bindir} etc/emacsclient
|
|
217 ${INSTALL_PROGRAM} ${INSTALLFLAGS} -f ${bindir} etc/etags
|
|
218 ${INSTALL_PROGRAM} ${INSTALLFLAGS} -f ${bindir} etc/ctags
|
|
219 ${INSTALL_PROGRAM} ${INSTALLFLAGS} -M 1755 -f ${bindir} src/xemacs
|
|
220 ${INSTALL_DATA} ${INSTALLFLAGS} -M 444 -f ${mandir} etc/emacs.1
|
|
221 -rm -f ${bindir}/emacs
|
|
222 mv ${bindir}/xemacs ${bindir}/emacs
|
596
|
223
|
617
|
224 # Build all the directories
|
491
|
225 mkdir: FRC
|
617
|
226 # If any of the directories are below ${emacsdir}, create it.
|
|
227 -for dir in ${COPYDESTS}; do \
|
|
228 case "$${dir}" in \
|
|
229 ${emacsdir}/* ) \
|
|
230 if [ ! -d ${emacsdir} ]; then \
|
|
231 -mkdir ${emacsdir} ; \
|
|
232 -chmod 777 ${emacsdir} ; \
|
|
233 fi ; \
|
|
234 break\
|
|
235 ;; \
|
|
236 esac ; \
|
|
237 done
|
|
238 -mkdir ${COPYDESTS}
|
|
239 -chmod 777 ${COPYDESTS}
|
491
|
240
|
|
241 lockdir:
|
617
|
242 # If the lockdir needs ${emacsdir}, create it.
|
|
243 -case "${lockdir}" in \
|
|
244 ${statedir}/* ) \
|
|
245 if [ ! -d ${emacsdir} ]; then \
|
|
246 -mkdir ${emacsdir} ; \
|
|
247 -chmod 777 ${emacsdir} ; \
|
|
248 fi \
|
|
249 ;; \
|
|
250 esac
|
491
|
251 -mkdir ${LOCKDIR}
|
|
252 -chmod 777 ${LOCKDIR}
|
|
253
|
|
254 FRC:
|
|
255
|
617
|
256 clean mostlyclean:
|
|
257 cd src; make clean
|
|
258 if [ `/bin/pwd` != `(cd ${DESTDIR}${LIBDIR}; /bin/pwd)` ] ; then \
|
|
259 cd etc; make clean; \
|
|
260 else true; \
|
|
261 fi
|
|
262 cd oldXMenu; make clean
|
|
263
|
|
264 distclean:
|
|
265 for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} distclean); done
|
|
266 -(cd lock; rm *)
|
|
267 -rm config.status config-tmp-*
|
|
268 -rm #*# *~
|
|
269
|
|
270 realclean:
|
|
271 for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} realclean); done
|
|
272 (cd lock; rm *)
|
|
273 rm config.status
|
|
274
|
|
275 TAGS tags: lib-src
|
491
|
276 cd src; ../arch-lib/etags *.[ch] ../lisp/*.el ../lisp/term/*.el
|
617
|
277
|
|
278 check:
|
|
279 @echo "We don't have any tests for GNU Emacs yet."
|
621
|
280
|
|
281 dist:
|
|
282 make-dist
|