* src/term.c: Remove dead code.
[emacs.git] / lisp / makefile.w32-in
blob871b690f007b4f37baf0a8f4b9bf47facb8dcebd
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  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 \
118         vc
120 # Directories with lisp files to compile, and to extract data from
121 # (customs, autoloads, etc.)
122 WINS_UPDATES=$(WINS_BASIC) \
123         $(WINS_CEDET)
125 # Directories to add to subdirs.el
126 WINS_SUBDIR=$(WINS_BASIC) \
127         obsolete
129 # All directories
130 WINS= $(WINS_UPDATES) \
131         term \
132         obsolete
134 doit:
136 cus-load.el-SH:
137         echo ";;; cus-load.el --- automatically extracted custom dependencies" > $@
138         echo ";;" >> $@; echo ";;; Code:" >> $@
139         echo "\f" >> $@
140         echo ";; Local Variables:" >> $@
141         echo ";; version-control: never" >> $@
142         echo ";; no-byte-compile: t" >> $@
143         echo ";; no-update-autoloads: t" >> $@
144         echo ";; End:" >> $@
146 cus-load.el-CMD:
147         echo ;;; cus-load.el --- automatically extracted custom dependencies> $@
148         echo ;;>> $@
149         echo ;;; Code:>> $@
150         echo.\f>> $@
151         echo ;; Local Variables:>> $@
152         echo ;; version-control: never>> $@
153         echo ;; no-byte-compile: t>> $@
154         echo ;; no-update-autoloads: t>> $@
155         echo ;; End:>> $@
157 $(lisp)/cus-load.el:
158         $(MAKE) $(MFLAGS) cus-load.el-$(SHELLTYPE)
159         mv cus-load.el-$(SHELLTYPE) $@
161 # WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as
162 #          this can break with GNU Make 3.81 and later if sh.exe is used.
163 custom-deps: $(lisp)/cus-load.el $(lisp)/loaddefs.el doit
164         @echo Directories: $(WINS_UPDATES)
165         -$(emacs) -l cus-dep --eval $(ARGQUOTE)(setq find-file-hook nil)$(ARGQUOTE) \
166                   -f custom-make-dependencies $(lisp) $(WINS_UPDATES)
168 finder-data: $(lisp)/loaddefs.el doit
169         @echo Directories: $(WINS_UPDATES)
170         $(emacs) -l finder -f finder-compile-keywords-make-dist $(lisp) $(WINS_UPDATES)
172 $(lisp)/loaddefs.el:
173         $(MAKE) $(MFLAGS) loaddefs.el-$(SHELLTYPE)
174         cp loaddefs.el-$(SHELLTYPE) $@
175         rm loaddefs.el-$(SHELLTYPE)
177 loaddefs.el-SH:
178         echo ";;; loaddefs.el --- automatically extracted autoloads" > $@
179         echo ";;" >> $@; echo ";;; Code:" >> $@
180         echo "\f" >> $@
181         echo ";; Local Variables:" >> $@
182         echo ";; version-control: never" >> $@
183         echo ";; no-byte-compile: t" >> $@
184         echo ";; no-update-autoloads: t" >> $@
185         echo ";; coding: utf-8" >> $@
186         echo ";; End:" >> $@
187         echo ";;; loaddefs.el ends here" >> $@
189 loaddefs.el-CMD:
190         echo ;;; loaddefs.el --- automatically extracted autoloads> $@
191         echo ;;>> $@
192         echo ;;; Code:>> $@
193         echo.\f>> $@
194         echo ;; Local Variables:>> $@
195         echo ;; version-control: never>> $@
196         echo ;; no-byte-compile: t>> $@
197         echo ;; no-update-autoloads: t>> $@
198         echo ;; coding: utf-8>> $@
199         echo ;; End:>> $@
200         echo ;;; loaddefs.el ends here>> $@
202 # Use . instead of $(lisp) because $(lisp) is an absolute file name,
203 # including a drive letter and any leading directories, so the generated
204 # loaddefs.el will mention file names that on other machine reference
205 # possibly non-existent directories.
207 # WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as
208 #          this can break with GNU Make 3.81 and later if sh.exe is used.
209 autoloads: $(lisp)/loaddefs.el $(LOADDEFS) doit
210         @echo Directories: . $(WINS_UPDATES)
211         $(emacs) -l autoload \
212                 --eval $(ARGQUOTE)(setq find-file-hook nil find-file-suppress-same-file-warnings t)$(ARGQUOTE) \
213                 -f w32-batch-update-autoloads "$(lisp)/loaddefs.el" $(MAKE) . $(WINS_UPDATES)
215 $(lisp)/subdirs.el:
216         $(MAKE) $(MFLAGS) update-subdirs
218 # Need separate version for sh and native cmd.exe
219 update-subdirs: update-subdirs-$(SHELLTYPE)
221 update-subdirs-CMD: doit
222         echo ;; -*- no-byte-compile: t -*-> $(lisp)/subdirs.el
223         echo ;; In load-path, after this directory should come>> $(lisp)/subdirs.el
224         echo ;; certain of its subdirectories.  Here we specify them.>> $(lisp)/subdirs.el
225         echo (normal-top-level-add-to-load-path $(SQUOTE)(>> $(lisp)/subdirs.el
226         @for %%d in ($(WINS_SUBDIR) cedet) do echo "%%d">> $(lisp)/subdirs.el
227         echo ))>> $(lisp)/subdirs.el
229 update-subdirs-SH: doit
230         $(srcdir)/update-subdirs $(lisp); \
231         for file in $(WINS_SUBDIR); do \
232            $(srcdir)/update-subdirs $$file; \
233         done;
235 updates: update-subdirs autoloads mh-autoloads finder-data custom-deps
237 # This is useful after "bzr up".
238 bzr-update: recompile autoloads finder-data custom-deps
240 # For backwards compatibility:
241 cvs-update: bzr-update
243 # Update the AUTHORS file.
245 update-authors:
246         $(emacs) -l authors -f batch-update-authors $(srcdir)/etc/AUTHORS $(srcdir)
248 TAGS: $(lisptagsfiles1) $(lisptagsfiles2)
249         $(ETAGS) $(lisptagsfiles1) $(lisptagsfiles2)
251 TAGS-LISP: $(lisptagsfiles1) $(lisptagsfiles2)
252         $(ETAGS) -o TAGS-LISP $(lisptagsfiles1) $(lisptagsfiles2)
254 .SUFFIXES: .elc .el
256 .el.elc:
257         -$(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile $<
259 # Compile all Lisp files, but don't recompile those that are up to
260 # date.  Some files don't actually get compiled because they set the
261 # local variable no-byte-compile.
263 # All .elc files are made writable before compilation in case we
264 # checked out read-only (CVS option -r).  Files MUST be compiled one by
265 # one.  If we compile several files in a row we can't make sure that
266 # the compilation environment is clean.  We also set the load-path of
267 # the Emacs used for compilation to the current directory and its
268 # subdirectories, to make sure require's and load's in the files being
269 # compiled find the right files.
271 # Need separate version for sh and native cmd.exe
272 compile: $(lisp)/subdirs.el mh-autoloads compile-$(SHELLTYPE) doit
274 compile-CMD:
275 #       -for %%f in ($(lisp) $(WINS)) do for %%g in (%%f\*.elc) do @attrib -r %%g
276         for %%f in ($(COMPILE_FIRST)) do \
277           $(emacs) -l loaddefs $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile-if-not-done %%f
278         for %%f in (. $(WINS)) do for %%g in (%%f/*.el) do \
279           $(emacs) -l loaddefs $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile-if-not-done %%f/%%g
281 compile-SH:
282 #       for elc in $(lisp)/*.elc $(lisp)/*/*.elc; do attrib -r $$elc; done
283         for el in $(COMPILE_FIRST); do \
284           echo Compiling $$el; \
285           $(emacs) -l loaddefs $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile-if-not-done $$el; \
286         done
287         for dir in $(lisp) $(WINS); do \
288           for el in $$dir/*.el; do \
289             if test -f $$el; \
290             then \
291               echo Compiling $$el; \
292               $(emacs) -l loaddefs $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile-if-not-done $$el; \
293             fi \
294           done; \
295         done
297 # Compile all Lisp files.  This is like `compile' but compiles files
298 # unconditionally.  Some files don't actually get compiled because they
299 # set the local variable no-byte-compile.
301 compile-always: $(lisp)/subdirs.el compile-always-$(SHELLTYPE) doit
303 compile-always-CMD:
304 #       -for %%f in ($(lisp) $(WINS)) do for %%g in (%%f\*.elc) do @attrib -r %%g
305         for %%f in ($(COMPILE_FIRST)) do $(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile %%f
306         for %%f in (. $(WINS)) do for %%g in (%%f/*.el) do $(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile %%f/%%g
308 compile-always-SH:
309 #       for elc in $(lisp)/*.elc $(lisp)/*/*.elc; do attrib -r $$elc; done
310         for el in $(COMPILE_FIRST); do \
311           echo Compiling $$el; \
312           $(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile $$el || exit 1; \
313         done
314         for dir in $(lisp) $(WINS); do \
315           for el in $$dir/*.el; do \
316             echo Compiling $$el; \
317             $(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile $$el || exit 1; \
318           done; \
319         done
321 compile-calc: compile-calc-$(SHELLTYPE)
323 compile-calc-CMD:
324         for %%f in ($(lisp)/calc/*.el) do $(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile %%f
326 compile-calc-SH:
327         for el in $(lisp)/calc/*.el; do \
328           echo Compiling $$el; \
329           $(emacs) $(BYTE_COMPILE_EXTRA_FLAGS) -f batch-byte-compile $$el || exit 1; \
330         done
332 # Backup compiled Lisp files in elc.tar.gz.  If that file already
333 # exists, make a backup of it.
335 backup-compiled-files:
336         -mv $(lisp)/elc.tar.gz $(lisp)/elc.tar.gz~
337         -tar czf $(lisp)/elc.tar.gz $(lisp)/*.elc $(lisp)/*/*.elc
339 # Compile Lisp files, but save old compiled files first.
341 compile-after-backup: backup-compiled-files compile-always
343 compile-first:  $(lisp)/emacs-lisp/bytecomp.elc $(lisp)/emacs-lisp/byte-opt.elc \
344         $(lisp)/emacs-lisp/autoload.elc
346 # Recompile all Lisp files which are newer than their .elc files.
347 # Note that this doesn't create .elc files.  It only recompiles if an
348 # .elc is present.
349 # WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as
350 #          this can break with GNU Make 3.81 and later if sh.exe is used.
351 recompile: compile-first autoloads doit $(lisp)/progmodes/cc-mode.elc
352         $(emacs) --eval $(ARGQUOTE)(batch-byte-recompile-directory 0)$(ARGQUOTE) $(lisp)
354 $(lisp)/calendar/cal-loaddefs.el:
355         "$(EMACS)" $(EMACSOPT) -l autoload \
356            --eval "(setq generate-autoload-cookie \";;;###cal-autoload\")" \
357            --eval "(setq find-file-suppress-same-file-warnings t)" \
358            --eval "(setq make-backup-files nil)" \
359            -f w32-batch-update-autoloads "$(lisp)/calendar/cal-loaddefs.el" \
360               $(MAKE) ./calendar
362 $(lisp)/calendar/diary-loaddefs.el:
363         "$(EMACS)" $(EMACSOPT) -l autoload \
364            --eval "(setq generate-autoload-cookie \";;;###diary-autoload\")" \
365            --eval "(setq find-file-suppress-same-file-warnings t)" \
366            --eval "(setq make-backup-files nil)" \
367            -f w32-batch-update-autoloads $(lisp)/calendar/diary-loaddefs.el \
368               $(MAKE) ./calendar
370 $(lisp)/calendar/hol-loaddefs.el:
371         "$(EMACS)" $(EMACSOPT) -l autoload \
372            --eval "(setq generate-autoload-cookie \";;;###holiday-autoload\")" \
373            --eval "(setq find-file-suppress-same-file-warnings t)" \
374            --eval "(setq make-backup-files nil)" \
375            -f w32-batch-update-autoloads $(lisp)/calendar/hol-loaddefs.el \
376               $(MAKE) ./calendar
378 # Update MH-E internal autoloads. These are not to be confused with
379 # the autoloads for the MH-E entry points, which are already in
380 # loaddefs.el.
381 MH_E_SRC = $(lisp)/mh-e/mh-acros.el $(lisp)/mh-e/mh-alias.el    \
382         $(lisp)/mh-e/mh-buffers.el $(lisp)/mh-e/mh-compat.el    \
383         $(lisp)/mh-e/mh-comp.el $(lisp)/mh-e/mh-e.el            \
384         $(lisp)/mh-e/mh-folder.el $(lisp)/mh-e/mh-funcs.el      \
385         $(lisp)/mh-e/mh-gnus.el $(lisp)/mh-e/mh-identity.el     \
386         $(lisp)/mh-e/mh-inc.el $(lisp)/mh-e/mh-junk.el          \
387         $(lisp)/mh-e/mh-letter.el $(lisp)/mh-e/mh-limit.el      \
388         $(lisp)/mh-e/mh-mime.el $(lisp)/mh-e/mh-print.el        \
389         $(lisp)/mh-e/mh-scan.el $(lisp)/mh-e/mh-search.el       \
390         $(lisp)/mh-e/mh-seq.el $(lisp)/mh-e/mh-show.el          \
391         $(lisp)/mh-e/mh-speed.el $(lisp)/mh-e/mh-thread.el      \
392         $(lisp)/mh-e/mh-tool-bar.el $(lisp)/mh-e/mh-utils.el    \
393         $(lisp)/mh-e/mh-xface.el
395 # See the commentary for autoloads above for why we use ./mh-e below
396 # instead of $(lisp)/mh-e.
397 mh-autoloads: $(lisp)/mh-e/mh-loaddefs.el
398 $(lisp)/mh-e/mh-loaddefs.el: $(MH_E_SRC)
399         "$(EMACS)" $(EMACSOPT) \
400            -l autoload \
401            --eval $(ARGQUOTE)(setq generate-autoload-cookie $(DQUOTE);;;###mh-autoload$(DQUOTE))$(ARGQUOTE) \
402            --eval $(ARGQUOTE)(setq find-file-suppress-same-file-warnings t)$(ARGQUOTE) \
403            --eval $(ARGQUOTE)(setq make-backup-files nil)$(ARGQUOTE) \
404            -f w32-batch-update-autoloads \
405            $(ARGQUOTE)$(lisp)/mh-e/mh-loaddefs.el$(ARGQUOTE) $(MAKE) ./mh-e
407 # Prepare a bootstrap in the lisp subdirectory.
409 # Build loaddefs.el to make sure it's up-to-date.  If it's not, that
410 # might lead to errors during the bootstrap because something fails to
411 # autoload as expected.  If there is no emacs binary, then we can't
412 # build autoloads yet.  In that case we have to use ldefs-boot.el;
413 # bootstrap should always work with ldefs-boot.el.  (Because
414 # loaddefs.el is an automatically generated file, we don't want to
415 # store it in the source repository).
417 # Remove compiled Lisp files so that bootstrap-emacs will be built from
418 # sources only.
420 # Need separate version for sh and native cmd.exe
421 bootstrap-clean:
422         - $(DEL) $(lisp)/loaddefs.el
423         $(MAKE) $(MFLAGS) bootstrap-clean-$(SHELLTYPE)
425 bootstrap-clean-CMD:
426 #       if exist "$(EMACS)" $(MAKE) $(MFLAGS) autoloads
427         -for %%f in (. $(WINS)) do for %%g in (%%f\*.elc) do @$(DEL) %%g
429 bootstrap-clean-SH:
430 #       if test -f "$(EMACS)"; then $(MAKE) $(MFLAGS) autoloads; fi
431 #       -rm -f $(lisp)/*.elc $(lisp)/*/*.elc
432         -for dir in . $(WINS); do rm -f $$dir/*.elc $$dir/*/*.elc $$dir/*/*/*.elc; done
434 # Generate/update files for the bootstrap process.
435 # When done, remove bootstrap-emacs from ../bin, so that
436 # it will not be mistaken for an installed binary.
438 bootstrap: update-subdirs autoloads mh-autoloads compile finder-data custom-deps
439         - $(DEL) "$(EMACS)"
442 # Assuming INSTALL_DIR is defined, copy the elisp files to it
443 # Windows 95 makes this harder than it should be.
445 install:
446                 - mkdir "$(INSTALL_DIR)/lisp"
447                 - $(DEL) ../same-dir.tst
448                 - $(DEL) "$(INSTALL_DIR)/same-dir.tst"
449                 echo SameDirTest > "$(INSTALL_DIR)/same-dir.tst"
450 #ifdef COPY_LISP_SOURCE
451                 $(IFNOTSAMEDIR) $(MAKE) $(MFLAGS) install-lisp-$(SHELLTYPE) $(ENDIF)
452 #else
453 #               $(IFNOTSAMEDIR) $(CP_DIR) *.elc "$(INSTALL_DIR)/lisp" $(ENDIF)
454 #               $(IFNOTSAMEDIR) $(CP) cus-load.el "$(INSTALL_DIR)/lisp" $(ENDIF)
455 #               $(IFNOTSAMEDIR) $(CP) forms*.el "$(INSTALL_DIR)/lisp" $(ENDIF)
456 #               $(IFNOTSAMEDIR) $(CP) patcomp.el "$(INSTALL_DIR)/lisp" $(ENDIF)
457 #               $(IFNOTSAMEDIR) $(CP) subdirs.el "$(INSTALL_DIR)/lisp" $(ENDIF)
458 #               $(IFNOTSAMEDIR) $(CP) version.el "$(INSTALL_DIR)/lisp" $(ENDIF)
459 #               $(IFNOTSAMEDIR) $(CP) mail/blessmail.el "$(INSTALL_DIR)/lisp/mail" $(ENDIF)
460 #               $(IFNOTSAMEDIR) $(CP) mail/sc.el "$(INSTALL_DIR)/lisp/mail" $(ENDIF)
461 #               $(IFNOTSAMEDIR) $(CP) play/bruce.el "$(INSTALL_DIR)/lisp/play" $(ENDIF)
462 #               $(IFNOTSAMEDIR) $(CP) international/latin-*.el "$(INSTALL_DIR)/lisp/international" $(ENDIF)
463 #               $(IFNOTSAMEDIR) $(CP) international/mule-conf.el "$(INSTALL_DIR)/lisp/international" $(ENDIF)
464 #endif
465                 - $(DEL) ../same-dir.tst
466                 - $(DEL) "$(INSTALL_DIR)/same-dir.tst"
468 # Need to copy *.el files first, to avoid "source file is newer" annoyance
469 # since cp does not preserve time stamps
470 install-lisp-SH:
471         cp -f *.el "$(INSTALL_DIR)/lisp"
472         for dir in $(WINS); do [ -d "$(INSTALL_DIR)/lisp/$$dir" ] || mkdir "$(INSTALL_DIR)/lisp/$$dir"; done
473         for dir in $(WINS); do cp -f $$dir/*.el "$(INSTALL_DIR)/lisp/$$dir"; done
474         for dir in . $(WINS); do cp $$dir/*.elc "$(INSTALL_DIR)/lisp/$$dir"; done
476 install-lisp-CMD:
477         cp -f *.el "$(INSTALL_DIR)/lisp"
478         for %%f in ($(WINS)) do if not exist "$(INSTALL_DIR)/lisp/%%f" mkdir "$(INSTALL_DIR)/lisp/%%f"
479         for %%f in ($(WINS)) do cp -f %%f/*.el "$(INSTALL_DIR)/lisp/%%f"
480         for %%f in (. $(WINS)) do cp -f %%f/*.elc "$(INSTALL_DIR)/lisp/%%f"
482 # WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as
483 #          this can break with GNU Make 3.81 and later if sh.exe is used.
484 check-declare:
485         $(emacs) -l $(lisp)/emacs-lisp/check-declare --eval $(ARGQUOTE)(check-declare-directory $(DQUOTE)$(lisp)$(DQUOTE))$(ARGQUOTE)
488 # Maintenance
490 # We used to delete *~ here, but that might inadvertently remove
491 # precious files if it happens to match their short 8+3 aliases.
492 clean:
493         - $(DEL) *.el~
494         - $(DEL) calc/calc-loaddefs.el~
495         - $(DEL) eshell/esh-groups.el~
497 distclean: clean
498         - $(DEL) $(lisp)/Makefile
500 maintainer-clean: bootstrap-clean distclean
501         - $(DEL) $(AUTOGENEL)
503 # Dependencies
505 # CC Mode uses a compile time macro system which causes a compile time
506 # dependency in cc-*.elc files on the macros in other cc-*.el and the
507 # version string in cc-defs.el.
508 $(lisp)/progmodes/cc-align.elc $(lisp)/progmodes/cc-awk.elc\
509  $(lisp)/progmodes/cc-cmds.elc $(lisp)/progmodes/cc-compat.elc\
510  $(lisp)/progmodes/cc-engine.elc $(lisp)/progmodes/cc-fonts.elc\
511  $(lisp)/progmodes/cc-langs.elc $(lisp)/progmodes/cc-menus.elc\
512  $(lisp)/progmodes/cc-mode.elc $(lisp)/progmodes/cc-styles.elc\
513  $(lisp)/progmodes/cc-vars.elc: \
514    $(lisp)/progmodes/cc-bytecomp.elc $(lisp)/progmodes/cc-defs.elc
516 $(lisp)/progmodes/cc-align.elc: \
517    $(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-engine.elc
519 $(lisp)/progmodes/cc-cmds.elc: \
520    $(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-engine.elc
522 $(lisp)/progmodes/cc-compat.elc: \
523    $(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-styles.elc \
524    $(lisp)/progmodes/cc-engine.elc
526 $(lisp)/progmodes/cc-defs.elc: $(lisp)/progmodes/cc-bytecomp.elc \
527    $(lisp)/emacs-lisp/cl.elc $(lisp)/emacs-lisp/regexp-opt.elc
529 $(lisp)/progmodes/cc-engine.elc: $(lisp)/progmodes/cc-langs.elc \
530    $(lisp)/progmodes/cc-vars.elc
532 $(lisp)/progmodes/cc-fonts.elc: $(lisp)/progmodes/cc-langs.elc \
533    $(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-engine.elc \
534    $(lisp)/font-lock.elc
536 $(lisp)/progmodes/cc-langs.elc: $(lisp)/progmodes/cc-vars.elc \
537    $(lisp)/emacs-lisp/cl.elc
539 $(lisp)/progmodes/cc-mode.elc: $(lisp)/progmodes/cc-langs.elc \
540    $(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-engine.elc \
541    $(lisp)/progmodes/cc-styles.elc $(lisp)/progmodes/cc-cmds.elc \
542    $(lisp)/progmodes/cc-align.elc $(lisp)/progmodes/cc-menus.elc
544 $(lisp)/progmodes/cc-styles.elc: $(lisp)/progmodes/cc-vars.elc \
545    $(lisp)/progmodes/cc-align.elc
547 $(lisp)/progmodes/cc-vars.elc: $(lisp)/custom.elc $(lisp)/widget.elc
549 # MH-E dependencies, mainly to prevent failures with parallel
550 # compilation, due to race conditions between writing a given FOO.elc
551 # file and another file being compiled that says "(require FOO)",
552 # which causes Emacs to try to read FOO.elc.
553 MH_E_DIR = ./mh-e
554 $(MH_E_DIR)/mh-alias.elc $(MH_E_DIR)/mh-comp.elc $(MH_E_DIR)/mh-folder.elc\
555  $(MH_E_DIR)/mh-funcs.elc $(MH_E_DIR)/mh-identity.elc $(MH_E_DIR)/mh-inc.elc\
556  $(MH_E_DIR)/mh-junk.elc $(MH_E_DIR)/mh-letter.elc $(MH_E_DIR)/mh-limit.elc\
557  $(MH_E_DIR)/mh-mime.elc $(MH_E_DIR)/mh-print.elc $(MH_E_DIR)/mh-scan.elc\
558  $(MH_E_DIR)/mh-search.elc $(MH_E_DIR)/mh-seq.elc $(MH_E_DIR)/mh-show.elc\
559  $(MH_E_DIR)/mh-speed.elc $(MH_E_DIR)/mh-thread.elc $(MH_E_DIR)/mh-tool-bar.elc\
560  $(MH_E_DIR)/mh-utils.elc $(MH_E_DIR)/mh-xface.elc:\
561    $(MH_E_DIR)/mh-e.elc
563 $(MH_E_DIR)/mh-alias.elc $(MH_E_DIR)/mh-e.elc $(MH_E_DIR)/mh-folder.elc\
564  $(MH_E_DIR)/mh-inc.elc $(MH_E_DIR)/mh-junk.elc $(MH_E_DIR)/mh-limit.elc\
565  $(MH_E_DIR)/mh-search.elc $(MH_E_DIR)/mh-seq.elc $(MH_E_DIR)/mh-speed.elc\
566  $(MH_E_DIR)/mh-utils.elc $(MH_E_DIR)/mh-xface.elc:\
567    $(lisp)/emacs-lisp/cl.elc
569 $(MH_E_DIR)/mh-comp.elc $(MH_E_DIR)/mh-folder.elc $(MH_E_DIR)/mh-funcs.elc\
570  $(MH_E_DIR)/mh-junk.elc $(MH_E_DIR)/mh-limit.elc $(MH_E_DIR)/mh-print.elc\
571  $(MH_E_DIR)/mh-seq.elc $(MH_E_DIR)/mh-show.elc $(MH_E_DIR)/mh-thread.elc:\
572    $(MH_E_DIR)/mh-scan.elc
574 $(MH_E_DIR)/mh-folder.elc $(MH_E_DIR)/mh-letter.elc $(MH_E_DIR)/mh-mime.elc\
575  $(MH_E_DIR)/mh-search.elc $(MH_E_DIR)/mh-show.elc $(MH_E_DIR)/mh-speed.elc:\
576    $(lisp)/gnus/gnus-util.elc
578 $(MH_E_DIR)/mh-folder.elc $(MH_E_DIR)/mh-search.elc:\
579    $(lisp)/progmodes/which-func.elc
581 $(MH_E_DIR)/mh-letter.elc $(MH_E_DIR)/mh-seq.elc $(MH_E_DIR)/mh-show.elc\
582  $(MH_E_DIR)/mh-utils.elc:\
583    $(lisp)/font-lock.elc
585 $(MH_E_DIR)/mh-alias.elc $(MH_E_DIR)/mh-show.elc: $(lisp)/net/goto-addr.elc
587 $(MH_E_DIR)/mh-comp.elc: $(lisp)/mail/sendmail.elc
589 $(MH_E_DIR)/mh-e.elc: $(MH_E_DIR)/mh-buffers.elc $(lisp)/gnus/gnus.elc \
590    $(lisp)/cus-face.elc
592 $(MH_E_DIR)/mh-letter.elc: $(lisp)/gnus/mailcap.elc $(lisp)/gnus/mm-decode.elc \
593    $(lisp)/gnus/mm-view.elc  $(lisp)/gnus/mml.elc $(lisp)/gnus/message.elc
595 $(MH_E_DIR)/mh-print.elc:  $(lisp)/ps-print.elc
597 $(MH_E_DIR)/mh-search.elc: $(lisp)/imenu.elc
599 $(MH_E_DIR)/mh-show.elc: $(lisp)/gnus/gnus-cite.elc
601 $(MH_E_DIR)/mh-speed.elc: $(lisp)/speedbar.elc $(lisp)/emacs-lisp/timer.elc
603 $(MH_E_DIR)/mh-tool-bar.elc: $(lisp)/tool-bar.elc