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