* info.el (Info-hide-cookies-node): Before hiding a cookie,
[emacs.git] / lisp / makefile.w32-in
blobab079ea360cfbfc100de5a54ba8641f376cb325d
1 # -*- Makefile -*- for GNU Emacs on the Microsoft W32 API.
2 # Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
3 #   2009  Free Software Foundation, Inc.
5 # This file is part of GNU Emacs.
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.
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.
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/>.
20 ALL =
22 all: $(ALL)
24 SQUOTE='
25 # '
27 lisp = $(CURDIR)
28 srcdir = $(CURDIR)/..
30 # You can specify a different executable on the make command line,
31 # e.g. "make EMACS=../src/emacs ...".
33 EMACS = $(THISDIR)/../bin/emacs.exe
35 # Command line flags for Emacs.  This must include --multibyte,
36 # otherwise some files will not compile.
38 EMACSOPT = -batch --no-init-file --no-site-file --multibyte
40 # Extra flags to pass to the byte compiler
41 BYTE_COMPILE_EXTRA_FLAGS =
42 # For example to not display the undefined function warnings you can use this:
43 # BYTE_COMPILE_EXTRA_FLAGS = --eval '(setq byte-compile-warnings (quote (not unresolved)))'
44 # The example above is just for developers, it should not be used by default.
46 # Set EMACSLOADPATH correctly (already defined in environment).
47 EMACSLOADPATH=$(lisp)
49 # Use C locale
50 LC_ALL = C
52 lisptagsfiles1 = $(lisp)/*.el
53 lisptagsfiles2 = $(lisp)/*/*.el
54 ETAGS = "../lib-src/$(BLD)/etags"
56 # Automatically generated autoload files, apart from lisp/loaddefs.el.
57 LOADDEFS = $(lisp)/calendar/cal-loaddefs.el \
58         $(lisp)/calendar/diary-loaddefs.el $(lisp)/calendar/hol-loaddefs.el \
59         $(lisp)/mh-e/mh-loaddefs.el
61 AUTOGENEL = $(lisp)/loaddefs.el $(LOADDEFS) $(lisp)/cus-load.el \
62         $(lisp)/finder-inf.el $(lisp)/subdirs.el $(lisp)/eshell/esh-groups.el \
63         $(lisp)/calc/calc-loaddefs.el $(lisp)/nxml/subdirs.el \
64         $(lisp)/cedet/semantic/loaddefs.el $(lisp)/cedet/ede/loaddefs.el \
65         $(lisp)/cedet/srecode/loaddefs.el
67 # Files to compile before others during a bootstrap.  This is done to
68 # speed up the bootstrap process.  The CC files are compiled first
69 # because CC mode tweaks the compilation process, and requiring
70 # cc-mode when it is not compiled doesn't work during the
71 # bootstrapping.
73 COMPILE_FIRST = \
74         $(lisp)/emacs-lisp/byte-opt.el \
75         $(lisp)/emacs-lisp/bytecomp.el \
76         $(lisp)/subr.el \
77         $(lisp)/progmodes/cc-mode.el \
78         $(lisp)/progmodes/cc-vars.el
80 # The actual Emacs command run in the targets below.
81 # The quotes around $(EMACS) are here because the user could type
82 # it with forward slashes and without quotes, which will fail if
83 # the shell is cmd.exe.
85 emacs = "$(EMACS)" $(EMACSOPT)
87 # Have to define the list of subdirs manually when not using sh.
88 WINS_CEDET=\
89         cedet \
90         cedet/ede \
91         cedet/semantic \
92         cedet/srecode \
93         cedet/semantic/analyze \
94         cedet/semantic/bovine \
95         cedet/semantic/decorate \
96         cedet/semantic/symref \
97         cedet/semantic/wisent
99 WINS_BASIC=\
100         calc \
101         calendar \
102         emacs-lisp \
103         emulation \
104         erc \
105         eshell \
106         gnus \
107         international \
108         language \
109         mail \
110         mh-e \
111         net \
112         nxml \
113         org \
114         play \
115         progmodes \
116         textmodes \
117         url
119 # Directories with lisp files to compile, and to extract data from
120 # (customs, autoloads, etc.)
121 WINS_UPDATES=$(WINS_BASIC) \
122         $(WINS_CEDET)
124 # Directories to add to subdirs.el
125 WINS_SUBDIR=$(WINS_BASIC) \
126         obsolete
128 # All directories
129 WINS= $(WINS_UPDATES) \
130         term \
131         obsolete
133 doit:
135 cus-load.el-SH:
136         echo ";;; cus-load.el --- automatically extracted custom dependencies" > $@
137         echo ";;" >> $@; echo ";;; Code:" >> $@
138         echo "\f" >> $@
139         echo ";; Local Variables:" >> $@
140         echo ";; version-control: never" >> $@
141         echo ";; no-byte-compile: t" >> $@
142         echo ";; no-update-autoloads: t" >> $@
143         echo ";; End:" >> $@
145 cus-load.el-CMD:
146         echo ;;; cus-load.el --- automatically extracted custom dependencies> $@
147         echo ;;>> $@
148         echo ;;; Code:>> $@
149         echo.\f>> $@
150         echo ;; Local Variables:>> $@
151         echo ;; version-control: never>> $@
152         echo ;; no-byte-compile: t>> $@
153         echo ;; no-update-autoloads: t>> $@
154         echo ;; End:>> $@
156 $(lisp)/cus-load.el:
157         $(MAKE) $(MFLAGS) cus-load.el-$(SHELLTYPE)
158         mv cus-load.el-$(SHELLTYPE) $@
160 # WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as
161 #          this can break with GNU Make 3.81 and later if sh.exe is used.
162 custom-deps: $(lisp)/cus-load.el $(lisp)/loaddefs.el doit
163         @echo Directories: $(WINS_UPDATES)
164         -$(emacs) -l cus-dep --eval $(ARGQUOTE)(setq find-file-hook nil)$(ARGQUOTE) \
165                   -f custom-make-dependencies $(lisp) $(WINS_UPDATES)
167 finder-data: $(lisp)/loaddefs.el doit
168         @echo Directories: $(WINS_UPDATES)
169         $(emacs) -l finder -f finder-compile-keywords-make-dist $(lisp) $(WINS_UPDATES)
171 $(lisp)/loaddefs.el:
172         $(MAKE) $(MFLAGS) loaddefs.el-$(SHELLTYPE)
173         cp loaddefs.el-$(SHELLTYPE) $@
174         rm loaddefs.el-$(SHELLTYPE)
176 loaddefs.el-SH:
177         echo ";;; loaddefs.el --- automatically extracted autoloads" > $@
178         echo ";;" >> $@; echo ";;; Code:" >> $@
179         echo "\f" >> $@
180         echo ";; Local Variables:" >> $@
181         echo ";; version-control: never" >> $@
182         echo ";; no-byte-compile: t" >> $@
183         echo ";; no-update-autoloads: t" >> $@
184         echo ";; coding: utf-8" >> $@
185         echo ";; End:" >> $@
186         echo ";;; loaddefs.el ends here" >> $@
188 loaddefs.el-CMD:
189         echo ;;; loaddefs.el --- automatically extracted autoloads> $@
190         echo ;;>> $@
191         echo ;;; Code:>> $@
192         echo.\f>> $@
193         echo ;; Local Variables:>> $@
194         echo ;; version-control: never>> $@
195         echo ;; no-byte-compile: t>> $@
196         echo ;; no-update-autoloads: t>> $@
197         echo ;; coding: utf-8>> $@
198         echo ;; End:>> $@
199         echo ;;; loaddefs.el ends here>> $@
201 # Use . instead of $(lisp) because $(lisp) is an absolute file name,
202 # including a drive letter and any leading directories, so the generated
203 # loaddefs.el will mention file names that on other machine reference
204 # possibly non-existent directories.
206 # WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as
207 #          this can break with GNU Make 3.81 and later if sh.exe is used.
208 autoloads: $(lisp)/loaddefs.el $(LOADDEFS) doit
209         @echo Directories: . $(WINS_UPDATES)
210         $(emacs) -l autoload \
211                 --eval $(ARGQUOTE)(setq find-file-hook nil find-file-suppress-same-file-warnings t)$(ARGQUOTE) \
212                 -f w32-batch-update-autoloads "$(lisp)/loaddefs.el" $(MAKE) . $(WINS_UPDATES)
214 $(lisp)/subdirs.el:
215         $(MAKE) $(MFLAGS) update-subdirs
217 # Need separate version for sh and native cmd.exe
218 update-subdirs: update-subdirs-$(SHELLTYPE)
220 update-subdirs-CMD: doit
221         echo ;; -*- no-byte-compile: t -*-> $(lisp)/subdirs.el
222         echo ;; In load-path, after this directory should come>> $(lisp)/subdirs.el
223         echo ;; certain of its subdirectories.  Here we specify them.>> $(lisp)/subdirs.el
224         echo (normal-top-level-add-to-load-path $(SQUOTE)(>> $(lisp)/subdirs.el
225         @for %%d in ($(WINS_SUBDIR) cedet) do echo "%%d">> $(lisp)/subdirs.el
226         echo ))>> $(lisp)/subdirs.el
228 update-subdirs-SH: doit
229         $(srcdir)/update-subdirs $(lisp); \
230         for file in $(WINS_SUBDIR); do \
231            $(srcdir)/update-subdirs $$file; \
232         done;
234 updates: update-subdirs autoloads mh-autoloads finder-data custom-deps
236 # This is useful after "cvs up".
237 cvs-update: recompile autoloads finder-data custom-deps
239 # Update the AUTHORS file.
241 update-authors:
242         $(emacs) -l authors -f batch-update-authors $(srcdir)/etc/AUTHORS $(srcdir)
244 TAGS: $(lisptagsfiles1) $(lisptagsfiles2)
245         $(ETAGS) $(lisptagsfiles1) $(lisptagsfiles2)
247 TAGS-LISP: $(lisptagsfiles1) $(lisptagsfiles2)
248         $(ETAGS) -o TAGS-LISP $(lisptagsfiles1) $(lisptagsfiles2)
250 .SUFFIXES: .elc .el
252 .el.elc:
253         -$(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile $<
255 # Compile all Lisp files, but don't recompile those that are up to
256 # date.  Some files don't actually get compiled because they set the
257 # local variable no-byte-compile.
259 # All .elc files are made writable before compilation in case we
260 # checked out read-only (CVS option -r).  Files MUST be compiled one by
261 # one.  If we compile several files in a row we can't make sure that
262 # the compilation environment is clean.  We also set the load-path of
263 # the Emacs used for compilation to the current directory and its
264 # subdirectories, to make sure require's and load's in the files being
265 # compiled find the right files.
267 # Need separate version for sh and native cmd.exe
268 compile: $(lisp)/subdirs.el mh-autoloads compile-$(SHELLTYPE) doit
270 compile-CMD:
271 #       -for %%f in ($(lisp) $(WINS)) do for %%g in (%%f\*.elc) do @attrib -r %%g
272         for %%f in ($(COMPILE_FIRST)) do \
273           $(emacs) -l loaddefs $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile-if-not-done %%f
274         for %%f in (. $(WINS)) do for %%g in (%%f/*.el) do \
275           $(emacs) -l loaddefs $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile-if-not-done %%f/%%g
277 compile-SH:
278 #       for elc in $(lisp)/*.elc $(lisp)/*/*.elc; do attrib -r $$elc; done
279         for el in $(COMPILE_FIRST); do \
280           echo Compiling $$el; \
281           $(emacs) -l loaddefs $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile-if-not-done $$el; \
282         done
283         for dir in $(lisp) $(WINS); do \
284           for el in $$dir/*.el; do \
285             if test -f $$el; \
286             then \
287               echo Compiling $$el; \
288               $(emacs) -l loaddefs $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile-if-not-done $$el; \
289             fi \
290           done; \
291         done
293 # Compile all Lisp files.  This is like `compile' but compiles files
294 # unconditionally.  Some files don't actually get compiled because they
295 # set the local variable no-byte-compile.
297 compile-always: $(lisp)/subdirs.el compile-always-$(SHELLTYPE) doit
299 compile-always-CMD:
300 #       -for %%f in ($(lisp) $(WINS)) do for %%g in (%%f\*.elc) do @attrib -r %%g
301         for %%f in ($(COMPILE_FIRST)) do $(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile %%f
302         for %%f in (. $(WINS)) do for %%g in (%%f/*.el) do $(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile %%f/%%g
304 compile-always-SH:
305 #       for elc in $(lisp)/*.elc $(lisp)/*/*.elc; do attrib -r $$elc; done
306         for el in $(COMPILE_FIRST); do \
307           echo Compiling $$el; \
308           $(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile $$el || exit 1; \
309         done
310         for dir in $(lisp) $(WINS); do \
311           for el in $$dir/*.el; do \
312             echo Compiling $$el; \
313             $(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile $$el || exit 1; \
314           done; \
315         done
317 compile-calc: compile-calc-$(SHELLTYPE)
319 compile-calc-CMD:
320         for %%f in ($(lisp)/calc/*.el) do $(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile %%f
322 compile-calc-SH:
323         for el in $(lisp)/calc/*.el; do \
324           echo Compiling $$el; \
325           $(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile $$el || exit 1; \
326         done
328 # Backup compiled Lisp files in elc.tar.gz.  If that file already
329 # exists, make a backup of it.
331 backup-compiled-files:
332         -mv $(lisp)/elc.tar.gz $(lisp)/elc.tar.gz~
333         -tar czf $(lisp)/elc.tar.gz $(lisp)/*.elc $(lisp)/*/*.elc
335 # Compile Lisp files, but save old compiled files first.
337 compile-after-backup: backup-compiled-files compile-always
339 compile-first:  $(lisp)/emacs-lisp/bytecomp.elc $(lisp)/emacs-lisp/byte-opt.elc \
340         $(lisp)/emacs-lisp/autoload.elc
342 # Recompile all Lisp files which are newer than their .elc files.
343 # Note that this doesn't create .elc files.  It only recompiles if an
344 # .elc is present.
345 # WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as
346 #          this can break with GNU Make 3.81 and later if sh.exe is used.
347 recompile: compile-first autoloads doit $(lisp)/progmodes/cc-mode.elc
348         $(emacs) --eval $(ARGQUOTE)(batch-byte-recompile-directory 0)$(ARGQUOTE) $(lisp)
350 $(lisp)/calendar/cal-loaddefs.el:
351         "$(EMACS)" $(EMACSOPT) -l autoload \
352            --eval "(setq generate-autoload-cookie \";;;###cal-autoload\")" \
353            --eval "(setq find-file-suppress-same-file-warnings t)" \
354            --eval "(setq make-backup-files nil)" \
355            -f w32-batch-update-autoloads "$(lisp)/calendar/cal-loaddefs.el" \
356               $(MAKE) ./calendar
358 $(lisp)/calendar/diary-loaddefs.el:
359         "$(EMACS)" $(EMACSOPT) -l autoload \
360            --eval "(setq generate-autoload-cookie \";;;###diary-autoload\")" \
361            --eval "(setq find-file-suppress-same-file-warnings t)" \
362            --eval "(setq make-backup-files nil)" \
363            -f w32-batch-update-autoloads $(lisp)/calendar/diary-loaddefs.el \
364               $(MAKE) ./calendar
366 $(lisp)/calendar/hol-loaddefs.el:
367         "$(EMACS)" $(EMACSOPT) -l autoload \
368            --eval "(setq generate-autoload-cookie \";;;###holiday-autoload\")" \
369            --eval "(setq find-file-suppress-same-file-warnings t)" \
370            --eval "(setq make-backup-files nil)" \
371            -f w32-batch-update-autoloads $(lisp)/calendar/hol-loaddefs.el \
372               $(MAKE) ./calendar
374 # Update MH-E internal autoloads. These are not to be confused with
375 # the autoloads for the MH-E entry points, which are already in
376 # loaddefs.el.
377 MH_E_SRC = $(lisp)/mh-e/mh-acros.el $(lisp)/mh-e/mh-alias.el    \
378         $(lisp)/mh-e/mh-buffers.el $(lisp)/mh-e/mh-compat.el    \
379         $(lisp)/mh-e/mh-comp.el $(lisp)/mh-e/mh-e.el            \
380         $(lisp)/mh-e/mh-folder.el $(lisp)/mh-e/mh-funcs.el      \
381         $(lisp)/mh-e/mh-gnus.el $(lisp)/mh-e/mh-identity.el     \
382         $(lisp)/mh-e/mh-inc.el $(lisp)/mh-e/mh-junk.el          \
383         $(lisp)/mh-e/mh-letter.el $(lisp)/mh-e/mh-limit.el      \
384         $(lisp)/mh-e/mh-mime.el $(lisp)/mh-e/mh-print.el        \
385         $(lisp)/mh-e/mh-scan.el $(lisp)/mh-e/mh-search.el       \
386         $(lisp)/mh-e/mh-seq.el $(lisp)/mh-e/mh-show.el          \
387         $(lisp)/mh-e/mh-speed.el $(lisp)/mh-e/mh-thread.el      \
388         $(lisp)/mh-e/mh-tool-bar.el $(lisp)/mh-e/mh-utils.el    \
389         $(lisp)/mh-e/mh-xface.el
391 # See the commentary for autoloads above for why we use ./mh-e below
392 # instead of $(lisp)/mh-e.
393 mh-autoloads: $(lisp)/mh-e/mh-loaddefs.el
394 $(lisp)/mh-e/mh-loaddefs.el: $(MH_E_SRC)
395         "$(EMACS)" $(EMACSOPT) \
396            -l autoload \
397            --eval $(ARGQUOTE)(setq generate-autoload-cookie $(DQUOTE);;;###mh-autoload$(DQUOTE))$(ARGQUOTE) \
398            --eval $(ARGQUOTE)(setq find-file-suppress-same-file-warnings t)$(ARGQUOTE) \
399            --eval $(ARGQUOTE)(setq make-backup-files nil)$(ARGQUOTE) \
400            -f w32-batch-update-autoloads \
401            $(ARGQUOTE)$(lisp)/mh-e/mh-loaddefs.el$(ARGQUOTE) $(MAKE) ./mh-e
403 # Prepare a bootstrap in the lisp subdirectory.
405 # Build loaddefs.el to make sure it's up-to-date.  If it's not, that
406 # might lead to errors during the bootstrap because something fails to
407 # autoload as expected.  If there is no emacs binary, then we can't
408 # build autoloads yet.  In that case we have to use ldefs-boot.el;
409 # bootstrap should always work with ldefs-boot.el.  (Because
410 # loaddefs.el is an automatically generated file, we don't want to
411 # store it in the source repository).
413 # Remove compiled Lisp files so that bootstrap-emacs will be built from
414 # sources only.
416 # Need separate version for sh and native cmd.exe
417 bootstrap-clean:
418         - $(DEL) $(lisp)/loaddefs.el
419         $(MAKE) $(MFLAGS) bootstrap-clean-$(SHELLTYPE)
421 bootstrap-clean-CMD:
422 #       if exist "$(EMACS)" $(MAKE) $(MFLAGS) autoloads
423         -for %%f in (. $(WINS)) do for %%g in (%%f\*.elc) do @$(DEL) %%g
425 bootstrap-clean-SH:
426 #       if test -f "$(EMACS)"; then $(MAKE) $(MFLAGS) autoloads; fi
427 #       -rm -f $(lisp)/*.elc $(lisp)/*/*.elc
428         -for dir in . $(WINS); do rm -f $$dir/*.elc $$dir/*/*.elc $$dir/*/*/*.elc; done
430 # Generate/update files for the bootstrap process.
431 # When done, remove bootstrap-emacs from ../bin, so that
432 # it will not be mistaken for an installed binary.
434 bootstrap: update-subdirs autoloads mh-autoloads compile finder-data custom-deps
435         - $(DEL) "$(EMACS)"
438 # Assuming INSTALL_DIR is defined, copy the elisp files to it
439 # Windows 95 makes this harder than it should be.
441 install:
442                 - mkdir "$(INSTALL_DIR)/lisp"
443                 - $(DEL) ../same-dir.tst
444                 - $(DEL) "$(INSTALL_DIR)/same-dir.tst"
445                 echo SameDirTest > "$(INSTALL_DIR)/same-dir.tst"
446 #ifdef COPY_LISP_SOURCE
447                 $(IFNOTSAMEDIR) $(MAKE) $(MFLAGS) install-lisp-$(SHELLTYPE) $(ENDIF)
448 #else
449 #               $(IFNOTSAMEDIR) $(CP_DIR) *.elc "$(INSTALL_DIR)/lisp" $(ENDIF)
450 #               $(IFNOTSAMEDIR) $(CP) cus-load.el "$(INSTALL_DIR)/lisp" $(ENDIF)
451 #               $(IFNOTSAMEDIR) $(CP) forms*.el "$(INSTALL_DIR)/lisp" $(ENDIF)
452 #               $(IFNOTSAMEDIR) $(CP) patcomp.el "$(INSTALL_DIR)/lisp" $(ENDIF)
453 #               $(IFNOTSAMEDIR) $(CP) subdirs.el "$(INSTALL_DIR)/lisp" $(ENDIF)
454 #               $(IFNOTSAMEDIR) $(CP) version.el "$(INSTALL_DIR)/lisp" $(ENDIF)
455 #               $(IFNOTSAMEDIR) $(CP) mail/blessmail.el "$(INSTALL_DIR)/lisp/mail" $(ENDIF)
456 #               $(IFNOTSAMEDIR) $(CP) mail/sc.el "$(INSTALL_DIR)/lisp/mail" $(ENDIF)
457 #               $(IFNOTSAMEDIR) $(CP) play/bruce.el "$(INSTALL_DIR)/lisp/play" $(ENDIF)
458 #               $(IFNOTSAMEDIR) $(CP) international/latin-*.el "$(INSTALL_DIR)/lisp/international" $(ENDIF)
459 #               $(IFNOTSAMEDIR) $(CP) international/mule-conf.el "$(INSTALL_DIR)/lisp/international" $(ENDIF)
460 #endif
461                 - $(DEL) ../same-dir.tst
462                 - $(DEL) "$(INSTALL_DIR)/same-dir.tst"
464 # Need to copy *.el files first, to avoid "source file is newer" annoyance
465 # since cp does not preserve time stamps
466 install-lisp-SH:
467         cp -f *.el "$(INSTALL_DIR)/lisp"
468         for dir in $(WINS); do [ -d "$(INSTALL_DIR)/lisp/$$dir" ] || mkdir "$(INSTALL_DIR)/lisp/$$dir"; done
469         for dir in $(WINS); do cp -f $$dir/*.el "$(INSTALL_DIR)/lisp/$$dir"; done
470         for dir in . $(WINS); do cp $$dir/*.elc "$(INSTALL_DIR)/lisp/$$dir"; done
472 install-lisp-CMD:
473         cp -f *.el "$(INSTALL_DIR)/lisp"
474         for %%f in ($(WINS)) do if not exist "$(INSTALL_DIR)/lisp/%%f" mkdir "$(INSTALL_DIR)/lisp/%%f"
475         for %%f in ($(WINS)) do cp -f %%f/*.el "$(INSTALL_DIR)/lisp/%%f"
476         for %%f in (. $(WINS)) do cp -f %%f/*.elc "$(INSTALL_DIR)/lisp/%%f"
478 # WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as
479 #          this can break with GNU Make 3.81 and later if sh.exe is used.
480 check-declare:
481         $(emacs) -l $(lisp)/emacs-lisp/check-declare --eval $(ARGQUOTE)(check-declare-directory $(DQUOTE)$(lisp)$(DQUOTE))$(ARGQUOTE)
484 # Maintenance
486 # We used to delete *~ here, but that might inadvertently remove
487 # precious files if it happens to match their short 8+3 aliases.
488 clean:
489         - $(DEL) *.el~
490         - $(DEL) calc/calc-loaddefs.el~
491         - $(DEL) eshell/esh-groups.el~
493 distclean: clean
494         - $(DEL) $(lisp)/Makefile
496 maintainer-clean: bootstrap-clean distclean
497         - $(DEL) $(AUTOGENEL)
499 # Dependencies
501 # CC Mode uses a compile time macro system which causes a compile time
502 # dependency in cc-*.elc files on the macros in other cc-*.el and the
503 # version string in cc-defs.el.
504 $(lisp)/progmodes/cc-align.elc $(lisp)/progmodes/cc-awk.elc\
505  $(lisp)/progmodes/cc-cmds.elc $(lisp)/progmodes/cc-compat.elc\
506  $(lisp)/progmodes/cc-engine.elc $(lisp)/progmodes/cc-fonts.elc\
507  $(lisp)/progmodes/cc-langs.elc $(lisp)/progmodes/cc-menus.elc\
508  $(lisp)/progmodes/cc-mode.elc $(lisp)/progmodes/cc-styles.elc\
509  $(lisp)/progmodes/cc-vars.elc: \
510    $(lisp)/progmodes/cc-bytecomp.elc $(lisp)/progmodes/cc-defs.elc
512 $(lisp)/progmodes/cc-align.elc: \
513    $(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-engine.elc
515 $(lisp)/progmodes/cc-cmds.elc: \
516    $(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-engine.elc
518 $(lisp)/progmodes/cc-compat.elc: \
519    $(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-styles.elc \
520    $(lisp)/progmodes/cc-engine.elc
522 $(lisp)/progmodes/cc-defs.elc: $(lisp)/progmodes/cc-bytecomp.elc \
523    $(lisp)/emacs-lisp/cl.elc $(lisp)/emacs-lisp/regexp-opt.elc
525 $(lisp)/progmodes/cc-engine.elc: $(lisp)/progmodes/cc-langs.elc \
526    $(lisp)/progmodes/cc-vars.elc
528 $(lisp)/progmodes/cc-fonts.elc: $(lisp)/progmodes/cc-langs.elc \
529    $(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-engine.elc \
530    $(lisp)/font-lock.elc
532 $(lisp)/progmodes/cc-langs.elc: $(lisp)/progmodes/cc-vars.elc \
533    $(lisp)/emacs-lisp/cl.elc
535 $(lisp)/progmodes/cc-mode.elc: $(lisp)/progmodes/cc-langs.elc \
536    $(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-engine.elc \
537    $(lisp)/progmodes/cc-styles.elc $(lisp)/progmodes/cc-cmds.elc \
538    $(lisp)/progmodes/cc-align.elc $(lisp)/progmodes/cc-menus.elc
540 $(lisp)/progmodes/cc-styles.elc: $(lisp)/progmodes/cc-vars.elc \
541    $(lisp)/progmodes/cc-align.elc
543 $(lisp)/progmodes/cc-vars.elc: $(lisp)/custom.elc $(lisp)/widget.elc
545 # MH-E dependencies, mainly to prevent failures with parallel
546 # compilation, due to race conditions between writing a given FOO.elc
547 # file and another file being compiled that says "(require FOO)",
548 # which causes Emacs to try to read FOO.elc.
549 MH_E_DIR = ./mh-e
550 $(MH_E_DIR)/mh-alias.elc $(MH_E_DIR)/mh-comp.elc $(MH_E_DIR)/mh-folder.elc\
551  $(MH_E_DIR)/mh-funcs.elc $(MH_E_DIR)/mh-identity.elc $(MH_E_DIR)/mh-inc.elc\
552  $(MH_E_DIR)/mh-junk.elc $(MH_E_DIR)/mh-letter.elc $(MH_E_DIR)/mh-limit.elc\
553  $(MH_E_DIR)/mh-mime.elc $(MH_E_DIR)/mh-print.elc $(MH_E_DIR)/mh-scan.elc\
554  $(MH_E_DIR)/mh-search.elc $(MH_E_DIR)/mh-seq.elc $(MH_E_DIR)/mh-show.elc\
555  $(MH_E_DIR)/mh-speed.elc $(MH_E_DIR)/mh-thread.elc $(MH_E_DIR)/mh-tool-bar.elc\
556  $(MH_E_DIR)/mh-utils.elc $(MH_E_DIR)/mh-xface.elc:\
557    $(MH_E_DIR)/mh-e.elc
559 $(MH_E_DIR)/mh-alias.elc $(MH_E_DIR)/mh-e.elc $(MH_E_DIR)/mh-folder.elc\
560  $(MH_E_DIR)/mh-inc.elc $(MH_E_DIR)/mh-junk.elc $(MH_E_DIR)/mh-limit.elc\
561  $(MH_E_DIR)/mh-search.elc $(MH_E_DIR)/mh-seq.elc $(MH_E_DIR)/mh-speed.elc\
562  $(MH_E_DIR)/mh-utils.elc $(MH_E_DIR)/mh-xface.elc:\
563    $(lisp)/emacs-lisp/cl.elc
565 $(MH_E_DIR)/mh-comp.elc $(MH_E_DIR)/mh-folder.elc $(MH_E_DIR)/mh-funcs.elc\
566  $(MH_E_DIR)/mh-junk.elc $(MH_E_DIR)/mh-limit.elc $(MH_E_DIR)/mh-print.elc\
567  $(MH_E_DIR)/mh-seq.elc $(MH_E_DIR)/mh-show.elc $(MH_E_DIR)/mh-thread.elc:\
568    $(MH_E_DIR)/mh-scan.elc
570 $(MH_E_DIR)/mh-folder.elc $(MH_E_DIR)/mh-letter.elc $(MH_E_DIR)/mh-mime.elc\
571  $(MH_E_DIR)/mh-search.elc $(MH_E_DIR)/mh-show.elc $(MH_E_DIR)/mh-speed.elc:\
572    $(lisp)/gnus/gnus-util.elc
574 $(MH_E_DIR)/mh-folder.elc $(MH_E_DIR)/mh-search.elc:\
575    $(lisp)/progmodes/which-func.elc
577 $(MH_E_DIR)/mh-letter.elc $(MH_E_DIR)/mh-seq.elc $(MH_E_DIR)/mh-show.elc\
578  $(MH_E_DIR)/mh-utils.elc:\
579    $(lisp)/font-lock.elc
581 $(MH_E_DIR)/mh-alias.elc $(MH_E_DIR)/mh-show.elc: $(lisp)/net/goto-addr.elc
583 $(MH_E_DIR)/mh-comp.elc: $(lisp)/mail/sendmail.elc
585 $(MH_E_DIR)/mh-e.elc: $(MH_E_DIR)/mh-buffers.elc $(lisp)/gnus/gnus.elc \
586    $(lisp)/cus-face.elc
588 $(MH_E_DIR)/mh-letter.elc: $(lisp)/gnus/mailcap.elc $(lisp)/gnus/mm-decode.elc \
589    $(lisp)/gnus/mm-view.elc  $(lisp)/gnus/mml.elc $(lisp)/gnus/message.elc
591 $(MH_E_DIR)/mh-print.elc:  $(lisp)/ps-print.elc
593 $(MH_E_DIR)/mh-search.elc: $(lisp)/imenu.elc
595 $(MH_E_DIR)/mh-show.elc: $(lisp)/gnus/gnus-cite.elc
597 $(MH_E_DIR)/mh-speed.elc: $(lisp)/speedbar.elc $(lisp)/emacs-lisp/timer.elc
599 $(MH_E_DIR)/mh-tool-bar.elc: $(lisp)/tool-bar.elc