]> code.delx.au - gnu-emacs/blob - lisp/makefile.w32-in
39af7a8c4729b8ae55d5e7b25ceb508d381bb208
[gnu-emacs] / lisp / makefile.w32-in
1 # -*- Makefile -*- for GNU Emacs on the Microsoft W32 API.
2 # Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
3 # 2009, 2010, 2011 Free Software Foundation, Inc.
4
5 # This file is part of GNU Emacs.
6
7 # GNU Emacs is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation, either version 3 of the License, or
10 # (at your option) any later version.
11
12 # GNU Emacs is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
16
17 # You should have received a copy of the GNU General Public License
18 # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
19
20 ALL =
21
22 all: $(ALL)
23
24 SQUOTE='
25 # '
26
27 lisp = $(CURDIR)
28 srcdir = $(CURDIR)/..
29
30 # You can specify a different executable on the make command line,
31 # e.g. "make EMACS=../src/emacs ...".
32
33 EMACS = $(THISDIR)/../bin/emacs.exe
34
35 # Command line flags for Emacs.
36
37 EMACSOPT = -batch --no-site-file --no-site-lisp
38
39 # Extra flags to pass to the byte compiler
40 BYTE_COMPILE_EXTRA_FLAGS =
41 # For example to not display the undefined function warnings you can use this:
42 # BYTE_COMPILE_EXTRA_FLAGS = --eval '(setq byte-compile-warnings (quote (not unresolved)))'
43 # The example above is just for developers, it should not be used by default.
44
45 # Set EMACSLOADPATH correctly (already defined in environment).
46 EMACSLOADPATH=$(lisp)
47
48 # Use C locale
49 LC_ALL = C
50
51 lisptagsfiles1 = $(lisp)/*.el
52 lisptagsfiles2 = $(lisp)/*/*.el
53 lisptagsfiles3 = $(lisp)/*/*/*.el
54 lisptagsfiles4 = $(lisp)/*/*/*/*.el
55 ETAGS = "../lib-src/$(BLD)/etags.exe"
56 ## $(DEST) is overridden by ../src/makefile.w32-in.
57 DEST=$(lisp)
58
59 # Automatically generated autoload files, apart from lisp/loaddefs.el.
60 LOADDEFS = $(lisp)/calendar/cal-loaddefs.el \
61 $(lisp)/calendar/diary-loaddefs.el $(lisp)/calendar/hol-loaddefs.el \
62 $(lisp)/mh-e/mh-loaddefs.el $(lisp)/net/tramp-loaddefs.el
63
64 AUTOGENEL = $(lisp)/loaddefs.el $(LOADDEFS) $(lisp)/cus-load.el \
65 $(lisp)/finder-inf.el $(lisp)/subdirs.el $(lisp)/eshell/esh-groups.el \
66 $(lisp)/calc/calc-loaddefs.el $(lisp)/nxml/subdirs.el \
67 $(lisp)/cedet/semantic/loaddefs.el $(lisp)/cedet/ede/loaddefs.el \
68 $(lisp)/cedet/srecode/loaddefs.el
69
70 # Files to compile before others during a bootstrap. This is done to
71 # speed up the bootstrap process. The CC files are compiled first
72 # because CC mode tweaks the compilation process, and requiring
73 # cc-mode when it is not compiled doesn't work during the
74 # bootstrapping.
75
76 COMPILE_FIRST = \
77 $(lisp)/emacs-lisp/byte-opt.el \
78 $(lisp)/emacs-lisp/bytecomp.el \
79 $(lisp)/subr.el \
80 $(lisp)/progmodes/cc-mode.el \
81 $(lisp)/progmodes/cc-vars.el
82
83 # The actual Emacs command run in the targets below.
84 # The quotes around $(EMACS) are here because the user could type
85 # it with forward slashes and without quotes, which will fail if
86 # the shell is cmd.exe.
87
88 emacs = "$(EMACS)" $(EMACSOPT)
89
90 # Have to define the list of subdirs manually when not using sh.
91 WINS_CEDET=\
92 cedet \
93 cedet/ede \
94 cedet/semantic \
95 cedet/srecode \
96 cedet/semantic/analyze \
97 cedet/semantic/bovine \
98 cedet/semantic/decorate \
99 cedet/semantic/symref \
100 cedet/semantic/wisent
101
102 WINS_BASIC=\
103 calc \
104 calendar \
105 emacs-lisp \
106 emulation \
107 erc \
108 eshell \
109 gnus \
110 international \
111 language \
112 mail \
113 mh-e \
114 net \
115 nxml \
116 org \
117 play \
118 progmodes \
119 textmodes \
120 url \
121 vc
122
123 # Directories with lisp files to compile, and to extract data from
124 # (customs, autoloads, etc.)
125 WINS_UPDATES=$(WINS_BASIC) \
126 $(WINS_CEDET)
127
128 # Directories to add to subdirs.el
129 WINS_SUBDIR=$(WINS_BASIC) \
130 obsolete
131
132 # All directories
133 WINS= $(WINS_UPDATES) \
134 term \
135 obsolete
136
137 doit:
138
139 cus-load.el-SH:
140 echo ";;; cus-load.el --- automatically extracted custom dependencies" > $@
141 echo ";;" >> $@; echo ";;; Code:" >> $@
142 echo "\f" >> $@
143 echo ";; Local Variables:" >> $@
144 echo ";; version-control: never" >> $@
145 echo ";; no-byte-compile: t" >> $@
146 echo ";; no-update-autoloads: t" >> $@
147 echo ";; End:" >> $@
148
149 cus-load.el-CMD:
150 echo ;;; cus-load.el --- automatically extracted custom dependencies> $@
151 echo ;;>> $@
152 echo ;;; Code:>> $@
153 echo.\f>> $@
154 echo ;; Local Variables:>> $@
155 echo ;; version-control: never>> $@
156 echo ;; no-byte-compile: t>> $@
157 echo ;; no-update-autoloads: t>> $@
158 echo ;; End:>> $@
159
160 $(lisp)/cus-load.el:
161 $(MAKE) $(MFLAGS) cus-load.el-$(SHELLTYPE)
162 mv cus-load.el-$(SHELLTYPE) $@
163
164 # WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as
165 # this can break with GNU Make 3.81 and later if sh.exe is used.
166 custom-deps: $(lisp)/cus-load.el $(lisp)/loaddefs.el doit
167 @echo Directories: $(WINS_UPDATES)
168 -$(emacs) -l cus-dep --eval $(ARGQUOTE)(setq find-file-hook nil)$(ARGQUOTE) \
169 -f custom-make-dependencies $(lisp) $(WINS_UPDATES)
170
171 finder-data: $(lisp)/loaddefs.el doit
172 @echo Directories: $(WINS_UPDATES)
173 $(emacs) -l finder -f finder-compile-keywords-make-dist $(lisp) $(WINS_UPDATES)
174
175 $(lisp)/loaddefs.el:
176 $(MAKE) $(MFLAGS) loaddefs.el-$(SHELLTYPE)
177 cp loaddefs.el-$(SHELLTYPE) $@
178 rm loaddefs.el-$(SHELLTYPE)
179
180 loaddefs.el-SH:
181 echo ";;; loaddefs.el --- automatically extracted autoloads" > $@
182 echo ";;" >> $@; echo ";;; Code:" >> $@
183 echo "\f" >> $@
184 echo ";; Local Variables:" >> $@
185 echo ";; version-control: never" >> $@
186 echo ";; no-byte-compile: t" >> $@
187 echo ";; no-update-autoloads: t" >> $@
188 echo ";; coding: utf-8" >> $@
189 echo ";; End:" >> $@
190 echo ";;; loaddefs.el ends here" >> $@
191
192 loaddefs.el-CMD:
193 echo ;;; loaddefs.el --- automatically extracted autoloads> $@
194 echo ;;>> $@
195 echo ;;; Code:>> $@
196 echo.\f>> $@
197 echo ;; Local Variables:>> $@
198 echo ;; version-control: never>> $@
199 echo ;; no-byte-compile: t>> $@
200 echo ;; no-update-autoloads: t>> $@
201 echo ;; coding: utf-8>> $@
202 echo ;; End:>> $@
203 echo ;;; loaddefs.el ends here>> $@
204
205 # Use . instead of $(lisp) because $(lisp) is an absolute file name,
206 # including a drive letter and any leading directories, so the generated
207 # loaddefs.el will mention file names that on other machine reference
208 # possibly non-existent directories.
209 #
210 # WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as
211 # this can break with GNU Make 3.81 and later if sh.exe is used.
212 autoloads: $(lisp)/loaddefs.el $(LOADDEFS) doit
213 @echo Directories: . $(WINS_UPDATES)
214 $(emacs) -l autoload \
215 --eval $(ARGQUOTE)(setq find-file-hook nil find-file-suppress-same-file-warnings t)$(ARGQUOTE) \
216 -f w32-batch-update-autoloads "$(lisp)/loaddefs.el" $(MAKE) . $(WINS_UPDATES)
217
218 $(lisp)/subdirs.el:
219 $(MAKE) $(MFLAGS) update-subdirs
220
221 # Need separate version for sh and native cmd.exe
222 update-subdirs: update-subdirs-$(SHELLTYPE)
223
224 update-subdirs-CMD: doit
225 echo ;; -*- no-byte-compile: t -*-> $(lisp)/subdirs.el
226 echo ;; In load-path, after this directory should come>> $(lisp)/subdirs.el
227 echo ;; certain of its subdirectories. Here we specify them.>> $(lisp)/subdirs.el
228 echo (normal-top-level-add-to-load-path $(SQUOTE)(>> $(lisp)/subdirs.el
229 @for %%d in ($(WINS_SUBDIR) cedet) do echo "%%d">> $(lisp)/subdirs.el
230 echo ))>> $(lisp)/subdirs.el
231
232 update-subdirs-SH: doit
233 $(srcdir)/update-subdirs $(lisp); \
234 for file in $(WINS_SUBDIR); do \
235 $(srcdir)/update-subdirs $$file; \
236 done;
237
238 updates: update-subdirs autoloads mh-autoloads finder-data custom-deps
239
240 # This is useful after "bzr up".
241 bzr-update: recompile autoloads finder-data custom-deps
242
243 # For backwards compatibility:
244 cvs-update: bzr-update
245
246 # Update the AUTHORS file.
247
248 update-authors:
249 $(emacs) -l authors -f batch-update-authors $(srcdir)/etc/AUTHORS $(srcdir)
250
251 TAGS: TAGS-$(MAKETYPE)
252
253 TAGS-LISP: TAGS-LISP-$(MAKETYPE)
254
255 TAGS-nmake:
256 echo This target is not supported with NMake
257 exit -1
258
259 TAGS-LISP-nmake:
260 echo This target is not supported with NMake
261 exit -1
262
263 TAGS-gmake: TAGS-$(SHELLTYPE)
264
265 TAGS-LISP-gmake: TAGS-LISP-$(SHELLTYPE)
266
267 TAGS-SH: $(lisptagsfiles1) $(lisptagsfiles2) $(lisptagsfiles3) $(lisptagsfiles4)
268 - $(DEL) TAGS
269 for dir in . $(WINS_UPDATES); do \
270 $(ETAGS) -a $(lisp)/$$dir/*.el; \
271 done
272
273 TAGS-LISP-SH: $(lisptagsfiles1) $(lisptagsfiles2) $(lisptagsfiles3) $(lisptagsfiles4)
274 - $(DEL) $(DEST)/TAGS-LISP
275 for dir in . $(WINS_UPDATES); do \
276 $(ETAGS) -a -o $(DEST)/TAGS-LISP $(lisp)/$$dir/*.el; \
277 done
278
279 TAGS-CMD: $(lisptagsfiles1) $(lisptagsfiles2) $(lisptagsfiles3) $(lisptagsfiles4)
280 - $(DEL) TAGS
281 for %%d in (. $(WINS_UPDATES)) do $(ETAGS) -a $(lisp)/%%d/*.el
282
283 TAGS-LISP-CMD: $(lisptagsfiles1) $(lisptagsfiles2) $(lisptagsfiles3) $(lisptagsfiles4)
284 - $(DEL) $(DEST)/TAGS-LISP
285 for %%d in (. $(WINS_UPDATES)) do \
286 $(ETAGS) -a -o $(DEST)/TAGS-LISP $(lisp)/%%d/*.el
287
288 .SUFFIXES: .elc .el
289
290 .el.elc:
291 -$(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile $<
292
293 # Compile all Lisp files, but don't recompile those that are up to
294 # date. Some files don't actually get compiled because they set the
295 # local variable no-byte-compile.
296
297 # All .elc files are made writable before compilation in case we
298 # checked out read-only (CVS option -r). Files MUST be compiled one by
299 # one. If we compile several files in a row we can't make sure that
300 # the compilation environment is clean. We also set the load-path of
301 # the Emacs used for compilation to the current directory and its
302 # subdirectories, to make sure require's and load's in the files being
303 # compiled find the right files.
304
305 # Need separate version for sh and native cmd.exe
306 compile: $(lisp)/subdirs.el mh-autoloads compile-$(SHELLTYPE) doit
307
308 compile-CMD:
309 # -for %%f in ($(lisp) $(WINS)) do for %%g in (%%f\*.elc) do @attrib -r %%g
310 for %%f in ($(COMPILE_FIRST)) do \
311 $(emacs) -l loaddefs $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile-if-not-done %%f
312 for %%f in (. $(WINS)) do for %%g in (%%f/*.el) do \
313 $(emacs) -l loaddefs $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile-if-not-done %%f/%%g
314
315 compile-SH:
316 # for elc in $(lisp)/*.elc $(lisp)/*/*.elc; do attrib -r $$elc; done
317 for el in $(COMPILE_FIRST); do \
318 echo Compiling $$el; \
319 $(emacs) -l loaddefs $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile-if-not-done $$el; \
320 done
321 for dir in $(lisp) $(WINS); do \
322 for el in $$dir/*.el; do \
323 if test -f $$el; \
324 then \
325 echo Compiling $$el; \
326 $(emacs) -l loaddefs $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile-if-not-done $$el; \
327 fi \
328 done; \
329 done
330
331 # Compile all Lisp files. This is like `compile' but compiles files
332 # unconditionally. Some files don't actually get compiled because they
333 # set the local variable no-byte-compile.
334
335 compile-always: $(lisp)/subdirs.el compile-always-$(SHELLTYPE) doit
336
337 compile-always-CMD:
338 # -for %%f in ($(lisp) $(WINS)) do for %%g in (%%f\*.elc) do @attrib -r %%g
339 for %%f in ($(COMPILE_FIRST)) do $(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile %%f
340 for %%f in (. $(WINS)) do for %%g in (%%f/*.el) do $(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile %%f/%%g
341
342 compile-always-SH:
343 # for elc in $(lisp)/*.elc $(lisp)/*/*.elc; do attrib -r $$elc; done
344 for el in $(COMPILE_FIRST); do \
345 echo Compiling $$el; \
346 $(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile $$el || exit 1; \
347 done
348 for dir in $(lisp) $(WINS); do \
349 for el in $$dir/*.el; do \
350 echo Compiling $$el; \
351 $(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile $$el || exit 1; \
352 done; \
353 done
354
355 compile-calc: compile-calc-$(SHELLTYPE)
356
357 compile-calc-CMD:
358 for %%f in ($(lisp)/calc/*.el) do $(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile %%f
359
360 compile-calc-SH:
361 for el in $(lisp)/calc/*.el; do \
362 echo Compiling $$el; \
363 $(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile $$el || exit 1; \
364 done
365
366 # Backup compiled Lisp files in elc.tar.gz. If that file already
367 # exists, make a backup of it.
368
369 backup-compiled-files:
370 -mv $(lisp)/elc.tar.gz $(lisp)/elc.tar.gz~
371 -tar czf $(lisp)/elc.tar.gz $(lisp)/*.elc $(lisp)/*/*.elc
372
373 # Compile Lisp files, but save old compiled files first.
374
375 compile-after-backup: backup-compiled-files compile-always
376
377 compile-first: $(lisp)/emacs-lisp/bytecomp.elc $(lisp)/emacs-lisp/byte-opt.elc \
378 $(lisp)/emacs-lisp/autoload.elc
379
380 # Recompile all Lisp files which are newer than their .elc files.
381 # Note that this doesn't create .elc files. It only recompiles if an
382 # .elc is present.
383 # WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as
384 # this can break with GNU Make 3.81 and later if sh.exe is used.
385 recompile: compile-first autoloads doit $(lisp)/progmodes/cc-mode.elc
386 $(emacs) --eval $(ARGQUOTE)(batch-byte-recompile-directory 0)$(ARGQUOTE) $(lisp)
387
388 $(lisp)/calendar/cal-loaddefs.el:
389 "$(EMACS)" $(EMACSOPT) -l autoload \
390 --eval "(setq generate-autoload-cookie \";;;###cal-autoload\")" \
391 --eval "(setq find-file-suppress-same-file-warnings t)" \
392 --eval "(setq make-backup-files nil)" \
393 -f w32-batch-update-autoloads "$(lisp)/calendar/cal-loaddefs.el" \
394 $(MAKE) ./calendar
395
396 $(lisp)/calendar/diary-loaddefs.el:
397 "$(EMACS)" $(EMACSOPT) -l autoload \
398 --eval "(setq generate-autoload-cookie \";;;###diary-autoload\")" \
399 --eval "(setq find-file-suppress-same-file-warnings t)" \
400 --eval "(setq make-backup-files nil)" \
401 -f w32-batch-update-autoloads $(lisp)/calendar/diary-loaddefs.el \
402 $(MAKE) ./calendar
403
404 $(lisp)/calendar/hol-loaddefs.el:
405 "$(EMACS)" $(EMACSOPT) -l autoload \
406 --eval "(setq generate-autoload-cookie \";;;###holiday-autoload\")" \
407 --eval "(setq find-file-suppress-same-file-warnings t)" \
408 --eval "(setq make-backup-files nil)" \
409 -f w32-batch-update-autoloads $(lisp)/calendar/hol-loaddefs.el \
410 $(MAKE) ./calendar
411
412 # Update MH-E internal autoloads. These are not to be confused with
413 # the autoloads for the MH-E entry points, which are already in
414 # loaddefs.el.
415 MH_E_SRC = $(lisp)/mh-e/mh-acros.el $(lisp)/mh-e/mh-alias.el \
416 $(lisp)/mh-e/mh-buffers.el $(lisp)/mh-e/mh-compat.el \
417 $(lisp)/mh-e/mh-comp.el $(lisp)/mh-e/mh-e.el \
418 $(lisp)/mh-e/mh-folder.el $(lisp)/mh-e/mh-funcs.el \
419 $(lisp)/mh-e/mh-gnus.el $(lisp)/mh-e/mh-identity.el \
420 $(lisp)/mh-e/mh-inc.el $(lisp)/mh-e/mh-junk.el \
421 $(lisp)/mh-e/mh-letter.el $(lisp)/mh-e/mh-limit.el \
422 $(lisp)/mh-e/mh-mime.el $(lisp)/mh-e/mh-print.el \
423 $(lisp)/mh-e/mh-scan.el $(lisp)/mh-e/mh-search.el \
424 $(lisp)/mh-e/mh-seq.el $(lisp)/mh-e/mh-show.el \
425 $(lisp)/mh-e/mh-speed.el $(lisp)/mh-e/mh-thread.el \
426 $(lisp)/mh-e/mh-tool-bar.el $(lisp)/mh-e/mh-utils.el \
427 $(lisp)/mh-e/mh-xface.el
428
429 # See the commentary for autoloads above for why we use ./mh-e below
430 # instead of $(lisp)/mh-e.
431 mh-autoloads: $(lisp)/mh-e/mh-loaddefs.el
432 $(lisp)/mh-e/mh-loaddefs.el: $(MH_E_SRC)
433 "$(EMACS)" $(EMACSOPT) \
434 -l autoload \
435 --eval $(ARGQUOTE)(setq generate-autoload-cookie $(DQUOTE);;;###mh-autoload$(DQUOTE))$(ARGQUOTE) \
436 --eval $(ARGQUOTE)(setq find-file-suppress-same-file-warnings t)$(ARGQUOTE) \
437 --eval $(ARGQUOTE)(setq make-backup-files nil)$(ARGQUOTE) \
438 -f w32-batch-update-autoloads \
439 $(ARGQUOTE)$(lisp)/mh-e/mh-loaddefs.el$(ARGQUOTE) $(MAKE) ./mh-e
440
441 # Update TRAMP internal autoloads. Maybe we could move tramp*.el into
442 # its own subdirectory. OTOH, it does not hurt to keep them in
443 # lisp/net.
444 TRAMP_SRC = $(lisp)/net/tramp.el $(lisp)/net/tramp-cache.el \
445 $(lisp)/net/tramp-cmds.el $(lisp)/net/tramp-compat.el \
446 $(lisp)/net/tramp-ftp.el $(lisp)/net/tramp-gvfs.el \
447 $(lisp)/net/tramp-gw.el $(lisp)/net/tramp-imap.el \
448 $(lisp)/net/tramp-sh.el $(lisp)/net/tramp-smb.el \
449 $(lisp)/net/tramp-uu.el $(lisp)/net/trampver.el
450
451 $(lisp)/net/tramp-loaddefs.el: $(TRAMP_SRC)
452 "$(EMACS)" $(EMACSOPT) \
453 -l autoload \
454 --eval $(ARGQUOTE)(setq generate-autoload-cookie $(DQUOTE);;;###tramp-autoload$(DQUOTE))$(ARGQUOTE) \
455 --eval $(ARGQUOTE)(setq find-file-suppress-same-file-warnings t)$(ARGQUOTE) \
456 --eval $(ARGQUOTE)(setq make-backup-files nil)$(ARGQUOTE) \
457 -f w32-batch-update-autoloads \
458 $(ARGQUOTE)$(lisp)/net/tramp-loaddefs.el$(ARGQUOTE) $(MAKE) ./net
459
460 # Prepare a bootstrap in the lisp subdirectory.
461 #
462 # Build loaddefs.el to make sure it's up-to-date. If it's not, that
463 # might lead to errors during the bootstrap because something fails to
464 # autoload as expected. If there is no emacs binary, then we can't
465 # build autoloads yet. In that case we have to use ldefs-boot.el;
466 # bootstrap should always work with ldefs-boot.el. (Because
467 # loaddefs.el is an automatically generated file, we don't want to
468 # store it in the source repository).
469 #
470 # Remove compiled Lisp files so that bootstrap-emacs will be built from
471 # sources only.
472
473 # Need separate version for sh and native cmd.exe
474 bootstrap-clean:
475 - $(DEL) $(lisp)/loaddefs.el
476 $(MAKE) $(MFLAGS) bootstrap-clean-$(SHELLTYPE)
477
478 bootstrap-clean-CMD:
479 # if exist "$(EMACS)" $(MAKE) $(MFLAGS) autoloads
480 -for %%f in (. $(WINS)) do for %%g in (%%f\*.elc) do @$(DEL) %%g
481
482 bootstrap-clean-SH:
483 # if test -f "$(EMACS)"; then $(MAKE) $(MFLAGS) autoloads; fi
484 # -rm -f $(lisp)/*.elc $(lisp)/*/*.elc
485 -for dir in . $(WINS); do rm -f $$dir/*.elc $$dir/*/*.elc $$dir/*/*/*.elc; done
486
487 # Generate/update files for the bootstrap process.
488 # When done, remove bootstrap-emacs from ../bin, so that
489 # it will not be mistaken for an installed binary.
490
491 bootstrap: update-subdirs autoloads mh-autoloads compile finder-data custom-deps
492 - $(DEL) "$(EMACS)"
493
494 #
495 # Assuming INSTALL_DIR is defined, copy the elisp files to it
496 # Windows 95 makes this harder than it should be.
497 #
498 install:
499 - mkdir "$(INSTALL_DIR)/lisp"
500 - $(DEL) ../same-dir.tst
501 - $(DEL) "$(INSTALL_DIR)/same-dir.tst"
502 echo SameDirTest > "$(INSTALL_DIR)/same-dir.tst"
503 #ifdef COPY_LISP_SOURCE
504 $(IFNOTSAMEDIR) $(MAKE) $(MFLAGS) install-lisp-$(SHELLTYPE) $(ENDIF)
505 #else
506 # $(IFNOTSAMEDIR) $(CP_DIR) *.elc "$(INSTALL_DIR)/lisp" $(ENDIF)
507 # $(IFNOTSAMEDIR) $(CP) cus-load.el "$(INSTALL_DIR)/lisp" $(ENDIF)
508 # $(IFNOTSAMEDIR) $(CP) forms*.el "$(INSTALL_DIR)/lisp" $(ENDIF)
509 # $(IFNOTSAMEDIR) $(CP) patcomp.el "$(INSTALL_DIR)/lisp" $(ENDIF)
510 # $(IFNOTSAMEDIR) $(CP) subdirs.el "$(INSTALL_DIR)/lisp" $(ENDIF)
511 # $(IFNOTSAMEDIR) $(CP) version.el "$(INSTALL_DIR)/lisp" $(ENDIF)
512 # $(IFNOTSAMEDIR) $(CP) mail/blessmail.el "$(INSTALL_DIR)/lisp/mail" $(ENDIF)
513 # $(IFNOTSAMEDIR) $(CP) mail/sc.el "$(INSTALL_DIR)/lisp/mail" $(ENDIF)
514 # $(IFNOTSAMEDIR) $(CP) play/bruce.el "$(INSTALL_DIR)/lisp/play" $(ENDIF)
515 # $(IFNOTSAMEDIR) $(CP) international/latin-*.el "$(INSTALL_DIR)/lisp/international" $(ENDIF)
516 # $(IFNOTSAMEDIR) $(CP) international/mule-conf.el "$(INSTALL_DIR)/lisp/international" $(ENDIF)
517 #endif
518 - $(DEL) ../same-dir.tst
519 - $(DEL) "$(INSTALL_DIR)/same-dir.tst"
520
521 # Need to copy *.el files first, to avoid "source file is newer" annoyance
522 # since cp does not preserve time stamps
523 install-lisp-SH:
524 cp -f *.el "$(INSTALL_DIR)/lisp"
525 for dir in $(WINS); do [ -d "$(INSTALL_DIR)/lisp/$$dir" ] || mkdir "$(INSTALL_DIR)/lisp/$$dir"; done
526 for dir in $(WINS); do cp -f $$dir/*.el "$(INSTALL_DIR)/lisp/$$dir"; done
527 for dir in . $(WINS); do cp $$dir/*.elc "$(INSTALL_DIR)/lisp/$$dir"; done
528
529 install-lisp-CMD:
530 cp -f *.el "$(INSTALL_DIR)/lisp"
531 for %%f in ($(WINS)) do if not exist "$(INSTALL_DIR)/lisp/%%f" mkdir "$(INSTALL_DIR)/lisp/%%f"
532 for %%f in ($(WINS)) do cp -f %%f/*.el "$(INSTALL_DIR)/lisp/%%f"
533 for %%f in (. $(WINS)) do cp -f %%f/*.elc "$(INSTALL_DIR)/lisp/%%f"
534
535 # WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as
536 # this can break with GNU Make 3.81 and later if sh.exe is used.
537 check-declare:
538 $(emacs) -l $(lisp)/emacs-lisp/check-declare --eval $(ARGQUOTE)(check-declare-directory $(DQUOTE)$(lisp)$(DQUOTE))$(ARGQUOTE)
539
540 #
541 # Maintenance
542 #
543 # We used to delete *~ here, but that might inadvertently remove
544 # precious files if it happens to match their short 8+3 aliases.
545 clean:
546 - $(DEL) *.el~
547 - $(DEL) calc/calc-loaddefs.el~
548 - $(DEL) eshell/esh-groups.el~
549
550 distclean: clean
551 - $(DEL) $(lisp)/Makefile
552
553 maintainer-clean: bootstrap-clean distclean
554 - $(DEL) $(AUTOGENEL)
555
556 # Dependencies
557
558 # CC Mode uses a compile time macro system which causes a compile time
559 # dependency in cc-*.elc files on the macros in other cc-*.el and the
560 # version string in cc-defs.el.
561 $(lisp)/progmodes/cc-align.elc $(lisp)/progmodes/cc-awk.elc\
562 $(lisp)/progmodes/cc-cmds.elc $(lisp)/progmodes/cc-compat.elc\
563 $(lisp)/progmodes/cc-engine.elc $(lisp)/progmodes/cc-fonts.elc\
564 $(lisp)/progmodes/cc-langs.elc $(lisp)/progmodes/cc-menus.elc\
565 $(lisp)/progmodes/cc-mode.elc $(lisp)/progmodes/cc-styles.elc\
566 $(lisp)/progmodes/cc-vars.elc: \
567 $(lisp)/progmodes/cc-bytecomp.elc $(lisp)/progmodes/cc-defs.elc
568
569 $(lisp)/progmodes/cc-align.elc: \
570 $(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-engine.elc
571
572 $(lisp)/progmodes/cc-cmds.elc: \
573 $(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-engine.elc
574
575 $(lisp)/progmodes/cc-compat.elc: \
576 $(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-styles.elc \
577 $(lisp)/progmodes/cc-engine.elc
578
579 $(lisp)/progmodes/cc-defs.elc: $(lisp)/progmodes/cc-bytecomp.elc \
580 $(lisp)/emacs-lisp/cl.elc $(lisp)/emacs-lisp/regexp-opt.elc
581
582 $(lisp)/progmodes/cc-engine.elc: $(lisp)/progmodes/cc-langs.elc \
583 $(lisp)/progmodes/cc-vars.elc
584
585 $(lisp)/progmodes/cc-fonts.elc: $(lisp)/progmodes/cc-langs.elc \
586 $(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-engine.elc \
587 $(lisp)/font-lock.elc
588
589 $(lisp)/progmodes/cc-langs.elc: $(lisp)/progmodes/cc-vars.elc \
590 $(lisp)/emacs-lisp/cl.elc
591
592 $(lisp)/progmodes/cc-mode.elc: $(lisp)/progmodes/cc-langs.elc \
593 $(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-engine.elc \
594 $(lisp)/progmodes/cc-styles.elc $(lisp)/progmodes/cc-cmds.elc \
595 $(lisp)/progmodes/cc-align.elc $(lisp)/progmodes/cc-menus.elc
596
597 $(lisp)/progmodes/cc-styles.elc: $(lisp)/progmodes/cc-vars.elc \
598 $(lisp)/progmodes/cc-align.elc
599
600 $(lisp)/progmodes/cc-vars.elc: $(lisp)/custom.elc $(lisp)/widget.elc
601
602 # MH-E dependencies, mainly to prevent failures with parallel
603 # compilation, due to race conditions between writing a given FOO.elc
604 # file and another file being compiled that says "(require FOO)",
605 # which causes Emacs to try to read FOO.elc.
606 MH_E_DIR = ./mh-e
607 $(MH_E_DIR)/mh-alias.elc $(MH_E_DIR)/mh-comp.elc $(MH_E_DIR)/mh-folder.elc\
608 $(MH_E_DIR)/mh-funcs.elc $(MH_E_DIR)/mh-identity.elc $(MH_E_DIR)/mh-inc.elc\
609 $(MH_E_DIR)/mh-junk.elc $(MH_E_DIR)/mh-letter.elc $(MH_E_DIR)/mh-limit.elc\
610 $(MH_E_DIR)/mh-mime.elc $(MH_E_DIR)/mh-print.elc $(MH_E_DIR)/mh-scan.elc\
611 $(MH_E_DIR)/mh-search.elc $(MH_E_DIR)/mh-seq.elc $(MH_E_DIR)/mh-show.elc\
612 $(MH_E_DIR)/mh-speed.elc $(MH_E_DIR)/mh-thread.elc $(MH_E_DIR)/mh-tool-bar.elc\
613 $(MH_E_DIR)/mh-utils.elc $(MH_E_DIR)/mh-xface.elc:\
614 $(MH_E_DIR)/mh-e.elc
615
616 $(MH_E_DIR)/mh-alias.elc $(MH_E_DIR)/mh-e.elc $(MH_E_DIR)/mh-folder.elc\
617 $(MH_E_DIR)/mh-inc.elc $(MH_E_DIR)/mh-junk.elc $(MH_E_DIR)/mh-limit.elc\
618 $(MH_E_DIR)/mh-search.elc $(MH_E_DIR)/mh-seq.elc $(MH_E_DIR)/mh-speed.elc\
619 $(MH_E_DIR)/mh-utils.elc $(MH_E_DIR)/mh-xface.elc:\
620 $(lisp)/emacs-lisp/cl.elc
621
622 $(MH_E_DIR)/mh-comp.elc $(MH_E_DIR)/mh-folder.elc $(MH_E_DIR)/mh-funcs.elc\
623 $(MH_E_DIR)/mh-junk.elc $(MH_E_DIR)/mh-limit.elc $(MH_E_DIR)/mh-print.elc\
624 $(MH_E_DIR)/mh-seq.elc $(MH_E_DIR)/mh-show.elc $(MH_E_DIR)/mh-thread.elc:\
625 $(MH_E_DIR)/mh-scan.elc
626
627 $(MH_E_DIR)/mh-folder.elc $(MH_E_DIR)/mh-letter.elc $(MH_E_DIR)/mh-mime.elc\
628 $(MH_E_DIR)/mh-search.elc $(MH_E_DIR)/mh-show.elc $(MH_E_DIR)/mh-speed.elc:\
629 $(lisp)/gnus/gnus-util.elc
630
631 $(MH_E_DIR)/mh-folder.elc $(MH_E_DIR)/mh-search.elc:\
632 $(lisp)/progmodes/which-func.elc
633
634 $(MH_E_DIR)/mh-letter.elc $(MH_E_DIR)/mh-seq.elc $(MH_E_DIR)/mh-show.elc\
635 $(MH_E_DIR)/mh-utils.elc:\
636 $(lisp)/font-lock.elc
637
638 $(MH_E_DIR)/mh-alias.elc $(MH_E_DIR)/mh-show.elc: $(lisp)/net/goto-addr.elc
639
640 $(MH_E_DIR)/mh-comp.elc: $(lisp)/mail/sendmail.elc
641
642 $(MH_E_DIR)/mh-e.elc: $(MH_E_DIR)/mh-buffers.elc $(lisp)/gnus/gnus.elc \
643 $(lisp)/cus-face.elc
644
645 $(MH_E_DIR)/mh-letter.elc: $(lisp)/gnus/mailcap.elc $(lisp)/gnus/mm-decode.elc \
646 $(lisp)/gnus/mm-view.elc $(lisp)/gnus/mml.elc $(lisp)/gnus/message.elc
647
648 $(MH_E_DIR)/mh-print.elc: $(lisp)/ps-print.elc
649
650 $(MH_E_DIR)/mh-search.elc: $(lisp)/imenu.elc
651
652 $(MH_E_DIR)/mh-show.elc: $(lisp)/gnus/gnus-cite.elc
653
654 $(MH_E_DIR)/mh-speed.elc: $(lisp)/speedbar.elc $(lisp)/emacs-lisp/timer.elc
655
656 $(MH_E_DIR)/mh-tool-bar.elc: $(lisp)/tool-bar.elc