617
|
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.
|
491
|
4
|
617
|
5 # make all to compile and build Emacs.
|
|
6 # make install to install it.
|
1686
|
7 # make TAGS to update tags tables.
|
|
8 #
|
|
9 # make clean or make mostlyclean
|
|
10 # Delete all files from the current directory that are normally
|
1698
|
11 # created by building the program. Don't delete the files that
|
1686
|
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.
|
491
|
15 #
|
1686
|
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 #
|
10685
|
25 # make maintainer-clean
|
1686
|
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.
|
491
|
33
|
|
34 SHELL = /bin/sh
|
6868
|
35
|
|
36 # If Make doesn't predefine MAKE, set it here.
|
|
37 @SET_MAKE@
|
491
|
38
|
1686
|
39 # ==================== Things `configure' Might Edit ====================
|
|
40
|
2498
|
41 CC=@CC@
|
3780
|
42 CPP=@CPP@
|
2498
|
43 C_SWITCH_SYSTEM=@c_switch_system@
|
2623
|
44 ALLOCA=@ALLOCA@
|
2710
|
45 LN_S=@LN_S@
|
|
46 CFLAGS=@CFLAGS@
|
19013
|
47 LDFLAGS=@LDFLAGS@
|
19037
|
48 CPPFLAGS=@CPPFLAGS@
|
2988
|
49 C_SWITCH_X_SITE=@C_SWITCH_X_SITE@
|
3344
|
50 LD_SWITCH_X_SITE=@LD_SWITCH_X_SITE@
|
3582
|
51 YACC=@YACC@
|
1686
|
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'.
|
2498
|
58 version=@version@
|
1686
|
59
|
|
60 ### This should be the name of the configuration we're building Emacs
|
|
61 ### for, like `mips-dec-ultrix' or `sparc-sun-sunos'.
|
2498
|
62 configuration=@configuration@
|
|
63
|
617
|
64 # ==================== Where To Install Things ====================
|
|
65
|
1686
|
66 # The default location for installation. Everything is placed in
|
|
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
|
2974
|
69 # not need to change them. This defaults to /usr/local.
|
|
70 prefix=@prefix@
|
1647
|
71
|
1686
|
72 # Like `prefix', but used for architecture-specific files.
|
3010
|
73 exec_prefix=@exec_prefix@
|
617
|
74
|
|
75 # Where to install Emacs and other binaries that people will want to
|
|
76 # run directly (like etags).
|
4793
|
77 bindir=@bindir@
|
491
|
78
|
1698
|
79 # Where to install architecture-independent data files. ${lispdir}
|
1686
|
80 # and ${etcdir} are subdirectories of this.
|
4793
|
81 datadir=@datadir@
|
1647
|
82
|
|
83 # Where to install and expect the files that Emacs modifies as it
|
1698
|
84 # runs. These files are all architecture-independent. Right now, the
|
1686
|
85 # only such data is the locking directory; ${lockdir} is a
|
|
86 # subdirectory of this.
|
9561
|
87 sharedstatedir=@sharedstatedir@
|
1647
|
88
|
|
89 # Where to install and expect executable files to be run by Emacs
|
|
90 # rather than directly by users, and other architecture-dependent
|
1698
|
91 # data. ${archlibdir} is a subdirectory of this.
|
9457
|
92 libexecdir=@libexecdir@
|
1647
|
93
|
|
94 # Where to install Emacs's man pages, and what extension they should have.
|
4793
|
95 mandir=@mandir@
|
1647
|
96 manext=.1
|
13518
|
97 man1dir=$(mandir)/man1
|
617
|
98
|
1647
|
99 # Where to install and expect the info files describing Emacs. In the
|
|
100 # past, this defaulted to a subdirectory of ${prefix}/lib/emacs, but
|
|
101 # since there are now many packages documented with the texinfo
|
|
102 # system, it is inappropriate to imply that it is part of Emacs.
|
4793
|
103 infodir=@infodir@
|
491
|
104
|
9556
|
105 # Where to look for bitmap files.
|
|
106 bitmapdir=@bitmapdir@
|
|
107
|
3079
|
108 # Where to find the source code. The source code for Emacs's C kernel is
|
1686
|
109 # expected to be in ${srcdir}/src, and the source code for Emacs's
|
|
110 # utility programs is expected to be in ${srcdir}/lib-src. This is
|
|
111 # set by the configure script's `--srcdir' option.
|
2623
|
112 srcdir=@srcdir@
|
1647
|
113
|
4809
|
114 # Tell make where to find source files; this is needed for the makefiles.
|
|
115 VPATH=@srcdir@
|
|
116
|
1647
|
117 # ==================== Emacs-specific directories ====================
|
|
118
|
1686
|
119 # These variables hold the values Emacs will actually use. They are
|
|
120 # based on the values of the standard Make variables above.
|
|
121
|
4793
|
122 # Where to install the lisp files distributed with
|
|
123 # Emacs. This includes the Emacs version, so that the
|
|
124 # lisp files for different versions of Emacs will install
|
|
125 # themselves in separate directories.
|
|
126 lispdir=@lispdir@
|
617
|
127
|
4793
|
128 # Directories Emacs should search for lisp files specific
|
|
129 # to this site (i.e. customizations), before consulting
|
|
130 # ${lispdir}. This should be a colon-separated list of
|
|
131 # directories.
|
|
132 locallisppath=@locallisppath@
|
491
|
133
|
2623
|
134 # Where Emacs will search to find its lisp files. Before
|
|
135 # changing this, check to see if your purpose wouldn't
|
|
136 # better be served by changing locallisppath. This
|
|
137 # should be a colon-separated list of directories.
|
4793
|
138 lisppath=@lisppath@
|
491
|
139
|
2623
|
140 # Where Emacs will search for its lisp files while
|
|
141 # building. This is only used during the process of
|
|
142 # compiling Emacs, to help Emacs find its lisp files
|
|
143 # before they've been installed in their final location.
|
8499
|
144 # It's usually identical to lisppath, except that
|
|
145 # it does not include locallisppath, and the
|
2623
|
146 # entry for the directory containing the installed lisp
|
|
147 # files has been replaced with ../lisp. This should be a
|
|
148 # colon-separated list of directories.
|
2817
|
149 buildlisppath=${srcdir}/lisp
|
491
|
150
|
4793
|
151 # Where to install the other architecture-independent
|
|
152 # data files distributed with Emacs (like the tutorial,
|
|
153 # the cookie recipes and the Zippy database). This path
|
|
154 # usually contains the Emacs version number, so the data
|
|
155 # files for multiple versions of Emacs may be installed
|
|
156 # at once.
|
|
157 etcdir=@etcdir@
|
491
|
158
|
4793
|
159 # Where to create and expect the locking directory, where
|
|
160 # the Emacs locking code keeps track of which files are
|
|
161 # currently being edited.
|
|
162 lockdir=@lockdir@
|
2225
|
163
|
4793
|
164 # Where to put executables to be run by Emacs rather than
|
|
165 # the user. This path usually includes the Emacs version
|
|
166 # and configuration name, so that multiple configurations
|
|
167 # for multiple versions of Emacs may be installed at
|
|
168 # once.
|
|
169 archlibdir=@archlibdir@
|
2225
|
170
|
6033
|
171 # Where to put the docstring file.
|
|
172 docdir=@docdir@
|
|
173
|
617
|
174 # ==================== Utility Programs for the Build ====================
|
|
175
|
|
176 # Allow the user to specify the install program.
|
3090
|
177 INSTALL = @INSTALL@
|
3010
|
178 INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
179 INSTALL_DATA = @INSTALL_DATA@
|
15975
|
180 # By default, we uphold the dignity of our programs.
|
|
181 INSTALL_STRIP =
|
617
|
182
|
|
183 # ============================= Targets ==============================
|
491
|
184
|
7032
|
185 # What emacs should be called when installed.
|
|
186 EMACS = emacs
|
|
187
|
491
|
188 # Subdirectories to make recursively. `lisp' is not included
|
|
189 # because the compiled lisp files are part of the distribution
|
|
190 # and you cannot remake them without installing Emacs first.
|
18516
|
191 SUBDIR = lib-src src leim
|
491
|
192
|
1686
|
193 # The makefiles of the directories in $SUBDIR.
|
18516
|
194 SUBDIR_MAKEFILES = lib-src/Makefile man/Makefile src/Makefile oldXMenu/Makefile lwlib/Makefile leim/Makefile
|
1686
|
195
|
1860
|
196 # Subdirectories to install, and where they'll go.
|
|
197 # lib-src's makefile knows how to install it, so we don't do that here.
|
18516
|
198 # leim's makefile also knows how to install it, so we don't do that here.
|
1860
|
199 # When installing the info files, we need to do special things to
|
|
200 # avoid nuking an existing dir file, so we don't do that here;
|
|
201 # instead, we have written out explicit code in the `install' targets.
|
3180
|
202 COPYDIR = ${srcdir}/etc ${srcdir}/lisp
|
|
203 COPYDESTS = ${etcdir} ${lispdir}
|
491
|
204
|
15897
|
205 all: ${SUBDIR}
|
491
|
206
|
8163
|
207 removenullpaths=sed -e 's/^://g' -e 's/:$$//g' -e 's/::/:/g'
|
617
|
208
|
15897
|
209 # Generate paths.h from paths.in. This target is invoked by `configure'.
|
|
210 paths-force: FRC
|
2430
094bec4c13e9
lisp/ * Makefile.in (src/paths.h): Don't echo the huge sed command we
Jim Blandy <jimb@redhat.com>
diff
changeset
|
211 @(lisppath=`echo ${lisppath} | ${removenullpaths}` ; \
|
094bec4c13e9
lisp/ * Makefile.in (src/paths.h): Don't echo the huge sed command we
Jim Blandy <jimb@redhat.com>
diff
changeset
|
212 buildlisppath=`echo ${buildlisppath} | ${removenullpaths}` ; \
|
13031
|
213 sed < ${srcdir}/src/paths.in > paths.h.$$$$ \
|
2430
094bec4c13e9
lisp/ * Makefile.in (src/paths.h): Don't echo the huge sed command we
Jim Blandy <jimb@redhat.com>
diff
changeset
|
214 -e 's;\(#.*PATH_LOADSEARCH\).*$$;\1 "'$${lisppath}'";' \
|
094bec4c13e9
lisp/ * Makefile.in (src/paths.h): Don't echo the huge sed command we
Jim Blandy <jimb@redhat.com>
diff
changeset
|
215 -e 's;\(#.*PATH_DUMPLOADSEARCH\).*$$;\1 "'$${buildlisppath}'";' \
|
094bec4c13e9
lisp/ * Makefile.in (src/paths.h): Don't echo the huge sed command we
Jim Blandy <jimb@redhat.com>
diff
changeset
|
216 -e 's;\(#.*PATH_EXEC\).*$$;\1 "${archlibdir}";' \
|
3060
|
217 -e 's;\(#.*PATH_INFO\).*$$;\1 "${infodir}";' \
|
2430
094bec4c13e9
lisp/ * Makefile.in (src/paths.h): Don't echo the huge sed command we
Jim Blandy <jimb@redhat.com>
diff
changeset
|
218 -e 's;\(#.*PATH_DATA\).*$$;\1 "${etcdir}";' \
|
9556
|
219 -e 's;\(#.*PATH_BITMAPS\).*$$;\1 "${bitmapdir}";' \
|
6033
|
220 -e 's;\(#.*PATH_DOC\).*$$;\1 "${docdir}";' \
|
8770
|
221 -e 's;\(#.*PATH_LOCK\).*$$;\1 "${lockdir}/";') && \
|
13031
|
222 ${srcdir}/move-if-change paths.h.$$$$ src/paths.h
|
491
|
223
|
15897
|
224 src: lib-src FRC
|
7704
|
225
|
18409
009cc28fa3ec
(src/config.stamp): Target renamed from src/config.h and touch it explicitly.
Richard M. Stallman <rms@gnu.org>
diff
changeset
|
226 lib-src: FRC src/config.stamp
|
491
|
227
|
|
228 .RECURSIVE: ${SUBDIR}
|
|
229
|
1686
|
230 ${SUBDIR}: ${SUBDIR_MAKEFILES} FRC
|
4793
|
231 cd $@; $(MAKE) all $(MFLAGS) \
|
5413
|
232 CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \
|
|
233 LDFLAGS='${LDFLAGS}' MAKE='${MAKE}'
|
1686
|
234
|
7704
|
235 blessmail: ${SUBDIR_MAKEFILES} src FRC
|
10969
|
236 cd lib-src; $(MAKE) maybe-blessmail $(MFLAGS) \
|
|
237 MAKE='${MAKE}' archlibdir='$(archlibdir)'
|
7311
|
238
|
4793
|
239 Makefile: Makefile.in config.status
|
|
240 ./config.status
|
491
|
241
|
12579
16b03ae9214b
(src/paths.h, paths-force): Rename src/paths.h.in to src/paths.in.
Richard M. Stallman <rms@gnu.org>
diff
changeset
|
242 src/Makefile: src/Makefile.in config.status
|
4793
|
243 ./config.status
|
1686
|
244
|
18409
009cc28fa3ec
(src/config.stamp): Target renamed from src/config.h and touch it explicitly.
Richard M. Stallman <rms@gnu.org>
diff
changeset
|
245 src/config.stamp: src/config.in config.status
|
18404
|
246 ./config.status
|
18409
009cc28fa3ec
(src/config.stamp): Target renamed from src/config.h and touch it explicitly.
Richard M. Stallman <rms@gnu.org>
diff
changeset
|
247 touch src/config.stamp
|
18404
|
248
|
4793
|
249 lib-src/Makefile: lib-src/Makefile.in config.status
|
|
250 ./config.status
|
1686
|
251
|
4793
|
252 oldXMenu/Makefile: oldXMenu/Makefile.in config.status
|
1686
|
253 ./config.status
|
|
254
|
5630
|
255 lwlib/Makefile: lwlib/Makefile.in config.status
|
|
256 ./config.status
|
|
257
|
18516
|
258 leim/Makefile: leim/Makefile.in config.status
|
|
259 ./config.status
|
|
260
|
1686
|
261 # ==================== Installation ====================
|
|
262
|
1821
|
263 ## If we let lib-src do its own installation, that means we
|
|
264 ## don't have to duplicate the list of utilities to install in
|
|
265 ## this Makefile as well.
|
2623
|
266
|
2817
|
267 ## On AIX, use tar xBf.
|
|
268 ## On Xenix, use tar xpf.
|
|
269
|
7032
|
270 .PHONY: install mkdir
|
5630
|
271
|
2623
|
272 ## We delete each directory in ${COPYDESTS} before we copy into it;
|
|
273 ## that way, we can reinstall over directories that have been put in
|
|
274 ## place with their files read-only (perhaps because they are checked
|
|
275 ## into RCS). In order to make this safe, we make sure that the
|
|
276 ## source exists and is distinct from the destination.
|
14813
|
277 ### We do install-arch-indep first because
|
|
278 ### the executable needs the Lisp files and DOC file to work properly.
|
18533
|
279 install: all install-arch-indep install-arch-dep blessmail install-leim
|
13280
|
280 @true
|
3060
|
281
|
13901
|
282 ### Install the executables that were compiled specifically for this machine.
|
14813
|
283 ### It would be nice to do something for a parallel make
|
|
284 ### to ensure that install-arch-indep finishes before this starts.
|
|
285 install-arch-dep: mkdir
|
3060
|
286 (cd lib-src; \
|
4793
|
287 $(MAKE) install $(MFLAGS) prefix=${prefix} \
|
9457
|
288 exec_prefix=${exec_prefix} bindir=${bindir} \
|
15975
|
289 libexecdir=${libexecdir} archlibdir=${archlibdir} \
|
|
290 INSTALL_STRIP=${INSTALL_STRIP})
|
|
291 ${INSTALL_PROGRAM} $(INSTALL_STRIP) src/emacs ${bindir}/emacs-${version}
|
6013
|
292 -chmod 1755 ${bindir}/emacs-${version}
|
7032
|
293 rm -f ${bindir}/$(EMACS)
|
|
294 -ln ${bindir}/emacs-${version} ${bindir}/$(EMACS)
|
6013
|
295
|
13901
|
296 ### Install the files that are machine-independent.
|
|
297 ### Most of them come straight from the distribution;
|
|
298 ### the exception is the DOC-* files, which are copied
|
18533
|
299 ## from the build directory.
|
13901
|
300
|
18533
|
301 ## Note that we copy DOC* and then delete DOC
|
|
302 ## as a workaround for a bug in tar on Ultrix 4.2.
|
18658
|
303 install-arch-indep: mkdir
|
617
|
304 -set ${COPYDESTS} ; \
|
13901
|
305 for dir in ${COPYDIR} ; do \
|
|
306 if [ `(cd $$1 && /bin/pwd)` != `(cd $${dir} && /bin/pwd)` ] ; then \
|
|
307 rm -rf $$1 ; \
|
|
308 fi ; \
|
|
309 shift ; \
|
|
310 done
|
3123
|
311 -set ${COPYDESTS} ; \
|
13901
|
312 mkdir ${COPYDESTS} ; \
|
|
313 chmod ugo+rx ${COPYDESTS} ; \
|
|
314 for dir in ${COPYDIR} ; do \
|
|
315 dest=$$1 ; shift ; \
|
|
316 [ -d $${dir} ] \
|
|
317 && [ `(cd $${dir} && /bin/pwd)` != `(cd $${dest} && /bin/pwd)` ] \
|
|
318 && (echo "Copying $${dir} to $${dest}..." ; \
|
|
319 (cd $${dir}; tar -cf - . )|(cd $${dest};umask 022; tar -xvf - ); \
|
|
320 for subdir in `find $${dest} -type d ! -name RCS -print` ; do \
|
|
321 rm -rf $${subdir}/RCS ; \
|
|
322 rm -rf $${subdir}/CVS ; \
|
|
323 rm -f $${subdir}/\#* ; \
|
|
324 rm -f $${subdir}/.\#* ; \
|
|
325 rm -f $${subdir}/*~ ; \
|
|
326 rm -f $${subdir}/*.orig ; \
|
|
327 rm -f $${subdir}/[mM]akefile* ; \
|
|
328 rm -f $${subdir}/ChangeLog* ; \
|
|
329 rm -f $${subdir}/dired.todo ; \
|
|
330 done) ; \
|
|
331 done
|
9556
|
332 -rm -f ${lispdir}/subdirs.el
|
11227
91377b178920
(install-arch-indep, dist): look for `update-subdir' in $(srcdir).
Richard M. Stallman <rms@gnu.org>
diff
changeset
|
333 $(srcdir)/update-subdirs ${lispdir}
|
14143
|
334 -chmod -R a+r ${COPYDESTS}
|
7390
|
335 if [ `(cd ./etc; /bin/pwd)` != `(cd ${docdir}; /bin/pwd)` ]; \
|
|
336 then \
|
13757
|
337 echo "Copying etc/DOC-* to ${docdir} ..." ; \
|
15323
|
338 (cd ./etc; tar -cf - DOC*)|(cd ${docdir}; umask 0; tar -xvf - ); \
|
13901
|
339 (cd $(docdir); chmod a+r DOC*; rm DOC) \
|
7390
|
340 else true; fi
|
15323
|
341 if [ -r ./lisp ] \
|
|
342 && [ x`(cd ./lisp; /bin/pwd)` != x`(cd ${lispdir}; /bin/pwd)` ] \
|
14555
|
343 && [ x`(cd ${srcdir}/lisp; /bin/pwd)` != x`(cd ./lisp; /bin/pwd)` ]; \
|
|
344 then \
|
|
345 echo "Copying lisp/*.el and lisp/*.elc to ${lispdir} ..." ; \
|
|
346 (cd lisp; tar -cf - *.el *.elc)|(cd ${lispdir}; umask 0; tar -xvf - ); \
|
|
347 else true; fi
|
7704
|
348 thisdir=`/bin/pwd`; \
|
3426
|
349 if [ `(cd ${srcdir}/info && /bin/pwd)` != `(cd ${infodir} && /bin/pwd)` ]; \
|
6394
|
350 then \
|
13002
|
351 (cd ${infodir}; \
|
13676
|
352 if [ -f dir ]; then \
|
13660
|
353 if [ ! -f dir.old ]; then mv -f dir dir.old; \
|
|
354 else mv -f dir dir.bak; fi; \
|
|
355 fi; \
|
13002
|
356 cd ${srcdir}/info ; \
|
|
357 (cd $${thisdir}; ${INSTALL_DATA} ${srcdir}/info/dir ${infodir}/dir); \
|
13901
|
358 (cd $${thisdir}; chmod a+r ${infodir}/dir); \
|
15869
|
359 for f in ccmode* cl* dired-x* ediff* emacs* forms* gnus* info* message* mh-e* sc* vip*; do \
|
13901
|
360 (cd $${thisdir}; \
|
|
361 ${INSTALL_DATA} ${srcdir}/info/$$f ${infodir}/$$f; \
|
|
362 chmod a+r ${infodir}/$$f); \
|
6350
|
363 done); \
|
3426
|
364 else true; fi
|
13901
|
365 thisdir=`/bin/pwd`; \
|
|
366 cd ${srcdir}/etc; \
|
|
367 for page in emacs etags ctags ; do \
|
|
368 (cd $${thisdir}; \
|
|
369 ${INSTALL_DATA} ${srcdir}/etc/$${page}.1 ${man1dir}/$${page}${manext}; \
|
|
370 chmod a+r ${man1dir}/$${page}${manext}); \
|
1698
|
371 done
|
596
|
372
|
18533
|
373 ### Install LEIM files. Although they are machine-independent, we
|
|
374 ### have separate target here instead of including it in
|
|
375 ### `install-arch-indep'. People who extracted LEIM files after they
|
|
376 ### insalled Emacs itself can install only LEIM files by this target.
|
|
377 install-leim: leim/Makefile
|
18620
|
378 cd leim; $(MAKE) install
|
18533
|
379
|
14848
|
380 ### Build Emacs and install it, stripping binaries while installing them.
|
|
381 install-strip:
|
15975
|
382 $(MAKE) INSTALL_STRIP=-s
|
14848
|
383
|
1698
|
384 ### Build all the directories we're going to install Emacs in. Since
|
1686
|
385 ### we may be creating several layers of directories (for example,
|
9497
|
386 ### /usr/local/lib/emacs/19.0/mips-dec-ultrix4.2), we use mkinstalldirs
|
10064
|
387 ### instead of mkdir. Not all systems' mkdir programs have the `-p' flag.
|
8807
|
388 mkdir: FRC
|
13518
|
389 $(srcdir)/mkinstalldirs ${COPYDESTS} ${lockdir} ${infodir} ${man1dir} \
|
9457
|
390 ${bindir} ${datadir} ${docdir} ${libexecdir} \
|
8163
|
391 `echo ${locallisppath} | sed 's/:/ /g'`
|
12375
|
392 -chmod a+rwx ${lockdir}
|
491
|
393
|
3780
|
394 ### Delete all the installed files that the `install' target would
|
|
395 ### create (but not the noninstalled files such as `make all' would
|
|
396 ### create).
|
3786
|
397 ###
|
|
398 ### Don't delete the lisp and etc directories if they're in the source tree.
|
3780
|
399 uninstall:
|
3786
|
400 (cd lib-src; \
|
4793
|
401 $(MAKE) $(MFLAGS) uninstall \
|
3786
|
402 prefix=${prefix} exec_prefix=${exec_prefix} \
|
9457
|
403 bindir=${bindir} libexecdir=${libexecdir} archlibdir=${archlibdir})
|
3786
|
404 for dir in ${lispdir} ${etcdir} ; do \
|
7405
|
405 if [ -d $${dir} ]; then \
|
7704
|
406 case `(cd $${dir} ; /bin/pwd)` in \
|
|
407 `(cd ${srcdir} ; /bin/pwd)`* ) ;; \
|
7405
|
408 * ) rm -rf $${dir} ;; \
|
|
409 esac ; \
|
|
410 case $${dir} in \
|
|
411 ${datadir}/emacs/${version}/* ) \
|
|
412 rm -rf ${datadir}/emacs/${version} \
|
|
413 ;; \
|
|
414 esac ; \
|
|
415 fi ; \
|
3786
|
416 done
|
12479
|
417 (cd ${infodir} && rm -f cl* dired-x* ediff* emacs* forms* gnus* info* mh-e* sc* vip*)
|
13518
|
418 (cd ${man1dir} && rm -f emacs.1 etags.1 ctags.1)
|
9815
|
419 (cd ${bindir} && rm -f emacs-${version} $(EMACS))
|
3780
|
420
|
|
421
|
8807
|
422 FRC:
|
1686
|
423
|
|
424 # ==================== Cleaning up and miscellanea ====================
|
|
425
|
10685
|
426 .PHONY: mostlyclean clean distclean maintainer-clean extraclean
|
5630
|
427
|
3780
|
428 ### `mostlyclean'
|
|
429 ### Like `clean', but may refrain from deleting a few files that people
|
|
430 ### normally don't want to recompile. For example, the `mostlyclean'
|
|
431 ### target for GCC does not delete `libgcc.a', because recompiling it
|
|
432 ### is rarely necessary and takes a lot of time.
|
8807
|
433 mostlyclean: FRC
|
4793
|
434 (cd src; $(MAKE) $(MFLAGS) mostlyclean)
|
|
435 (cd oldXMenu; $(MAKE) $(MFLAGS) mostlyclean)
|
5630
|
436 (cd lwlib; $(MAKE) $(MFLAGS) mostlyclean)
|
4793
|
437 (cd lib-src; $(MAKE) $(MFLAGS) mostlyclean)
|
7603
|
438 -(cd man && $(MAKE) $(MFLAGS) mostlyclean)
|
18695
|
439 (cd leim; $(MAKE) $(MFLAGS) mostlyclean)
|
3780
|
440
|
1686
|
441 ### `clean'
|
3780
|
442 ### Delete all files from the current directory that are normally
|
|
443 ### created by building the program. Don't delete the files that
|
|
444 ### record the configuration. Also preserve files that could be made
|
|
445 ### by building, but normally aren't because the distribution comes
|
|
446 ### with them.
|
1686
|
447 ###
|
3780
|
448 ### Delete `.dvi' files here if they are not part of the distribution.
|
8807
|
449 clean: FRC
|
4793
|
450 (cd src; $(MAKE) $(MFLAGS) clean)
|
|
451 (cd oldXMenu; $(MAKE) $(MFLAGS) clean)
|
5630
|
452 (cd lwlib; $(MAKE) $(MFLAGS) clean)
|
4793
|
453 (cd lib-src; $(MAKE) $(MFLAGS) clean)
|
7603
|
454 -(cd man && $(MAKE) $(MFLAGS) clean)
|
18695
|
455 (cd leim; $(MAKE) $(MFLAGS) clean)
|
617
|
456
|
1686
|
457 ### `distclean'
|
3780
|
458 ### Delete all files from the current directory that are created by
|
|
459 ### configuring or building the program. If you have unpacked the
|
|
460 ### source and built the program without creating any other files,
|
|
461 ### `make distclean' should leave only the files that were in the
|
|
462 ### distribution.
|
|
463 top_distclean=\
|
12375
|
464 rm -f config.status config.cache config.log ; \
|
3780
|
465 rm -f Makefile ${SUBDIR_MAKEFILES} ; \
|
18897
|
466 (cd lock && (rm -f * || true))
|
8807
|
467 distclean: FRC
|
4793
|
468 (cd src; $(MAKE) $(MFLAGS) distclean)
|
|
469 (cd oldXMenu; $(MAKE) $(MFLAGS) distclean)
|
5630
|
470 (cd lwlib; $(MAKE) $(MFLAGS) distclean)
|
4793
|
471 (cd lib-src; $(MAKE) $(MFLAGS) distclean)
|
7603
|
472 (cd man && $(MAKE) $(MFLAGS) distclean)
|
18695
|
473 (cd leim; $(MAKE) $(MFLAGS) distclean)
|
3780
|
474 ${top_distclean}
|
617
|
475
|
10685
|
476 ### `maintainer-clean'
|
3780
|
477 ### Delete everything from the current directory that can be
|
|
478 ### reconstructed with this Makefile. This typically includes
|
|
479 ### everything deleted by distclean, plus more: C source files
|
|
480 ### produced by Bison, tags tables, info files, and so on.
|
|
481 ###
|
10685
|
482 ### One exception, however: `make maintainer-clean' should not delete
|
3780
|
483 ### `configure' even if `configure' can be remade using a rule in the
|
10685
|
484 ### Makefile. More generally, `make maintainer-clean' should not delete
|
3780
|
485 ### anything that needs to exist in order to run `configure' and then
|
|
486 ### begin to build the program.
|
10685
|
487 maintainer-clean: FRC
|
|
488 (cd src; $(MAKE) $(MFLAGS) maintainer-clean)
|
|
489 (cd oldXMenu; $(MAKE) $(MFLAGS) maintainer-clean)
|
|
490 (cd lwlib; $(MAKE) $(MFLAGS) maintainer-clean)
|
|
491 (cd lib-src; $(MAKE) $(MFLAGS) maintainer-clean)
|
|
492 -(cd man && $(MAKE) $(MFLAGS) maintainer-clean)
|
18695
|
493 (cd leim; $(MAKE) $(MFLAGS) maintainer-clean)
|
3780
|
494 ${top_distclean}
|
617
|
495
|
1686
|
496 ### This doesn't actually appear in the coding standards, but Karl
|
|
497 ### says GCC supports it, and that's where the configuration part of
|
|
498 ### the coding standards seem to come from. It's like distclean, but
|
|
499 ### it deletes backup and autosave files too.
|
|
500 extraclean:
|
4793
|
501 for i in ${SUBDIR}; do (cd $$i; $(MAKE) $(MFLAGS) extraclean); done
|
14360
|
502 ${top_distclean}
|
|
503 -rm config-tmp-*
|
1686
|
504 -rm -f *~ \#*
|
|
505
|
2261
|
506 ### Unlocking and relocking. The idea of these productions is to reduce
|
|
507 ### hassles when installing an incremental tar of Emacs. Do `make unlock'
|
|
508 ### before unlocking the file to take the write locks off all sources so
|
|
509 ### that tar xvof will overwrite them without fuss. Then do `make relock'
|
|
510 ### afterward so that VC mode will know which files should be checked in
|
|
511 ### if you want to mung them.
|
|
512 ###
|
|
513 ### Note: it's no disaster if these productions miss a file or two; tar
|
|
514 ### and VC will swiftly let you know if this happens, and it is easily
|
|
515 ### corrected.
|
|
516 SOURCES = ChangeLog GETTING.GNU.SOFTWARE INSTALL Makefile.in PROBLEMS \
|
9506
|
517 README configure make-dist move-if-change
|
2261
|
518
|
5630
|
519 .PHONY: unlock relock
|
|
520
|
2261
|
521 unlock:
|
|
522 chmod u+w $(SOURCES) cpp/*
|
|
523 -(cd elisp; chmod u+w Makefile README *.texi)
|
4793
|
524 (cd etc; $(MAKE) $(MFLAGS) unlock)
|
|
525 (cd lib-src; $(MAKE) $(MFLAGS) unlock)
|
|
526 (cd lisp; $(MAKE) $(MFLAGS) unlock)
|
2261
|
527 (cd lisp/term; chmod u+w README *.el)
|
|
528 (cd man; chmod u+w *texi* ChangeLog split-man)
|
|
529 (cd oldXMenu; chmod u+w *.[ch] Makefile README)
|
5630
|
530 (cd lwlib; chmod u+w *.[ch] Makefile README)
|
4793
|
531 (cd src; $(MAKE) $(MFLAGS) unlock)
|
2261
|
532
|
|
533 relock:
|
|
534 chmod u-w $(SOURCES) cpp/*
|
|
535 -(cd elisp; chmod u-w Makefile README *.texi)
|
4793
|
536 (cd etc; $(MAKE) $(MFLAGS) relock)
|
|
537 (cd lib-src; $(MAKE) $(MFLAGS) relock)
|
|
538 (cd lisp; $(MAKE) $(MFLAGS) relock)
|
2261
|
539 (cd lisp/term; chmod u+w README *.el)
|
|
540 (cd man; chmod u+w *texi* ChangeLog split-man)
|
|
541 (cd oldXMenu; chmod u+w *.[ch] Makefile README)
|
5630
|
542 (cd lwlib; chmod u+w *.[ch] Makefile README)
|
4793
|
543 (cd src; $(MAKE) $(MFLAGS) relock)
|
1686
|
544
|
617
|
545 TAGS tags: lib-src
|
7462
|
546 cd ${srcdir}/src; $(MAKE) tags
|
617
|
547
|
|
548 check:
|
|
549 @echo "We don't have any tests for GNU Emacs yet."
|
621
|
550
|
|
551 dist:
|
1686
|
552 cd ${srcdir}; make-dist
|
3780
|
553
|
5321
|
554 .PHONY: info dvi dist check
|
|
555 force-info:
|
|
556 info: force-info
|
4793
|
557 (cd ${srcdir}/man; $(MAKE) $(MFLAGS) info)
|
3780
|
558 dvi:
|
10064
|
559 (cd man; $(MAKE) $(MFLAGS) dvi)
|