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