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. | |
7 | # make install.sysv to install on system V. Note that on system V you | |
8 | # must change mandir to /usr/local/man/man1. | |
9 | # make install.xenix to install on Xenix. | |
badb0a97 | 10 | # make install.aix to install on AIX. |
78008d14 | 11 | # make TAGS to update tags tables. |
86a5659e | 12 | # |
78008d14 JB |
13 | # make clean or make mostlyclean |
14 | # Delete all files from the current directory that are normally | |
15 | # created by building the program. Don't delete the files that | |
16 | # record the configuration. Also preserve files that could be made | |
17 | # by building, but normally aren't because the distribution comes | |
18 | # with them. | |
19 | # | |
20 | # Delete `.dvi' files here if they are not part of the distribution. | |
21 | # | |
22 | # make distclean | |
23 | # Delete all files from the current directory that are created by | |
24 | # configuring or building the program. If you have unpacked the | |
25 | # source and built the program without creating any other files, | |
26 | # `make distclean' should leave only the files that were in the | |
27 | # distribution. | |
28 | # | |
29 | # make realclean | |
30 | # Delete everything from the current directory that can be | |
31 | # reconstructed with this Makefile. This typically includes | |
32 | # everything deleted by distclean, plus more: C source files | |
33 | # produced by Bison, tags tables, info files, and so on. | |
34 | # | |
35 | # make extraclean | |
36 | # Still more severe - delete backup and autosave files, too. | |
86a5659e JB |
37 | |
38 | SHELL = /bin/sh | |
39 | ||
78008d14 | 40 | # ==================== Things `configure' Might Edit ==================== |
86a5659e | 41 | |
78008d14 JB |
42 | CC=cc |
43 | CONFIG_CFLAGS=-g | |
44 | ||
45 | ### These help us choose version- and architecture-specific directories | |
46 | ### to install files in. | |
47 | ||
48 | ### This should be the number of the Emacs version we're building, | |
49 | ### like `18.59' or `19.0'. | |
0c22fbca | 50 | version=version-not-set |
78008d14 JB |
51 | |
52 | ### This should be the name of the configuration we're building Emacs | |
53 | ### for, like `mips-dec-ultrix' or `sparc-sun-sunos'. | |
0c22fbca JB |
54 | configname=configuration-name-not-set |
55 | ||
78008d14 JB |
56 | # ==================== Where To Install Things ==================== |
57 | ||
46947372 | 58 | # The default location for installation. Everything is placed in |
78008d14 JB |
59 | # subdirectories of this directory. The default values for many of |
60 | # the variables below are expressed in terms of this one, so you may | |
61 | # not need to change them. | |
46947372 | 62 | prefix=/usr/local |
86a5659e | 63 | |
78008d14 JB |
64 | # Like `prefix', but used for architecture-specific files. |
65 | exec_prefix=${prefix} | |
66 | ||
46947372 JB |
67 | # Where to install Emacs and other binaries that people will want to |
68 | # run directly (like etags). | |
78008d14 | 69 | bindir=${exec_prefix}/bin |
86a5659e | 70 | |
0c22fbca | 71 | # Where to install architecture-independent data files. ${lispdir} |
78008d14 JB |
72 | # and ${etcdir} are subdirectories of this. |
73 | datadir=${prefix}/lib | |
0c22fbca JB |
74 | |
75 | # Where to install and expect the files that Emacs modifies as it | |
78008d14 JB |
76 | # runs. These files are all architecture-independent. Right now, the |
77 | # only such data is the locking directory; ${lockdir} is a | |
78 | # subdirectory of this. | |
79 | statedir=${prefix}/lib | |
0c22fbca JB |
80 | |
81 | # Where to install and expect executable files to be run by Emacs | |
82 | # rather than directly by users, and other architecture-dependent | |
78008d14 JB |
83 | # data. ${archlibdir} is a subdirectory of this. |
84 | libdir=${exec_prefix}/lib | |
0c22fbca JB |
85 | |
86 | # Where to install Emacs's man pages, and what extension they should have. | |
78008d14 | 87 | mandir=${prefix}/man/man1 |
0c22fbca JB |
88 | manext=.1 |
89 | ||
90 | # Where to install and expect the info files describing Emacs. In the | |
91 | # past, this defaulted to a subdirectory of ${prefix}/lib/emacs, but | |
92 | # since there are now many packages documented with the texinfo | |
93 | # system, it is inappropriate to imply that it is part of Emacs. | |
94 | infodir=${prefix}/info | |
86a5659e | 95 | |
78008d14 JB |
96 | # Where to find the source code - setting this to anything but |
97 | # . doesn't work yet. The source code for Emacs's C kernel is | |
98 | # expected to be in ${srcdir}/src, and the source code for Emacs's | |
99 | # utility programs is expected to be in ${srcdir}/lib-src. This is | |
100 | # set by the configure script's `--srcdir' option. | |
0c22fbca | 101 | srcdir=. |
86a5659e | 102 | |
0c22fbca JB |
103 | # ==================== Emacs-specific directories ==================== |
104 | ||
78008d14 JB |
105 | # These variables hold the values Emacs will actually use. They are |
106 | # based on the values of the standard Make variables above. | |
107 | ||
108 | # Where to install the elisp files distributed with Emacs. This | |
109 | # includes the Emacs version, so that the lisp files for different | |
110 | # versions of Emacs will install themselves in separate directories. | |
111 | lispdir=${datadir}/emacs/${version}/lisp | |
86a5659e | 112 | |
46947372 | 113 | # Directories Emacs should search for elisp files specific to this |
4746118a | 114 | # site (i.e. customizations), before consulting ${lispdir}. This |
46947372 | 115 | # should be a colon-separated list of directories. |
78008d14 | 116 | locallisppath=${datadir}/emacs/local-lisp |
86a5659e | 117 | |
46947372 JB |
118 | # Where Emacs will search to find its elisp files. Before changing |
119 | # this, check to see if your purpose wouldn't better be served by | |
120 | # changing locallisppath. This should be a colon-separated list of | |
121 | # directories. | |
4746118a | 122 | lisppath=${locallisppath}:${lispdir} |
86a5659e | 123 | |
4746118a | 124 | # Where Emacs will search for its elisp files while building. This is |
46947372 JB |
125 | # only used during the process of compiling Emacs, to help Emacs find |
126 | # its lisp files before they've been installed in their final | |
127 | # location. It's usually identical to lisppath, except that the entry | |
128 | # for the directory containing the installed lisp files has been | |
129 | # replaced with ../lisp. This should be a colon-separated list of | |
130 | # directories. | |
4746118a | 131 | buildlisppath=../lisp |
86a5659e | 132 | |
0c22fbca JB |
133 | # Where to install the other architecture-independent data files |
134 | # distributed with Emacs (like the tutorial, the cookie recipes and | |
78008d14 JB |
135 | # the Zippy database). This path usually contains the Emacs version |
136 | # number, so the data files for multiple versions of Emacs may be | |
137 | # installed at once. | |
138 | etcdir=${datadir}/emacs/${version}/etc | |
46947372 JB |
139 | |
140 | # Where to create and expect the locking directory, where the Emacs | |
141 | # locking code keeps track of which files are currently being edited. | |
78008d14 | 142 | lockdir=${statedir}/emacs/lock |
46947372 | 143 | |
0c22fbca | 144 | # Where to put executables to be run by Emacs rather than the user. |
78008d14 JB |
145 | # This path usually includes the Emacs version and configuration name, |
146 | # so that multiple configurations for multiple versions of Emacs may | |
147 | # be installed at once. | |
148 | archlibdir=${libdir}/emacs/${version}/${configname} | |
46947372 JB |
149 | |
150 | # ==================== Utility Programs for the Build ==================== | |
151 | ||
152 | # Allow the user to specify the install program. | |
153 | INSTALL = install | |
154 | INSTALLFLAGS = -c | |
155 | INSTALL_PROGRAM = ${INSTALL} | |
156 | INSTALL_DATA = ${INSTALL} | |
157 | ||
46947372 | 158 | # ============================= Targets ============================== |
86a5659e JB |
159 | |
160 | # Flags passed down to subdirectory makefiles. | |
78008d14 JB |
161 | MFLAGS = |
162 | ||
163 | CFLAGS=${CONFIG_CFLAGS} | |
86a5659e JB |
164 | |
165 | # Subdirectories to make recursively. `lisp' is not included | |
166 | # because the compiled lisp files are part of the distribution | |
167 | # and you cannot remake them without installing Emacs first. | |
46947372 | 168 | SUBDIR = lib-src src |
86a5659e | 169 | |
78008d14 JB |
170 | # The makefiles of the directories in $SUBDIR. |
171 | SUBDIR_MAKEFILES = lib-src/Makefile src/Makefile | |
172 | ||
173 | # Subdirectories to install, and where they'll go. lib-src's makefile | |
174 | # knows how to install it, so we don't do that here. | |
175 | COPYDIR = etc ${srcdir}/info ${srcdir}/lisp | |
176 | COPYDESTS = ${etcdir} ${infodir} ${lispdir} | |
86a5659e JB |
177 | |
178 | all: src/paths.h ${SUBDIR} | |
179 | ||
46947372 JB |
180 | removenullpaths=sed -e 's/^://' -e 's/:$$//' -e 's/::/:/' |
181 | ||
78008d14 JB |
182 | # We force the rebuilding of src/paths.h because the user might give |
183 | # make different values for the various directories. Since we use | |
184 | # move-if-change, src/paths.h only actually changes if the user did | |
185 | # something notable, so the only unnecessary work we do is in building | |
186 | # src/paths.h.tmp, which isn't much. | |
692f9ac6 | 187 | # Note that sed is not in /bin on 386bsd. |
78008d14 | 188 | src/paths.h: Makefile ${srcdir}/src/paths.h.in FRC |
4746118a JB |
189 | lisppath=`echo ${lisppath} | ${removenullpaths}` ; \ |
190 | buildlisppath=`echo ${buildlisppath} | ${removenullpaths}` ; \ | |
78008d14 | 191 | sed < ${srcdir}/src/paths.h.in > src/paths.h.tmp \ |
46947372 | 192 | -e 's;\(#.*PATH_LOADSEARCH\).*$$;\1 "'$${lisppath}'";' \ |
4746118a | 193 | -e 's;\(#.*PATH_DUMPLOADSEARCH\).*$$;\1 "'$${buildlisppath}'";' \ |
78008d14 JB |
194 | -e 's;\(#.*PATH_EXEC\).*$$;\1 "${archlibdir}";' \ |
195 | -e 's;\(#.*PATH_DATA\).*$$;\1 "${etcdir}";' \ | |
32676c08 | 196 | -e 's;\(#.*PATH_LOCK\).*$$;\1 "${lockdir}/";' |
78008d14 | 197 | ${srcdir}/move-if-change src/paths.h.tmp src/paths.h |
86a5659e JB |
198 | |
199 | src: lib-src | |
200 | ||
201 | .RECURSIVE: ${SUBDIR} | |
202 | ||
78008d14 JB |
203 | ${SUBDIR}: ${SUBDIR_MAKEFILES} FRC |
204 | cd $@; make all ${MFLAGS} \ | |
205 | CC='${CC}' CFLAGS='${CFLAGS}' \ | |
206 | srcdir='${srcdir}/$@' libdir='${libdir}' | |
207 | ||
208 | ## We build the makefiles for the subdirectories here so that we can | |
209 | ## edit the values for the path variables into them. This means that | |
210 | ## when the user has built them from this makefile once, they will use | |
211 | ## the right default values for the path variables. | |
212 | lib-src/Makefile: ${srcdir}/lib-src/Makefile.in Makefile | |
213 | echo "Producing \`lib-src/Makefile' from \`${srcdir}/lib-src/Makefile.in'." | |
214 | rm -f lib-src/Makefile.tmp | |
215 | (echo "# This file is generated from \`${srcdir}/lib-src/Makefile.in'." ; \ | |
216 | echo "# If you are thinking about editing it, you should seriously consider" ; \ | |
217 | echo "# running \`make lib-src/Makefile' at the top of the" ; \ | |
218 | echo "# Emacs build tree instead, or editing" ; \ | |
219 | echo "# \`${srcdir}/lib-src/Makefile.in' itself." ; \ | |
220 | /bin/sed < ${srcdir}/lib-src/Makefile.in \ | |
221 | -e 's|^\(version *=\).*$$|\1'"${version}"'|' \ | |
222 | -e 's|^\(configname *=\).*$$|\1'"${configname}"'|' \ | |
223 | -e 's|^\(prefix *=\).*$$|\1'"${prefix}"'|' \ | |
224 | -e 's|^\(exec_prefix *=\).*$$|\1'"${exec_prefix}"'|' \ | |
225 | -e 's|^\(libdir *=\).*$$|\1'"${libdir}"'|' \ | |
226 | -e 's|^\(srcdir *=\).*$$|\1'"${srcdir}"'|' \ | |
227 | -e 's|^\(archlibdir *=\).*$$|\1'"${archlibdir}"'|' \ | |
228 | -e 's|^CC *=.*$$|CC='"${CC}"'|' \ | |
229 | -e 's|^CONFIG_CFLAGS *=.*$$|CONFIG_CFLAGS='"${CONFIG_CFLAGS}"'|' \ | |
230 | -e 's|^LOADLIBES *=.*$$|LOADLIBES='"${libsrc_libs}"'|' \ | |
231 | -e '/^# DIST: /d') > lib-src/Makefile.tmp | |
232 | ${srcdir}/move-if-change lib-src/Makefile.tmp lib-src/Makefile | |
233 | # Remind people not to edit this. | |
234 | chmod -w lib-src/Makefile | |
235 | ||
236 | src/Makefile: ${srcdir}/src/Makefile.in Makefile | |
237 | echo "Producing \`src/Makefile' from \`${srcdir}/src/Makefile.in'." | |
238 | rm -f src/Makefile.tmp | |
239 | (echo "# This file is generated from \`${srcdir}/src/Makefile.in'." ; \ | |
240 | echo "# If you are thinking about editing it, you should seriously consider" ; \ | |
241 | echo "# running \`make src/Makefile' at the top of the" ; \ | |
242 | echo "# Emacs build tree instead, or editing" ; \ | |
243 | echo "# \`${srcdir}/src/Makefile.in' itself." ; \ | |
244 | /bin/sed < ${srcdir}/src/Makefile.in \ | |
245 | -e 's|^\(srcdir *=\).*$$|\1'"${srcdir}"'|' \ | |
246 | -e 's|^CC *=.*$$|CC='"${CC}"'|' \ | |
247 | -e 's|^CONFIG_CFLAGS *=.*$$|CONFIG_CFLAGS='"${CONFIG_CFLAGS}"'|' \ | |
248 | -e '/^# DIST: /d') > src/Makefile.tmp | |
249 | ${srcdir}/move-if-change src/Makefile.tmp src/Makefile | |
250 | # Remind people not to edit this. | |
251 | chmod -w src/Makefile | |
252 | ||
253 | oldXMenu/Makefile: ${srcdir}/oldXMenu/Makefile Makefile | |
254 | echo "Producing \`src/Makefile' from \`${srcdir}/src/Makefile.in'." | |
255 | rm -f src/Makefile.tmp | |
256 | cp "${srcdir}"/oldXMenu/Makefile oldXMenu/Makefile | |
257 | ||
258 | ||
259 | Makefile: | |
260 | ./config.status | |
261 | ||
262 | # ==================== Installation ==================== | |
263 | ||
264 | install: all mkdir | |
265 | ## If we let lib-src do its own installation, that means we | |
266 | ## don't have to duplicate the list of utilities to install in | |
267 | ## this Makefile as well. | |
268 | (cd lib-src; make install ${MFLAGS} bindir=${bindir} libdir=${libdir}) | |
46947372 JB |
269 | -set ${COPYDESTS} ; \ |
270 | for dir in ${COPYDIR} ; do \ | |
271 | dest=$$1 ; shift ; \ | |
78008d14 | 272 | if [ `(cd $${dir}; /bin/pwd)` != `(cd $${dest}; /bin/pwd)` ]; then \ |
46947372 JB |
273 | (cd $${dir}; tar cf - . ) | (cd $${dest}; umask 0; tar xf - ) ; \ |
274 | for subdir in `find $${dest} -type d ! -name RCS -print` ; do \ | |
275 | rm -rf $${subdir}/RCS ; \ | |
276 | rm -f $${subdir}/\#* ; \ | |
277 | rm -f $${subdir}/*~ ; \ | |
278 | done ; \ | |
279 | fi ; \ | |
280 | done | |
78008d14 JB |
281 | (cd info ; \ |
282 | if [ ! -f ${infodir}/dir ]; then \ | |
283 | ${INSTALL_DATA} ${INSTALLFLAGS} -m 444 ./dir ${infodir}/dir ; \ | |
284 | fi ; \ | |
285 | for f in *.info* ; do \ | |
286 | ${INSTALL_DATA} ${INSTALLFLAGS} -m 444 $$f ${infodir}/$$f ; \ | |
287 | done) | |
288 | for page in emacs etags ctags ; do \ | |
289 | ${INSTALL_DATA} ${INSTALLFLAGS} -m 444 etc/$${page}.1 \ | |
290 | ${mandir}/$${page}${manext} ; \ | |
291 | done | |
292 | ${INSTALL_PROGRAM} ${INSTALLFLAGS} -m 1755 src/xemacs \ | |
293 | ${bindir}/emacs-${version} | |
46947372 | 294 | -rm -f ${bindir}/emacs |
78008d14 | 295 | ln ${bindir}/emacs-${version} ${bindir}/emacs |
86a5659e | 296 | |
78008d14 JB |
297 | install.sysv: all mkdir |
298 | ## If we let lib-src do its own installation, that means we | |
299 | ## don't have to duplicate the list of utilities to install in | |
300 | ## this Makefile as well. | |
301 | (cd lib-src; make install ${MFLAGS} bindir=${bindir} libdir=${libdir}) | |
46947372 JB |
302 | -set ${COPYDESTS} ; \ |
303 | for dir in ${COPYDIR} ; do \ | |
304 | dest=$$1 ; shift ; \ | |
305 | if [ `/bin/pwd`/$${dir} != `(cd $${dest}; /bin/pwd)` ] ; then \ | |
306 | (cd $${dir}; find . -print | cpio -pdum ${dest} ) ; \ | |
307 | for subdir in `find $${dest} -type d ! -name RCS -print` ; do \ | |
308 | rm -rf $${subdir}/RCS ; \ | |
309 | rm -f $${subdir}/\#* ; \ | |
310 | rm -f $${subdir}/*~ ; \ | |
311 | done ; \ | |
312 | fi ; \ | |
313 | done | |
78008d14 JB |
314 | -(cd info ; \ |
315 | if [ ! -f ${infodir}/dir ]; then \ | |
316 | cpset ./dir ${infodir} 444 bin bin ; \ | |
317 | fi ; \ | |
318 | for f in *.info* ; do \ | |
319 | cpset $$f ${infodir} 444 bin bin ; \ | |
320 | done) | |
321 | -for page in emacs etags ctags ; do \ | |
322 | cpset etc/$${page}.1 ${mandir}/$${page}${manext} 444 bin bin ; \ | |
323 | done | |
46947372 | 324 | -/bin/rm -f ${bindir}/emacs |
78008d14 JB |
325 | -cpset src/xemacs ${bindir}/emacs-${version} 1755 bin bin |
326 | -ln ${bindir}/emacs-${version} ${bindir}/emacs | |
86a5659e | 327 | |
78008d14 JB |
328 | install.xenix: all mkdir |
329 | ## If we let lib-src do its own installation, that means we | |
330 | ## don't have to duplicate the list of utilities to install in | |
331 | ## this Makefile as well. | |
332 | (cd lib-src; make install ${MFLAGS} bindir=${bindir} libdir=${libdir}) | |
46947372 JB |
333 | -set ${COPYDESTS} ; \ |
334 | for dir in ${COPYDIR} ; do \ | |
335 | dest=$$1 ; shift ; \ | |
336 | if [ `/bin/pwd`/$${dir} != `(cd $${dest}; /bin/pwd)` ] ; then \ | |
337 | (cd $${dir}; tar cf - . ) | (cd $${dest}; umask 0; tar xpf - ) ; \ | |
338 | for subdir in `find $${dest} -type d ! -name RCS -print` ; do \ | |
339 | rm -rf $${subdir}/RCS ; \ | |
340 | rm -f $${subdir}/\#* ; \ | |
341 | rm -f $${subdir}/*~ ; \ | |
342 | done ; \ | |
343 | fi ; \ | |
344 | done | |
78008d14 JB |
345 | (cd info ; \ |
346 | if [ ! -f ${infodir}/dir ]; then \ | |
347 | cp ./dir ${infodir} ; \ | |
348 | chmod 444 ${infodir}/dir ; \ | |
349 | fi ; \ | |
350 | for f in *.info* ; do \ | |
351 | cp $$f ${infodir} ; \ | |
352 | chmod 444 ${infodir}/$$f ; \ | |
353 | done) | |
354 | for page in emacs etags ctags ; do \ | |
355 | cp etc/$${page}.1 ${mandir}/$${page}${manext} ; \ | |
356 | chmod 444 ${mandir}/$${page}${manext} ; \ | |
357 | done | |
46947372 | 358 | -mv -f ${bindir}/emacs ${bindir}/emacs.old |
78008d14 JB |
359 | cp src/xemacs ${bindir}/emacs-${version} |
360 | ln ${bindir}/emacs-${version} ${bindir}/emacs | |
46947372 JB |
361 | chmod 1755 ${bindir}/emacs |
362 | -rm -f ${bindir}/emacs.old | |
86a5659e | 363 | |
78008d14 JB |
364 | install.aix: all mkdir |
365 | ## If we let lib-src do its own installation, that means we | |
366 | ## don't have to duplicate the list of utilities to install in | |
367 | ## this Makefile as well. | |
368 | (cd lib-src; make install ${MFLAGS} bindir=${bindir} libdir=${libdir}) | |
46947372 JB |
369 | -set ${COPYDESTS} ; \ |
370 | for dir in ${COPYDIR} ; do \ | |
371 | dest=$$1 ; shift ; \ | |
372 | if [ `/bin/pwd`/$${dir} != `(cd $${dest}; /bin/pwd)` ] ; then \ | |
373 | (cd $${dir}; tar cf - . ) | (cd $${dest}; umask 0; tar xBf - ) ; \ | |
374 | for subdir in `find $${dest} -type d ! -name RCS -print` ; do \ | |
375 | rm -rf $${subdir}/RCS ; \ | |
376 | rm -f $${subdir}/\#* ; \ | |
377 | rm -f $${subdir}/*~ ; \ | |
378 | done ; \ | |
379 | fi ; \ | |
380 | done | |
78008d14 JB |
381 | (cd info ; \ |
382 | if [ ! -f ${infodir}/dir ]; then \ | |
383 | ${INSTALL_DATA} ${INSTALLFLAGS} -M 444 -f ${infodir} ./dir ; \ | |
384 | fi ; \ | |
385 | for f in *.info* ; do \ | |
386 | ${INSTALL_DATA} ${INSTALLFLAGS} -M 444 -f ${infodir} $$f ; \ | |
387 | done) | |
46947372 | 388 | ${INSTALL_PROGRAM} ${INSTALLFLAGS} -M 1755 -f ${bindir} src/xemacs |
78008d14 JB |
389 | mv ${bindir}/xemacs ${bindir}/emacs-${version} |
390 | for page in emacs etags ctags ; do \ | |
391 | ${INSTALL_DATA} ${INSTALLFLAGS} -M 444 -f ${mandir} etc/$${page}.1 ;\ | |
392 | done | |
46947372 | 393 | -rm -f ${bindir}/emacs |
78008d14 | 394 | ln ${bindir}/emacs-${version} ${bindir}/emacs |
badb0a97 | 395 | |
78008d14 JB |
396 | ### Build all the directories we're going to install Emacs in. Since |
397 | ### we may be creating several layers of directories (for example, | |
398 | ### /usr/local/lib/emacs/19.0/mips-dec-ultrix4.2), we use make-path | |
399 | ### instead of mkdir. Not all systems' mkdirs have the `-p' flag. | |
86a5659e | 400 | mkdir: FRC |
78008d14 JB |
401 | ./lib-src/make-path ${COPYDESTS} ${lockdir} |
402 | chmod 777 ${COPYDESTS} ${lockdir} | |
86a5659e JB |
403 | |
404 | FRC: | |
405 | ||
78008d14 JB |
406 | |
407 | # ==================== Cleaning up and miscellanea ==================== | |
408 | ||
409 | ### `clean' | |
410 | ### Delete all files from the current directory that are normally | |
411 | ### created by building the program. Don't delete the files that | |
412 | ### record the configuration. Also preserve files that could be made | |
413 | ### by building, but normally aren't because the distribution comes | |
414 | ### with them. | |
415 | ### `mostlyclean' | |
416 | ### Like `clean', but may refrain from deleting a few files that | |
417 | ### people normally don't want to recompile. For example, the | |
418 | ### `mostlyclean' target for GCC does not delete `libgcc.a', because | |
419 | ### recompiling it is rarely necessary and takes a lot of time. | |
420 | ### | |
46947372 JB |
421 | clean mostlyclean: |
422 | cd src; make clean | |
78008d14 JB |
423 | cd lib-src; make clean |
424 | cd oldXMenu; make clean | |
425 | if [ `(cd ${etcdir} ; /bin/pwd` != `(cd etc; /bin/pwd)` ] ; then \ | |
426 | cd etc; make clean; \ | |
46947372 JB |
427 | else true; \ |
428 | fi | |
46947372 | 429 | |
78008d14 JB |
430 | ### `distclean' |
431 | ### Delete all files from the current directory that are created by | |
432 | ### configuring or building the program. This should leave only the | |
433 | ### files that would be in the distribution. | |
46947372 JB |
434 | distclean: |
435 | for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} distclean); done | |
436 | -(cd lock; rm *) | |
437 | -rm config.status config-tmp-* | |
46947372 | 438 | |
78008d14 JB |
439 | ### `realclean' |
440 | ### Delete everything from the current directory that can be | |
441 | ### reconstructed with this makefile. This typically includes | |
442 | ### everything deleted by distclean, plus more: C source files | |
443 | ### produced by Bison, tags tables, info files, and so on. | |
46947372 JB |
444 | realclean: |
445 | for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} realclean); done | |
446 | (cd lock; rm *) | |
447 | rm config.status | |
448 | ||
78008d14 JB |
449 | ### This doesn't actually appear in the coding standards, but Karl |
450 | ### says GCC supports it, and that's where the configuration part of | |
451 | ### the coding standards seem to come from. It's like distclean, but | |
452 | ### it deletes backup and autosave files too. | |
453 | extraclean: | |
454 | for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} extraclean); done | |
455 | -(cd lock; rm *) | |
456 | -rm config.status config-tmp-* | |
457 | -rm -f *~ \#* | |
458 | ||
459 | ||
46947372 | 460 | TAGS tags: lib-src |
78008d14 JB |
461 | (cd ${srcdir} ; lib-src/etags --output=./src/TAGS \ |
462 | src/*.[ch] lisp/*.el lisp/term/*.el) | |
46947372 JB |
463 | |
464 | check: | |
465 | @echo "We don't have any tests for GNU Emacs yet." | |
4746118a JB |
466 | |
467 | dist: | |
78008d14 | 468 | cd ${srcdir}; make-dist |