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