0
|
1 # DIST: This is the distribution Makefile for XEmacs. configure can
|
|
2 # DIST: make most of the changes to this file you might want, so try
|
|
3 # DIST: that first.
|
|
4
|
|
5 # make all to compile and build XEmacs.
|
|
6 # make install to install it.
|
|
7 # make TAGS to update tags tables.
|
|
8 #
|
|
9 # make clean or make mostlyclean
|
|
10 # Delete all files from the current directory that are normally
|
|
11 # created by building the program. Don't delete the files that
|
|
12 # record the configuration. Also preserve files that could be made
|
|
13 # by building, but normally aren't because the distribution comes
|
|
14 # with them.
|
|
15 #
|
|
16 # Delete `.dvi' files here if they are not part of the distribution.
|
|
17 #
|
|
18 # make distclean
|
|
19 # Delete all files from the current directory that are created by
|
|
20 # configuring or building the program. If you have unpacked the
|
|
21 # source and built the program without creating any other files,
|
|
22 # `make distclean' should leave only the files that were in the
|
|
23 # distribution.
|
|
24 #
|
|
25 # make realclean
|
|
26 # Delete everything from the current directory that can be
|
|
27 # reconstructed with this Makefile. This typically includes
|
|
28 # everything deleted by distclean, plus more: C source files
|
|
29 # produced by Bison, tags tables, info files, and so on.
|
|
30 #
|
|
31 # make extraclean
|
|
32 # Still more severe - delete backup and autosave files, too.
|
|
33
|
|
34 SHELL = /bin/sh
|
|
35 @SET_MAKE@
|
|
36
|
|
37 # ==================== Things `configure' Might Edit ====================
|
|
38
|
|
39 CC=@CC@
|
|
40 CPP=@CPP@
|
|
41 C_SWITCH_SYSTEM=@c_switch_system@
|
|
42 LN_S=@LN_S@
|
|
43 CFLAGS=@CFLAGS@
|
|
44 C_SWITCH_X_SITE=@C_SWITCH_X_SITE@
|
|
45 LD_SWITCH_X_SITE=@LD_SWITCH_X_SITE@
|
|
46 YACC=@YACC@
|
|
47
|
|
48 ### These help us choose version- and architecture-specific directories
|
|
49 ### to install files in.
|
|
50
|
|
51 ### This should be the number of the XEmacs version we're building,
|
|
52 ### like `19.13' or `19.14'.
|
|
53 version=@version@
|
|
54
|
|
55 ### This should be the name of the configuration we're building XEmacs
|
|
56 ### for, like `mips-dec-ultrix' or `sparc-sun-sunos'.
|
|
57 configuration=@configuration@
|
|
58
|
|
59 ### Libraries which should be edited into lib-src/Makefile.
|
|
60 libsrc_libs=@libsrc_libs@
|
|
61
|
|
62 # ==================== Where To Install Things ====================
|
|
63
|
|
64 # The default location for installation. Everything is placed in
|
|
65 # subdirectories of this directory. The default values for many of
|
|
66 # the variables below are expressed in terms of this one, so you may
|
|
67 # not need to change them. This defaults to /usr/local.
|
|
68 prefix=@prefix@
|
|
69
|
|
70 # Like `prefix', but used for architecture-specific files.
|
|
71 exec_prefix=@exec_prefix@
|
|
72
|
|
73 # Where to install XEmacs and other binaries that people will want to
|
|
74 # run directly (like etags).
|
|
75 bindir=@bindir@
|
|
76
|
|
77 # Where to install architecture-independent data files. ${lispdir}
|
|
78 # and ${etcdir} are subdirectories of this.
|
|
79 datadir=@datadir@
|
|
80
|
|
81 # Where to install and expect the files that XEmacs modifies as it
|
|
82 # runs. These files are all architecture-independent. Right now, the
|
|
83 # only such data is the locking directory; ${lockdir} is a
|
|
84 # subdirectory of this.
|
|
85 statedir=@statedir@
|
|
86
|
|
87 # Where to install and expect executable files to be run by XEmacs
|
|
88 # rather than directly by users, and other architecture-dependent
|
|
89 # data. ${archlibdir} is a subdirectory of this.
|
|
90 libdir=@libdir@
|
|
91
|
|
92 # Where to install XEmacs's man pages, and what extension they should have.
|
|
93 mandir=@mandir@
|
|
94 manext=.1
|
|
95
|
|
96 # Where to install and expect the info files describing XEmacs. In the
|
|
97 # past, this defaulted to a subdirectory of ${prefix}/lib/xemacs, but
|
|
98 # since there are now many packages documented with the texinfo
|
|
99 # system, it is inappropriate to imply that it is part of XEmacs.
|
|
100 infodir=@infodir@
|
|
101
|
|
102 # This is set to 'yes' if the user specified the --infodir flag at
|
|
103 # configuration time.
|
|
104 infodir_user_defined=@infodir_user_defined@
|
|
105
|
|
106 # Where to find the source code. The source code for XEmacs's C kernel is
|
|
107 # expected to be in ${srcdir}/src, and the source code for XEmacs's
|
|
108 # utility programs is expected to be in ${srcdir}/lib-src. This is
|
|
109 # set by the configure script's `--srcdir' option.
|
|
110 srcdir=@srcdir@
|
|
111
|
|
112 # Tell make where to find source files; this is needed for the makefiles.
|
|
113 VPATH=@srcdir@
|
|
114
|
|
115 # ==================== XEmacs-specific directories ====================
|
|
116
|
|
117 # These variables hold the values XEmacs will actually use. They are
|
|
118 # based on the values of the standard Make variables above.
|
|
119
|
|
120 # Where to install the lisp files distributed with
|
|
121 # XEmacs. This includes the XEmacs version, so that the
|
|
122 # lisp files for different versions of XEmacs will install
|
|
123 # themselves in separate directories.
|
|
124 lispdir=@lispdir@
|
|
125
|
|
126 # This is set to 'yes' if the user specified the --lispdir or
|
|
127 # --datadir flag at configuration time.
|
|
128 lispdir_user_defined=@lispdir_user_defined@
|
|
129
|
|
130 # Directories XEmacs should search for lisp files specific
|
|
131 # to this site (i.e. customizations), before consulting
|
|
132 # ${lispdir}. This should be a colon-separated list of
|
|
133 # directories.
|
|
134 sitelispdir=@sitelispdir@
|
|
135
|
|
136 # Where XEmacs will search for its lisp files while
|
|
137 # building. This is only used during the process of
|
|
138 # compiling XEmacs, to help XEmacs find its lisp files
|
|
139 # before they've been installed in their final location.
|
|
140 # It's usually identical to lispdir, except that the
|
|
141 # entry for the directory containing the installed lisp
|
|
142 # files has been replaced with ../lisp. This should be a
|
|
143 # colon-separated list of directories.
|
|
144 buildlispdir=${srcdir}/lisp
|
|
145
|
|
146 # Where to install the other architecture-independent
|
|
147 # data files distributed with XEmacs (like the tutorial,
|
|
148 # the cookie recipes and the Zippy database). This path
|
|
149 # usually contains the XEmacs version number, so the data
|
|
150 # files for multiple versions of XEmacs may be installed
|
|
151 # at once.
|
|
152 etcdir=@etcdir@
|
|
153
|
|
154 # This is set to 'yes' if the user specified the --etcdir or
|
|
155 # --datadir flag at configuration time.
|
|
156 etcdir_user_defined=@etcdir_user_defined@
|
|
157
|
|
158 # Where to create and expect the locking directory, where
|
|
159 # the XEmacs locking code keeps track of which files are
|
|
160 # currently being edited.
|
|
161 lockdir=@lockdir@
|
|
162
|
|
163 # This is set to 'yes' if the user specified the --lockdir or
|
|
164 # --statedir flag at configuration time.
|
|
165 lockdir_user_defined=@lockdir_user_defined@
|
|
166
|
|
167 # Where to put executables to be run by XEmacs rather than
|
|
168 # the user. This path usually includes the XEmacs version
|
|
169 # and configuration name, so that multiple configurations
|
|
170 # for multiple versions of XEmacs may be installed at
|
|
171 # once.
|
|
172 archlibdir=@archlibdir@
|
|
173
|
|
174 # This is set to 'yes' if the user specified any of --exec-prefix,
|
|
175 # --libdir or --archlibdir at configuration time.
|
|
176 archlibdir_user_defined=@archlibdir_user_defined@
|
|
177
|
|
178 # ==================== Utility Programs for the Build ====================
|
|
179
|
|
180 # Allow the user to specify the install program.
|
|
181 INSTALL = @INSTALL@
|
|
182 INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
183 INSTALL_DATA = @INSTALL_DATA@
|
|
184
|
|
185 # ============================= Targets ==============================
|
|
186
|
|
187 # Subdirectories to make recursively. `lisp' is not included
|
|
188 # because the compiled lisp files are part of the distribution
|
|
189 # and you cannot remake them without installing XEmacs first.
|
|
190 MAKE_SUBDIR = lib-src lwlib dynodump src
|
|
191
|
|
192 # Subdirectories that can be made recursively.
|
|
193 SUBDIR = ${MAKE_SUBDIR} man
|
|
194
|
|
195 # The makefiles of the directories in $SUBDIR.
|
10
|
196 SUBDIR_MAKEFILES = lib-src/Makefile lwlib/Makefile dynodump/Makefile src/Makefile
|
0
|
197
|
|
198 # Subdirectories to install, and where they'll go.
|
|
199 # lib-src's makefile knows how to install it, so we don't do that here.
|
|
200 # When installing the info files, we need to do special things to
|
|
201 # avoid nuking an existing dir file, so we don't do that here;
|
|
202 # instead, we have written out explicit code in the `install' targets.
|
|
203 COPYDIR = ${srcdir}/etc ${srcdir}/lisp
|
|
204 COPYDESTS = ${etcdir} ${lispdir}
|
|
205
|
|
206 .NO_PARALLEL: src/paths.h src/Emacs.ad.h ${MAKE_SUBDIR} dump-elcs
|
|
207
|
|
208 all: src/paths.h src/Emacs.ad.h ${MAKE_SUBDIR}
|
|
209
|
|
210 # Convenience target for XEmacs beta testers
|
|
211 beta: clean all-elc
|
|
212
|
|
213 # Build XEmacs and recompile out-of-date and missing .elc files along
|
|
214 # the way.
|
|
215 all-elc: src/paths.h src/Emacs.ad.h lib-src lwlib dump-elcs src
|
|
216 sh ${srcdir}/lib-src/update-elc.sh
|
|
217
|
|
218 # Sub-target for all-elc.
|
|
219 dump-elcs: FRC.dump-elcs
|
|
220 cd src; $(MAKE) dump-elcs $(MFLAGS) \
|
|
221 CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}'
|
|
222
|
|
223 autoloads: src
|
|
224 sh ${srcdir}/lib-src/update-autoloads.sh
|
|
225
|
|
226 # We force the rebuilding of src/paths.h because the user might give
|
|
227 # different values for the various directories. Since we use
|
|
228 # move-if-change, src/paths.h only actually changes if the user did
|
|
229 # something notable, so the only unnecessary work we do is in building
|
|
230 # src/paths.h.tmp, which isn't much. Note that sed is not in /bin on
|
|
231 # 386bsd.
|
|
232 src/paths.h: Makefile ${srcdir}/src/paths.h.in FRC.src.paths.h
|
|
233 @echo "Producing \`src/paths.h' from \`src/paths.h.in'."
|
|
234 -rm -f src/paths.h.tmp
|
|
235 @cp ${srcdir}/src/paths.h.in src/paths.h.tmp
|
|
236 -chmod 0644 src/paths.h.tmp
|
|
237 @echo '#define PATH_PREFIX "${prefix}"' >> src/paths.h.tmp
|
|
238 @if [ x"${lispdir_user_defined}" = x"yes" ]; then \
|
|
239 echo '#define PATH_LOADSEARCH "${lispdir}"' >> src/paths.h.tmp;\
|
|
240 else \
|
|
241 echo '/* #define PATH_LOADSEARCH "${lispdir}" */' >>src/paths.h.tmp;\
|
|
242 fi
|
|
243 @if [ x"${archlibdir_user_defined}" = x"yes" ]; then \
|
|
244 echo '#define PATH_EXEC "${archlibdir}"' >> src/paths.h.tmp ;\
|
|
245 else \
|
|
246 echo '/* #define PATH_EXEC "${archlibdir}" */' >> src/paths.h.tmp ;\
|
|
247 fi
|
|
248 @if [ x"${etcdir_user_defined}" = x"yes" ]; then \
|
|
249 echo '#define PATH_DATA "${etcdir}"' >> src/paths.h.tmp ;\
|
|
250 else \
|
|
251 echo '/* #define PATH_DATA "${etcdir}" */' >> src/paths.h.tmp ;\
|
|
252 fi
|
|
253 @if [ x"${lockdir_user_defined}" = x"yes" ]; then \
|
|
254 echo '#define PATH_LOCK "${lockdir}"' >> src/paths.h.tmp ;\
|
|
255 else \
|
|
256 echo '/* #define PATH_LOCK "${lockdir}" */' >> src/paths.h.tmp ;\
|
|
257 fi
|
|
258 @if [ x"${infodir_user_defined}" = x"yes" ]; then \
|
|
259 echo '#define PATH_INFO "${infodir}"' >> src/paths.h.tmp ;\
|
|
260 else \
|
|
261 echo '/* #define PATH_INFO "${infodir}" */' >> src/paths.h.tmp ;\
|
|
262 fi
|
|
263 @sh ${srcdir}/move-if-change src/paths.h.tmp src/paths.h
|
|
264
|
|
265 # We have to force the building of Emacs.ad.h as well in order to get it
|
|
266 # updated correctly when VPATH is being used. Since we use move-if-change,
|
|
267 # it will only actually change if the user modified ${etcdir}/Emacs.ad.
|
|
268 src/Emacs.ad.h: ${srcdir}/etc/Emacs.ad
|
|
269 @echo "Producing \`src/Emacs.ad.h' from \`etc/Emacs.ad'."
|
|
270 -rm -f src/Emacs.ad.h
|
|
271 @(echo "/* Do not edit this file!" ; \
|
|
272 echo " Automatically generated from ${srcdir}/etc/Emacs.ad" ; \
|
|
273 echo " */" ; \
|
|
274 /bin/sh ${srcdir}/lib-src/ad2c ${srcdir}/etc/Emacs.ad ) > \
|
|
275 src/Emacs.ad.h
|
|
276
|
|
277 src: lib-src lwlib dynodump FRC.src
|
|
278 lib-src: FRC.lib-src
|
|
279 lwlib: FRC.lwlib
|
|
280 dynodump: FRC.dynodump
|
|
281
|
|
282 .RECURSIVE: ${SUBDIR}
|
|
283
|
28
|
284 ${SUBDIR}: ${SUBDIR_MAKEFILES} src/config.h src/puresize_adjust.h FRC
|
0
|
285 cd $@; $(MAKE) all $(MFLAGS) \
|
|
286 CC='${CC}' CFLAGS='${CFLAGS}' MAKE='${MAKE}'
|
|
287
|
|
288 Makefile: ${srcdir}/Makefile.in config.status
|
|
289 ./config.status
|
|
290
|
|
291 src/Makefile: ${srcdir}/src/Makefile.in.in config.status
|
|
292 ./config.status
|
|
293
|
|
294 lib-src/Makefile: ${srcdir}/lib-src/Makefile.in.in config.status
|
|
295 ./config.status
|
|
296
|
|
297 lwlib/Makefile: ${srcdir}/lwlib/Makefile.in.in config.status
|
|
298 ./config.status
|
|
299
|
|
300 dynodump/Makefile: ${srcdir}/dynodump/Makefile.in.in config.status
|
|
301 ./config.status
|
|
302
|
|
303 src/config.h: ${srcdir}/src/config.h.in
|
|
304 ./config.status
|
|
305
|
28
|
306 src/puresize_adjust.h: ${srcdir}/src/puresize.h
|
|
307 @echo "Resetting \`src/puresize_adjust.h'."
|
|
308 @echo '/* This file is generated by XEmacs, DO NOT MODIFY!!! */' > src/puresize_adjust.h
|
|
309 @echo '#define PURESIZE_ADJUSTMENT 0' >> src/puresize_adjust.h
|
|
310
|
|
311
|
0
|
312 # ==================== Installation ====================
|
|
313
|
|
314 ## If we let lib-src do its own installation, that means we
|
|
315 ## don't have to duplicate the list of utilities to install in
|
|
316 ## this Makefile as well.
|
|
317
|
|
318 ## On AIX, use tar xBf.
|
|
319 ## On Xenix, use tar xpf.
|
|
320
|
|
321 .PHONY: install install-arch-dep install-arch-indep mkdir
|
|
322
|
|
323 ## We delete each directory in ${COPYDESTS} before we copy into it;
|
|
324 ## that way, we can reinstall over directories that have been put in
|
|
325 ## place with their files read-only (perhaps because they are checked
|
|
326 ## into RCS). In order to make this safe, we make sure that the
|
|
327 ## source exists and is distinct from the destination.
|
|
328
|
|
329 ## FSF doesn't depend on `all', but rather on ${MAKE_SUBDIR}, so that
|
|
330 ## they "won't ever modify src/paths.h". But that means you can't do
|
|
331 ## 'make install' right off the bat because src/paths.h won't exist.
|
|
332 ## And, in XEmacs case, src/Emacs.ad.h won't exist either. I also
|
|
333 ## don't see the point in avoiding modifying paths.h. It creates an
|
|
334 ## inconsistency in the build process. So we go ahead and depend on
|
|
335 ## all. --cet
|
|
336
|
|
337 install: all install-arch-dep install-arch-indep;
|
|
338
|
|
339 install-arch-dep: mkdir
|
|
340 (cd lib-src; \
|
|
341 $(MAKE) install $(MFLAGS) prefix=${prefix} \
|
|
342 exec_prefix=${exec_prefix} bindir=${bindir} libdir=${libdir} \
|
|
343 archlibdir=${archlibdir})
|
|
344 if [ `(cd ${archlibdir}; /bin/pwd)` != `(cd ./lib-src; /bin/pwd)` ]; \
|
|
345 then \
|
|
346 echo "Copying lib-src/DOC-* ..." ; \
|
|
347 (cd ./lib-src; tar -cf - DOC-*)|(cd ${archlibdir}; umask 0; tar -xf - ); \
|
|
348 for subdir in `find ${archlibdir} -type d ! -name RCS ! -name SCCS ! -name CVS -print` ; do \
|
|
349 rm -rf $${subdir}/RCS ; \
|
|
350 rm -rf $${subdir}/CVS ; \
|
|
351 rm -rf $${subdir}/SCCS ; \
|
|
352 rm -f $${subdir}/\#* ; \
|
|
353 rm -f $${subdir}/*~ ; \
|
|
354 done ; \
|
|
355 else true; fi
|
|
356 ${INSTALL_PROGRAM} src/xemacs ${bindir}/xemacs-${version}
|
|
357 -chmod 0755 ${bindir}/xemacs-${version}
|
|
358 rm -f ${bindir}/xemacs
|
|
359 (cd ${bindir} ; ${LN_S} xemacs-${version} ./xemacs)
|
|
360
|
|
361 install-arch-indep: mkdir
|
|
362 -set ${COPYDESTS} ; \
|
|
363 for dir in ${COPYDIR} ; do \
|
|
364 if [ `(cd $$1 && pwd)` != `(cd $${dir} && pwd)` ] ; then \
|
|
365 echo "rm -rf $$1" ; \
|
|
366 fi ; \
|
|
367 shift ; \
|
|
368 done
|
|
369 -set ${COPYDESTS} ; \
|
|
370 mkdir ${COPYDESTS} ; \
|
|
371 for dir in ${COPYDIR} ; do \
|
|
372 dest=$$1 ; shift ; \
|
|
373 [ -d $${dir} ] \
|
|
374 && [ `(cd $${dir} && /bin/pwd)` != `(cd $${dest} && /bin/pwd)` ] \
|
|
375 && (echo "Copying $${dir}..." ; \
|
|
376 (cd $${dir}; tar -cf - . )|(cd $${dest};umask 022; tar -xf - );\
|
|
377 chmod 0755 $${dest}; \
|
|
378 for subdir in `find $${dest} -type d ! -name RCS ! -name SCCS ! -name CVS -print` ; do \
|
|
379 rm -rf $${subdir}/RCS ; \
|
|
380 rm -rf $${subdir}/CVS ; \
|
|
381 rm -rf $${subdir}/SCCS ; \
|
|
382 rm -f $${subdir}/\#* ; \
|
|
383 rm -f $${subdir}/*~ ; \
|
|
384 done) ; \
|
|
385 done
|
|
386 if [ `(cd ${srcdir}/info && /bin/pwd)` != `(cd ${infodir} && /bin/pwd)` ]; \
|
|
387 then \
|
|
388 (cd ${srcdir}/info ; \
|
|
389 if [ ! -f ${infodir}/dir ] && [ -f dir ]; then \
|
|
390 ${INSTALL_DATA} ${srcdir}/info/dir ${infodir}/dir ; \
|
|
391 fi ; \
|
10
|
392 for f in *.info* ; do \
|
0
|
393 ${INSTALL_DATA} ${srcdir}/info/$$f ${infodir}/$$f ; \
|
|
394 chmod 0644 ${infodir}/$$f; \
|
12
|
395 gzip -f9 ${infodir}/$$f; \
|
0
|
396 done); \
|
|
397 else true; fi
|
|
398 cd ${srcdir}/etc; for page in xemacs etags ctags gnuserv \
|
|
399 gnuclient gnuattach gnudoit ; do \
|
|
400 ${INSTALL_DATA} ${srcdir}/etc/$${page}.1 ${mandir}/$${page}${manext} ; \
|
|
401 chmod 0644 ${mandir}/$${page}${manext} ; \
|
|
402 done
|
|
403
|
|
404 MAKEPATH=./lib-src/make-path
|
|
405 ### Build all the directories we're going to install XEmacs in. Since
|
|
406 ### we may be creating several layers of directories (for example,
|
|
407 ### /usr/local/lib/xemacs-19.14/mips-dec-ultrix4.2), we use make-path
|
|
408 ### instead of mkdir. Not all systems' mkdirs have the `-p' flag.
|
|
409 mkdir: FRC.mkdir
|
|
410 ${MAKEPATH} ${COPYDESTS} ${lockdir} ${infodir} ${mandir} \
|
|
411 ${bindir} ${datadir} ${libdir} ${sitelispdir}
|
|
412 -chmod 0777 ${lockdir}
|
|
413
|
|
414 ### Delete all the installed files that the `install' target would
|
|
415 ### create (but not the noninstalled files such as `make all' would
|
|
416 ### create).
|
|
417 ###
|
|
418 ### Don't delete the lisp and etc directories if they're in the source tree.
|
|
419 #### This target has not been updated in sometime and until it is it
|
|
420 #### would be extremely dangerous for anyone to use it.
|
|
421 #uninstall:
|
|
422 # (cd lib-src; \
|
|
423 # $(MAKE) $(MFLAGS) uninstall \
|
|
424 # prefix=${prefix} exec_prefix=${exec_prefix} \
|
|
425 # bindir=${bindir} libdir=${libdir} archlibdir=${archlibdir})
|
|
426 # for dir in ${lispdir} ${etcdir} ; do \
|
|
427 # case `(cd $${dir} ; pwd)` in \
|
|
428 # `(cd ${srcdir} ; pwd)`* ) ;; \
|
|
429 # * ) rm -rf $${dir} ;; \
|
|
430 # esac ; \
|
|
431 # case $${dir} in \
|
|
432 # ${datadir}/xemacs/${version}/* ) \
|
|
433 # rm -rf ${datadir}/xemacs/${version} \
|
|
434 # ;; \
|
|
435 # esac ; \
|
|
436 # done
|
|
437 # (cd ${infodir} && rm -f cl* xemacs* forms* info* vip*)
|
|
438 # (cd ${mandir} && rm -f xemacs.1 etags.1 ctags.1 gnuserv.1)
|
|
439 # (cd ${bindir} && rm -f xemacs-${version} xemacs)
|
|
440
|
|
441
|
|
442 ### Some makes seem to remember that they've built something called FRC,
|
|
443 ### so you can only use a given FRC once per makefile.
|
|
444 FRC FRC.src.paths.h FRC.src FRC.lib-src FRC.lwlib FRC.mkdir FRC.dump-elcs:
|
|
445 FRC.dynodump:
|
|
446 FRC.mostlyclean FRC.clean FRC.distclean FRC.realclean:
|
|
447
|
|
448 # ==================== Cleaning up and miscellanea ====================
|
|
449
|
|
450 .PHONY: mostlyclean clean distclean realclean extraclean
|
|
451
|
|
452 ### `mostlyclean'
|
|
453 ### Like `clean', but may refrain from deleting a few files that people
|
|
454 ### normally don't want to recompile. For example, the `mostlyclean'
|
|
455 ### target for GCC does not delete `libgcc.a', because recompiling it
|
|
456 ### is rarely necessary and takes a lot of time.
|
|
457 mostlyclean: FRC.mostlyclean
|
|
458 (cd src && $(MAKE) $(MFLAGS) mostlyclean)
|
|
459 (cd lib-src && $(MAKE) $(MFLAGS) mostlyclean)
|
|
460 (cd lwlib && $(MAKE) $(MFLAGS) mostlyclean)
|
|
461 (cd dynodump && $(MAKE) $(MFLAGS) mostlyclean)
|
|
462 -(cd man && $(MAKE) $(MFLAGS) mostlyclean)
|
|
463
|
|
464 ### `clean'
|
|
465 ### Delete all files from the current directory that are normally
|
|
466 ### created by building the program. Don't delete the files that
|
|
467 ### record the configuration. Also preserve files that could be made
|
|
468 ### by building, but normally aren't because the distribution comes
|
|
469 ### with them.
|
|
470 ###
|
|
471 ### Delete `.dvi' files here if they are not part of the distribution.
|
|
472 clean: FRC.clean
|
|
473 (cd src && $(MAKE) $(MFLAGS) clean)
|
|
474 (cd lib-src && $(MAKE) $(MFLAGS) clean)
|
|
475 (cd lwlib && $(MAKE) $(MFLAGS) clean)
|
|
476 (cd dynodump && $(MAKE) $(MFLAGS) clean)
|
|
477 -(cd man && $(MAKE) $(MFLAGS) clean)
|
|
478
|
|
479 ### `distclean'
|
|
480 ### Delete all files from the current directory that are created by
|
|
481 ### configuring or building the program. If you have unpacked the
|
|
482 ### source and built the program without creating any other files,
|
|
483 ### `make distclean' should leave only the files that were in the
|
|
484 ### distribution.
|
|
485 top_distclean=\
|
|
486 rm -f config.status config-tmp-* build-install ; \
|
|
487 rm -f Makefile ${SUBDIR_MAKEFILES}; \
|
|
488 (cd lock && rm -f *)
|
|
489
|
|
490 distclean: FRC.distclean
|
26
|
491 -([ ! -d lock ] && mkdir lock)
|
|
492 -([ ! -d site-lisp ] && mkdir site-lisp)
|
0
|
493 (cd src && $(MAKE) $(MFLAGS) distclean)
|
|
494 (cd lib-src && $(MAKE) $(MFLAGS) distclean)
|
|
495 (cd lwlib && $(MAKE) $(MFLAGS) distclean)
|
|
496 (cd dynodump && $(MAKE) $(MFLAGS) distclean)
|
|
497 -(cd man && $(MAKE) $(MFLAGS) distclean)
|
|
498 -${top_distclean}
|
|
499
|
|
500 ### `realclean'
|
|
501 ### Delete everything from the current directory that can be
|
|
502 ### reconstructed with this Makefile. This typically includes
|
|
503 ### everything deleted by distclean, plus more: C source files
|
|
504 ### produced by Bison, tags tables, info files, and so on.
|
|
505 ###
|
|
506 ### One exception, however: `make realclean' should not delete
|
|
507 ### `configure' even if `configure' can be remade using a rule in the
|
|
508 ### Makefile. More generally, `make realclean' should not delete
|
|
509 ### anything that needs to exist in order to run `configure' and then
|
|
510 ### begin to build the program.
|
|
511 realclean: FRC.realclean
|
|
512 (cd src && $(MAKE) $(MFLAGS) realclean)
|
|
513 (cd lib-src && $(MAKE) $(MFLAGS) realclean)
|
|
514 (cd lwlib && $(MAKE) $(MFLAGS) realclean)
|
|
515 (cd dynodump && $(MAKE) $(MFLAGS) realclean)
|
|
516 -(cd man && $(MAKE) $(MFLAGS) realclean)
|
|
517 -${top_distclean}
|
|
518
|
|
519 ### This doesn't actually appear in the coding standards, but Karl
|
|
520 ### says GCC supports it, and that's where the configuration part of
|
|
521 ### the coding standards seem to come from. It's like distclean, but
|
|
522 ### it deletes backup and autosave files too.
|
|
523 extraclean:
|
|
524 (cd src && $(MAKE) $(MFLAGS) extraclean)
|
|
525 (cd lib-src && $(MAKE) $(MFLAGS) extraclean)
|
|
526 (cd lwlib && $(MAKE) $(MFLAGS) extraclean)
|
|
527 (cd dynodump && $(MAKE) $(MFLAGS) extraclean)
|
|
528 -(cd man && $(MAKE) $(MFLAGS) extraclean)
|
|
529 -rm -f *~ \#*
|
|
530 -${top_distclean}
|
|
531
|
|
532 ### Unlocking and relocking. The idea of these productions is to reduce
|
|
533 ### hassles when installing an incremental tar of XEmacs. Do `make unlock'
|
|
534 ### before unlocking the file to take the write locks off all sources so
|
|
535 ### that tar xvof will overwrite them without fuss. Then do `make relock'
|
|
536 ### afterward so that VC mode will know which files should be checked in
|
|
537 ### if you want to mung them.
|
|
538 ###
|
|
539 ### Note: it's no disaster if these productions miss a file or two; tar
|
|
540 ### and VC will swiftly let you know if this happens, and it is easily
|
|
541 ### corrected.
|
|
542 SOURCES = ChangeLog GETTING.GNU.SOFTWARE INSTALL Makefile.in PROBLEMS \
|
|
543 README build-install.in configure make-dist move-if-change
|
|
544
|
|
545 .PHONY: unlock relock
|
|
546
|
|
547 unlock:
|
|
548 chmod u+w $(SOURCES) cpp/*
|
|
549 -(cd elisp && chmod u+w Makefile README *.texi)
|
|
550 (cd etc && $(MAKE) $(MFLAGS) unlock)
|
|
551 (cd lib-src && $(MAKE) $(MFLAGS) unlock)
|
|
552 (cd lisp && $(MAKE) $(MFLAGS) unlock)
|
|
553 (cd lisp/term && chmod u+w README *.el)
|
|
554 (cd man && chmod u+w *texi* ChangeLog split-man)
|
|
555 (cd lwlib && chmod u+w *.[ch] Makefile.in.in)
|
|
556 (cd src && $(MAKE) $(MFLAGS) unlock)
|
|
557
|
|
558 relock:
|
|
559 chmod u-w $(SOURCES) cpp/*
|
|
560 -(cd elisp && chmod u-w Makefile README *.texi)
|
|
561 (cd etc && $(MAKE) $(MFLAGS) relock)
|
|
562 (cd lib-src && $(MAKE) $(MFLAGS) relock)
|
|
563 (cd lisp && $(MAKE) $(MFLAGS) relock)
|
|
564 (cd lisp/term && chmod u+w README *.el)
|
|
565 (cd man && chmod u+w *texi* ChangeLog split-man)
|
|
566 (cd lwlib && chmod u+w *.[ch] Makefile.in.in)
|
|
567 (cd src && $(MAKE) $(MFLAGS) relock)
|
|
568
|
|
569 .PHONY: TAGS tags check dist
|
|
570
|
|
571 TAGS tags:
|
|
572 @echo "If you don't have a copy of etags around, then do 'make lib-src' first."
|
|
573 @PATH=`pwd`/lib-src:$$PATH ; echo "Using etags from `which etags`."
|
|
574 PATH=`pwd`/lib-src:$$PATH ; cd ${srcdir} ; \
|
|
575 etags --regex='| /[ ]*DEFVAR_[A-Z_ (]+"\([^\"]+\)"/|' src/*.[ch] ; \
|
|
576 for d in `find lisp -name SCCS -prune -o -name RCS -prune -o -type d -print` ; do (cd $$d ; if [ "`echo *.el`" != "*.el" ] ; then etags -a -o ${srcdir}/TAGS *.el ; fi ) ; done ; \
|
|
577 etags -a lwlib/*.[ch]
|
|
578
|
|
579 check:
|
|
580 @echo "We don't have any tests for XEmacs yet."
|
|
581
|
|
582 dist:
|
|
583 cd ${srcdir} && make-dist
|
|
584
|
|
585 .PHONY: info dvi
|
|
586 force-info:
|
|
587 info: force-info
|
|
588 (cd ${srcdir}/man && $(MAKE) $(MFLAGS) info)
|
|
589
|
|
590 dvi:
|
|
591 (cd ${srcdir}/man && $(MAKE) $(MFLAGS) dvi)
|