(gud-dbx-find-file): Find correct source file.
[bpt/emacs.git] / Makefile.in
CommitLineData
46947372
JB
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.
86a5659e 4
46947372
JB
5# make all to compile and build Emacs.
6# make install to install it.
78008d14 7# make TAGS to update tags tables.
86a5659e 8#
78008d14
JB
9# make clean or make mostlyclean
10# Delete all files from the current directory that are normally
868e080d 11# created by building the program. Don't delete the files that
78008d14
JB
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#
26873b72 25# make maintainer-clean
78008d14
JB
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.
86a5659e
JB
33
34SHELL = /bin/sh
2dc44cb5
RS
35
36# If Make doesn't predefine MAKE, set it here.
37@SET_MAKE@
86a5659e 38
78008d14 39# ==================== Things `configure' Might Edit ====================
86a5659e 40
c75ff9db 41CC=@CC@
d4acf74f 42CPP=@CPP@
c75ff9db 43C_SWITCH_SYSTEM=@c_switch_system@
d3245f70 44ALLOCA=@ALLOCA@
b6472fc1
JB
45LN_S=@LN_S@
46CFLAGS=@CFLAGS@
46af2ed8 47C_SWITCH_X_SITE=@C_SWITCH_X_SITE@
09b89128 48LD_SWITCH_X_SITE=@LD_SWITCH_X_SITE@
4b5a51c1 49YACC=@YACC@
78008d14
JB
50
51### These help us choose version- and architecture-specific directories
52### to install files in.
53
54### This should be the number of the Emacs version we're building,
55### like `18.59' or `19.0'.
c75ff9db 56version=@version@
78008d14
JB
57
58### This should be the name of the configuration we're building Emacs
59### for, like `mips-dec-ultrix' or `sparc-sun-sunos'.
c75ff9db
JB
60configuration=@configuration@
61
78008d14
JB
62# ==================== Where To Install Things ====================
63
46947372 64# The default location for installation. Everything is placed in
78008d14
JB
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
8d467c70
JB
67# not need to change them. This defaults to /usr/local.
68prefix=@prefix@
86a5659e 69
78008d14 70# Like `prefix', but used for architecture-specific files.
86ddcc58 71exec_prefix=@exec_prefix@
78008d14 72
46947372
JB
73# Where to install Emacs and other binaries that people will want to
74# run directly (like etags).
0e265b72 75bindir=@bindir@
86a5659e 76
868e080d 77# Where to install architecture-independent data files. ${lispdir}
78008d14 78# and ${etcdir} are subdirectories of this.
0e265b72 79datadir=@datadir@
0c22fbca
JB
80
81# Where to install and expect the files that Emacs modifies as it
868e080d 82# runs. These files are all architecture-independent. Right now, the
78008d14
JB
83# only such data is the locking directory; ${lockdir} is a
84# subdirectory of this.
3e74e344 85sharedstatedir=@sharedstatedir@
0c22fbca
JB
86
87# Where to install and expect executable files to be run by Emacs
88# rather than directly by users, and other architecture-dependent
868e080d 89# data. ${archlibdir} is a subdirectory of this.
2fd54e64 90libexecdir=@libexecdir@
0c22fbca
JB
91
92# Where to install Emacs's man pages, and what extension they should have.
0e265b72 93mandir=@mandir@
0c22fbca 94manext=.1
88e7bbf1 95man1dir=$(mandir)/man1
0c22fbca
JB
96
97# Where to install and expect the info files describing Emacs. In the
98# past, this defaulted to a subdirectory of ${prefix}/lib/emacs, but
99# since there are now many packages documented with the texinfo
100# system, it is inappropriate to imply that it is part of Emacs.
0e265b72 101infodir=@infodir@
86a5659e 102
b2f3c6b2
RS
103# Where to look for bitmap files.
104bitmapdir=@bitmapdir@
105
00c29909 106# Where to find the source code. The source code for Emacs's C kernel is
78008d14
JB
107# expected to be in ${srcdir}/src, and the source code for Emacs's
108# utility programs is expected to be in ${srcdir}/lib-src. This is
109# set by the configure script's `--srcdir' option.
d3245f70 110srcdir=@srcdir@
86a5659e 111
f854bb66
RM
112# Tell make where to find source files; this is needed for the makefiles.
113VPATH=@srcdir@
114
0c22fbca
JB
115# ==================== Emacs-specific directories ====================
116
78008d14
JB
117# These variables hold the values Emacs will actually use. They are
118# based on the values of the standard Make variables above.
119
0e265b72
BF
120# Where to install the lisp files distributed with
121# Emacs. This includes the Emacs version, so that the
122# lisp files for different versions of Emacs will install
123# themselves in separate directories.
124lispdir=@lispdir@
d3245f70 125
0e265b72
BF
126# Directories Emacs should search for lisp files specific
127# to this site (i.e. customizations), before consulting
128# ${lispdir}. This should be a colon-separated list of
129# directories.
130locallisppath=@locallisppath@
d3245f70
JB
131
132# Where Emacs will search to find its lisp files. Before
133# changing this, check to see if your purpose wouldn't
134# better be served by changing locallisppath. This
46947372 135# should be a colon-separated list of directories.
0e265b72 136lisppath=@lisppath@
86a5659e 137
d3245f70
JB
138# Where Emacs will search for its lisp files while
139# building. This is only used during the process of
140# compiling Emacs, to help Emacs find its lisp files
141# before they've been installed in their final location.
90ac71dc
RS
142# It's usually identical to lisppath, except that
143# it does not include locallisppath, and the
d3245f70
JB
144# entry for the directory containing the installed lisp
145# files has been replaced with ../lisp. This should be a
146# colon-separated list of directories.
3dbc7e32 147buildlisppath=${srcdir}/lisp
86a5659e 148
0e265b72
BF
149# Where to install the other architecture-independent
150# data files distributed with Emacs (like the tutorial,
151# the cookie recipes and the Zippy database). This path
152# usually contains the Emacs version number, so the data
153# files for multiple versions of Emacs may be installed
154# at once.
155etcdir=@etcdir@
156
157# Where to create and expect the locking directory, where
158# the Emacs locking code keeps track of which files are
159# currently being edited.
160lockdir=@lockdir@
161
162# Where to put executables to be run by Emacs rather than
163# the user. This path usually includes the Emacs version
164# and configuration name, so that multiple configurations
165# for multiple versions of Emacs may be installed at
166# once.
167archlibdir=@archlibdir@
a34902ab 168
e408046f
KH
169# Where to put the docstring file.
170docdir=@docdir@
171
46947372
JB
172# ==================== Utility Programs for the Build ====================
173
174# Allow the user to specify the install program.
19697295 175INSTALL = @INSTALL@
86ddcc58
JB
176INSTALL_PROGRAM = @INSTALL_PROGRAM@
177INSTALL_DATA = @INSTALL_DATA@
46947372 178
46947372 179# ============================= Targets ==============================
86a5659e 180
9ef7f9f0
KH
181# What emacs should be called when installed.
182EMACS = emacs
183
86a5659e
JB
184# Subdirectories to make recursively. `lisp' is not included
185# because the compiled lisp files are part of the distribution
186# and you cannot remake them without installing Emacs first.
46947372 187SUBDIR = lib-src src
86a5659e 188
78008d14 189# The makefiles of the directories in $SUBDIR.
dffd6dac 190SUBDIR_MAKEFILES = lib-src/Makefile man/Makefile src/Makefile oldXMenu/Makefile lwlib/Makefile
78008d14 191
83f6a565
JB
192# Subdirectories to install, and where they'll go.
193# lib-src's makefile knows how to install it, so we don't do that here.
194# When installing the info files, we need to do special things to
195# avoid nuking an existing dir file, so we don't do that here;
196# instead, we have written out explicit code in the `install' targets.
78c7997f
RS
197COPYDIR = ${srcdir}/etc ${srcdir}/lisp
198COPYDESTS = ${etcdir} ${lispdir}
86a5659e 199
8672a560 200all: paths-force ${SUBDIR}
86a5659e 201
309848ba 202removenullpaths=sed -e 's/^://g' -e 's/:$$//g' -e 's/::/:/g'
46947372 203
8672a560 204# Note that sed is not in /bin on 386bsd.
d58c5947
RS
205src/paths.h: Makefile ${srcdir}/src/paths.in
206 @echo "Producing \`src/paths.h' from \`src/paths.in'."
8672a560
RS
207 @(lisppath=`echo ${lisppath} | ${removenullpaths}` ; \
208 buildlisppath=`echo ${buildlisppath} | ${removenullpaths}` ; \
8d61b1e0 209 sed < ${srcdir}/src/paths.in > paths.h.$$$$ \
8672a560
RS
210 -e 's;\(#.*PATH_LOADSEARCH\).*$$;\1 "'$${lisppath}'";' \
211 -e 's;\(#.*PATH_DUMPLOADSEARCH\).*$$;\1 "'$${buildlisppath}'";' \
212 -e 's;\(#.*PATH_EXEC\).*$$;\1 "${archlibdir}";' \
213 -e 's;\(#.*PATH_INFO\).*$$;\1 "${infodir}";' \
214 -e 's;\(#.*PATH_DATA\).*$$;\1 "${etcdir}";' \
b2f3c6b2 215 -e 's;\(#.*PATH_BITMAPS\).*$$;\1 "${bitmapdir}";' \
8672a560 216 -e 's;\(#.*PATH_DOC\).*$$;\1 "${docdir}";' \
270cc80e 217 -e 's;\(#.*PATH_LOCK\).*$$;\1 "${lockdir}/";') && \
8d61b1e0 218 ${srcdir}/move-if-change paths.h.$$$$ src/paths.h
8672a560
RS
219
220# For `make all',
221# we force the rebuilding of src/paths.h because the user might give
78008d14
JB
222# make different values for the various directories. Since we use
223# move-if-change, src/paths.h only actually changes if the user did
224# something notable, so the only unnecessary work we do is in building
8d61b1e0 225# paths.h.$$, which isn't much.
692f9ac6 226# Note that sed is not in /bin on 386bsd.
0bdd1e86
RS
227# We depend on src/paths.h here to prevent simultaneous execution of
228# that rule and this one, in a parallel make.
229# It is possible for paths.h to be updated twice--but that would happen anyway.
230paths-force: FRC src/paths.h
d58c5947 231 @echo "Producing \`src/paths.h' from \`src/paths.in'."
7987a169
JB
232 @(lisppath=`echo ${lisppath} | ${removenullpaths}` ; \
233 buildlisppath=`echo ${buildlisppath} | ${removenullpaths}` ; \
8d61b1e0 234 sed < ${srcdir}/src/paths.in > paths.h.$$$$ \
7987a169
JB
235 -e 's;\(#.*PATH_LOADSEARCH\).*$$;\1 "'$${lisppath}'";' \
236 -e 's;\(#.*PATH_DUMPLOADSEARCH\).*$$;\1 "'$${buildlisppath}'";' \
237 -e 's;\(#.*PATH_EXEC\).*$$;\1 "${archlibdir}";' \
8b14d296 238 -e 's;\(#.*PATH_INFO\).*$$;\1 "${infodir}";' \
7987a169 239 -e 's;\(#.*PATH_DATA\).*$$;\1 "${etcdir}";' \
b2f3c6b2 240 -e 's;\(#.*PATH_BITMAPS\).*$$;\1 "${bitmapdir}";' \
e408046f 241 -e 's;\(#.*PATH_DOC\).*$$;\1 "${docdir}";' \
270cc80e 242 -e 's;\(#.*PATH_LOCK\).*$$;\1 "${lockdir}/";') && \
8d61b1e0 243 ${srcdir}/move-if-change paths.h.$$$$ src/paths.h
86a5659e 244
05ed817f 245src: lib-src FRC src/paths.h
a874c104 246
485c9046
RS
247# This ought to depend on src/paths.h, so that in parallel make
248# src/paths.h will be available for the compilations in lib-src.
249# But that causes trouble in `make install' if a different prefix
250# is specified at that time.
05ed817f 251lib-src: FRC src/paths.h
86a5659e
JB
252
253.RECURSIVE: ${SUBDIR}
254
78008d14 255${SUBDIR}: ${SUBDIR_MAKEFILES} FRC
0e265b72 256 cd $@; $(MAKE) all $(MFLAGS) \
7c811eec
RS
257 CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \
258 LDFLAGS='${LDFLAGS}' MAKE='${MAKE}'
0e265b72 259
8672a560 260blessmail: ${SUBDIR_MAKEFILES} src FRC
df8bde8b
RS
261 cd lib-src; $(MAKE) maybe-blessmail $(MFLAGS) \
262 MAKE='${MAKE}' archlibdir='$(archlibdir)'
d541babe 263
0e265b72
BF
264Makefile: Makefile.in config.status
265 ./config.status
266
d58c5947 267src/Makefile: src/Makefile.in config.status
0e265b72
BF
268 ./config.status
269
270lib-src/Makefile: lib-src/Makefile.in config.status
271 ./config.status
272
273oldXMenu/Makefile: oldXMenu/Makefile.in config.status
78008d14
JB
274 ./config.status
275
98dfba1b
RS
276lwlib/Makefile: lwlib/Makefile.in config.status
277 ./config.status
278
78008d14
JB
279# ==================== Installation ====================
280
dbc4e1c1
JB
281## If we let lib-src do its own installation, that means we
282## don't have to duplicate the list of utilities to install in
283## this Makefile as well.
d3245f70 284
3dbc7e32
JB
285## On AIX, use tar xBf.
286## On Xenix, use tar xpf.
287
9ef7f9f0 288.PHONY: install mkdir
98dfba1b 289
d3245f70
JB
290## We delete each directory in ${COPYDESTS} before we copy into it;
291## that way, we can reinstall over directories that have been put in
292## place with their files read-only (perhaps because they are checked
293## into RCS). In order to make this safe, we make sure that the
294## source exists and is distinct from the destination.
653ddcc3
RS
295## We don't depend on `all', but rather on ${SUBDIR}, so that we won't
296## ever modify src/paths.h.
a5038ae5
RS
297install: ${SUBDIR} install-arch-dep install-arch-indep blessmail
298 @true
8b14d296 299
af1d3b64
RS
300### Note that we copy the DOC-* files from the build etc directory
301### as well as lots of things from ${srcdir}/etc.
3be1f08e 302install-arch-dep: mkdir
8b14d296 303 (cd lib-src; \
0e265b72 304 $(MAKE) install $(MFLAGS) prefix=${prefix} \
2fd54e64
RS
305 exec_prefix=${exec_prefix} bindir=${bindir} \
306 libexecdir=${libexecdir} archlibdir=${archlibdir})
08068cb6
RS
307 ${INSTALL_PROGRAM} src/emacs ${bindir}/emacs-${version}
308 -chmod 1755 ${bindir}/emacs-${version}
9ef7f9f0
KH
309 rm -f ${bindir}/$(EMACS)
310 -ln ${bindir}/emacs-${version} ${bindir}/$(EMACS)
08068cb6 311
3be1f08e
RS
312### Note that we copy the DOC-* files from the build etc directory
313### as well as lots of things from ${srcdir}/etc.
1eb9aca7
RS
314### Note that we copy DOC* and then delete DOC
315### as a workaround for a bug in tar on Ultrix 4.2.
0cf61204 316
08068cb6 317install-arch-indep: mkdir
46947372 318 -set ${COPYDESTS} ; \
005775ce 319 for dir in ${COPYDIR} ; do \
8672a560 320 if [ `(cd $$1 && /bin/pwd)` != `(cd $${dir} && /bin/pwd)` ] ; then \
88190b54 321 rm -rf $$1 ; \
005775ce 322 fi ; \
335bb18d 323 shift ; \
005775ce
JB
324 done
325 -set ${COPYDESTS} ; \
a5038ae5
RS
326 mkdir ${COPYDESTS} ; \
327 chmod ugo+rx ${COPYDESTS} ; \
46947372
JB
328 for dir in ${COPYDIR} ; do \
329 dest=$$1 ; shift ; \
d3245f70 330 [ -d $${dir} ] \
8fd812d1 331 && [ `(cd $${dir} && /bin/pwd)` != `(cd $${dest} && /bin/pwd)` ] \
3dbc7e32 332 && (echo "Copying $${dir}..." ; \
5d9e58e8 333 (cd $${dir}; tar -cf - . )|(cd $${dest};umask 022; tar -xvf - ); \
d3245f70
JB
334 for subdir in `find $${dest} -type d ! -name RCS -print` ; do \
335 rm -rf $${subdir}/RCS ; \
336 rm -rf $${subdir}/CVS ; \
337 rm -f $${subdir}/\#* ; \
3d4be9d6 338 rm -f $${subdir}/.\#* ; \
d3245f70 339 rm -f $${subdir}/*~ ; \
0ff7e78f 340 rm -f $${subdir}/*.orig ; \
d3245f70 341 done) ; \
46947372 342 done
b2f3c6b2 343 -rm -f ${lispdir}/subdirs.el
b4594994 344 $(srcdir)/update-subdirs ${lispdir}
3be1f08e
RS
345 if [ `(cd ./etc; /bin/pwd)` != `(cd ${docdir}; /bin/pwd)` ]; \
346 then \
969f1735 347 echo "Copying etc/DOC-* ..." ; \
1eb9aca7
RS
348 (cd etc; tar -cf - DOC*)|(cd ${docdir}; umask 0; tar -xvf - ); \
349 (cd $(docdir); rm DOC) \
3be1f08e 350 else true; fi
8672a560 351 thisdir=`/bin/pwd`; \
21e8e1db 352 if [ `(cd ${srcdir}/info && /bin/pwd)` != `(cd ${infodir} && /bin/pwd)` ]; \
5e9e88fd 353 then \
469dd2ef 354 (cd ${infodir}; \
27116657 355 if [ -f dir ] && [ ! -f dir.old ]; then mv -f dir dir.old; \
469dd2ef
RS
356 else mv -f dir dir.bak; fi; \
357 cd ${srcdir}/info ; \
358 (cd $${thisdir}; ${INSTALL_DATA} ${srcdir}/info/dir ${infodir}/dir); \
1eb9aca7 359 for f in cl* dired-x* ediff* emacs* forms* gnus* info* mh-e* sc* vip*; do \
d59d49d3 360 (cd $${thisdir}; ${INSTALL_DATA} ${srcdir}/info/$$f ${infodir}/$$f); \
ce0b6622 361 done); \
21e8e1db 362 else true; fi
8672a560 363 thisdir=`/bin/pwd`; cd ${srcdir}/etc; for page in emacs etags ctags ; do \
88e7bbf1 364 (cd $${thisdir}; ${INSTALL_DATA} ${srcdir}/etc/$${page}.1 ${man1dir}/$${page}${manext}); \
868e080d 365 done
badb0a97 366
868e080d 367### Build all the directories we're going to install Emacs in. Since
78008d14 368### we may be creating several layers of directories (for example,
614b45a7 369### /usr/local/lib/emacs/19.0/mips-dec-ultrix4.2), we use mkinstalldirs
6784fb67 370### instead of mkdir. Not all systems' mkdir programs have the `-p' flag.
05ed817f 371mkdir: FRC
88e7bbf1 372 $(srcdir)/mkinstalldirs ${COPYDESTS} ${lockdir} ${infodir} ${man1dir} \
2fd54e64 373 ${bindir} ${datadir} ${docdir} ${libexecdir} \
309848ba 374 `echo ${locallisppath} | sed 's/:/ /g'`
dffd6dac 375 -chmod a+rwx ${lockdir}
86a5659e 376
d4acf74f
JB
377### Delete all the installed files that the `install' target would
378### create (but not the noninstalled files such as `make all' would
379### create).
44257b1a
JB
380###
381### Don't delete the lisp and etc directories if they're in the source tree.
d4acf74f 382uninstall:
44257b1a 383 (cd lib-src; \
0e265b72 384 $(MAKE) $(MFLAGS) uninstall \
44257b1a 385 prefix=${prefix} exec_prefix=${exec_prefix} \
2fd54e64 386 bindir=${bindir} libexecdir=${libexecdir} archlibdir=${archlibdir})
44257b1a 387 for dir in ${lispdir} ${etcdir} ; do \
726d0798 388 if [ -d $${dir} ]; then \
8672a560
RS
389 case `(cd $${dir} ; /bin/pwd)` in \
390 `(cd ${srcdir} ; /bin/pwd)`* ) ;; \
726d0798
RS
391 * ) rm -rf $${dir} ;; \
392 esac ; \
393 case $${dir} in \
394 ${datadir}/emacs/${version}/* ) \
395 rm -rf ${datadir}/emacs/${version} \
396 ;; \
397 esac ; \
398 fi ; \
44257b1a 399 done
1eb9aca7 400 (cd ${infodir} && rm -f cl* dired-x* ediff* emacs* forms* gnus* info* mh-e* sc* vip*)
88e7bbf1 401 (cd ${man1dir} && rm -f emacs.1 etags.1 ctags.1)
6b356ee8 402 (cd ${bindir} && rm -f emacs-${version} $(EMACS))
d4acf74f
JB
403
404
05ed817f 405FRC:
78008d14
JB
406
407# ==================== Cleaning up and miscellanea ====================
408
26873b72 409.PHONY: mostlyclean clean distclean maintainer-clean extraclean
98dfba1b 410
78008d14 411### `mostlyclean'
d4acf74f
JB
412### Like `clean', but may refrain from deleting a few files that people
413### normally don't want to recompile. For example, the `mostlyclean'
414### target for GCC does not delete `libgcc.a', because recompiling it
415### is rarely necessary and takes a lot of time.
05ed817f 416mostlyclean: FRC
0e265b72
BF
417 (cd src; $(MAKE) $(MFLAGS) mostlyclean)
418 (cd oldXMenu; $(MAKE) $(MFLAGS) mostlyclean)
98dfba1b 419 (cd lwlib; $(MAKE) $(MFLAGS) mostlyclean)
0e265b72 420 (cd lib-src; $(MAKE) $(MFLAGS) mostlyclean)
e6124e9d 421 -(cd man && $(MAKE) $(MFLAGS) mostlyclean)
d4acf74f
JB
422
423### `clean'
424### Delete all files from the current directory that are normally
425### created by building the program. Don't delete the files that
426### record the configuration. Also preserve files that could be made
427### by building, but normally aren't because the distribution comes
428### with them.
78008d14 429###
d4acf74f 430### Delete `.dvi' files here if they are not part of the distribution.
05ed817f 431clean: FRC
0e265b72
BF
432 (cd src; $(MAKE) $(MFLAGS) clean)
433 (cd oldXMenu; $(MAKE) $(MFLAGS) clean)
98dfba1b 434 (cd lwlib; $(MAKE) $(MFLAGS) clean)
0e265b72 435 (cd lib-src; $(MAKE) $(MFLAGS) clean)
e6124e9d 436 -(cd man && $(MAKE) $(MFLAGS) clean)
46947372 437
78008d14 438### `distclean'
d4acf74f
JB
439### Delete all files from the current directory that are created by
440### configuring or building the program. If you have unpacked the
441### source and built the program without creating any other files,
442### `make distclean' should leave only the files that were in the
443### distribution.
444top_distclean=\
dffd6dac 445 rm -f config.status config.cache config.log ; \
d4acf74f 446 rm -f Makefile ${SUBDIR_MAKEFILES} ; \
6b356ee8 447 (cd lock && rm -f *)
05ed817f 448distclean: FRC
0e265b72
BF
449 (cd src; $(MAKE) $(MFLAGS) distclean)
450 (cd oldXMenu; $(MAKE) $(MFLAGS) distclean)
98dfba1b 451 (cd lwlib; $(MAKE) $(MFLAGS) distclean)
0e265b72 452 (cd lib-src; $(MAKE) $(MFLAGS) distclean)
e6124e9d 453 (cd man && $(MAKE) $(MFLAGS) distclean)
d4acf74f 454 ${top_distclean}
46947372 455
26873b72 456### `maintainer-clean'
d4acf74f
JB
457### Delete everything from the current directory that can be
458### reconstructed with this Makefile. This typically includes
459### everything deleted by distclean, plus more: C source files
460### produced by Bison, tags tables, info files, and so on.
461###
26873b72 462### One exception, however: `make maintainer-clean' should not delete
d4acf74f 463### `configure' even if `configure' can be remade using a rule in the
26873b72 464### Makefile. More generally, `make maintainer-clean' should not delete
d4acf74f
JB
465### anything that needs to exist in order to run `configure' and then
466### begin to build the program.
26873b72
RS
467maintainer-clean: FRC
468 (cd src; $(MAKE) $(MFLAGS) maintainer-clean)
469 (cd oldXMenu; $(MAKE) $(MFLAGS) maintainer-clean)
470 (cd lwlib; $(MAKE) $(MFLAGS) maintainer-clean)
471 (cd lib-src; $(MAKE) $(MFLAGS) maintainer-clean)
472 -(cd man && $(MAKE) $(MFLAGS) maintainer-clean)
d4acf74f 473 ${top_distclean}
46947372 474
78008d14
JB
475### This doesn't actually appear in the coding standards, but Karl
476### says GCC supports it, and that's where the configuration part of
477### the coding standards seem to come from. It's like distclean, but
478### it deletes backup and autosave files too.
479extraclean:
0e265b72 480 for i in ${SUBDIR}; do (cd $$i; $(MAKE) $(MFLAGS) extraclean); done
6b356ee8 481 -(cd lock && rm *)
78008d14
JB
482 -rm config.status config-tmp-*
483 -rm -f *~ \#*
484
29c0047b
ER
485### Unlocking and relocking. The idea of these productions is to reduce
486### hassles when installing an incremental tar of Emacs. Do `make unlock'
487### before unlocking the file to take the write locks off all sources so
488### that tar xvof will overwrite them without fuss. Then do `make relock'
489### afterward so that VC mode will know which files should be checked in
490### if you want to mung them.
491###
492### Note: it's no disaster if these productions miss a file or two; tar
493### and VC will swiftly let you know if this happens, and it is easily
494### corrected.
495SOURCES = ChangeLog GETTING.GNU.SOFTWARE INSTALL Makefile.in PROBLEMS \
24470d72 496 README configure make-dist move-if-change
29c0047b 497
98dfba1b
RS
498.PHONY: unlock relock
499
29c0047b
ER
500unlock:
501 chmod u+w $(SOURCES) cpp/*
502 -(cd elisp; chmod u+w Makefile README *.texi)
0e265b72
BF
503 (cd etc; $(MAKE) $(MFLAGS) unlock)
504 (cd lib-src; $(MAKE) $(MFLAGS) unlock)
505 (cd lisp; $(MAKE) $(MFLAGS) unlock)
29c0047b
ER
506 (cd lisp/term; chmod u+w README *.el)
507 (cd man; chmod u+w *texi* ChangeLog split-man)
508 (cd oldXMenu; chmod u+w *.[ch] Makefile README)
98dfba1b 509 (cd lwlib; chmod u+w *.[ch] Makefile README)
0e265b72 510 (cd src; $(MAKE) $(MFLAGS) unlock)
29c0047b
ER
511
512relock:
513 chmod u-w $(SOURCES) cpp/*
514 -(cd elisp; chmod u-w Makefile README *.texi)
0e265b72
BF
515 (cd etc; $(MAKE) $(MFLAGS) relock)
516 (cd lib-src; $(MAKE) $(MFLAGS) relock)
517 (cd lisp; $(MAKE) $(MFLAGS) relock)
29c0047b
ER
518 (cd lisp/term; chmod u+w README *.el)
519 (cd man; chmod u+w *texi* ChangeLog split-man)
520 (cd oldXMenu; chmod u+w *.[ch] Makefile README)
98dfba1b 521 (cd lwlib; chmod u+w *.[ch] Makefile README)
0e265b72 522 (cd src; $(MAKE) $(MFLAGS) relock)
78008d14 523
46947372 524TAGS tags: lib-src
928cf895 525 cd ${srcdir}/src; $(MAKE) tags
46947372
JB
526
527check:
528 @echo "We don't have any tests for GNU Emacs yet."
4746118a
JB
529
530dist:
b4594994 531 $(srcdir)/update-subdirs ${srcdir}/lisp
78008d14 532 cd ${srcdir}; make-dist
d4acf74f 533
653ddcc3
RS
534.PHONY: info dvi dist check
535force-info:
536info: force-info
0e265b72 537 (cd ${srcdir}/man; $(MAKE) $(MFLAGS) info)
d4acf74f 538dvi:
6784fb67 539 (cd man; $(MAKE) $(MFLAGS) dvi)