1 # -*- Makefile -*- for GNU Emacs on the Microsoft W32 API.
2 # Copyright (C) 2000-2012 Free Software Foundation, Inc.
4 # This file is part of GNU Emacs.
6 # GNU Emacs is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # GNU Emacs is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
29 # You can specify a different executable on the make command line,
30 # e.g. "make EMACS=../bin/emacs ...".
32 EMACS = ../src/$(BLD)/emacs.exe
34 # Command line flags for Emacs.
36 EMACSOPT = -batch --no-site-file --no-site-lisp
38 # Extra flags to pass to the byte compiler
39 BYTE_COMPILE_EXTRA_FLAGS =
40 # For example to not display the undefined function warnings you can use this:
41 # BYTE_COMPILE_EXTRA_FLAGS = --eval '(setq byte-compile-warnings (quote (not unresolved)))'
42 # The example above is just for developers, it should not be used by default.
44 # Set EMACSLOADPATH correctly (already defined in environment).
50 lisptagsfiles1 = $(lisp)/*.el
51 lisptagsfiles2 = $(lisp)/*/*.el
52 lisptagsfiles3 = $(lisp)/*/*/*.el
53 lisptagsfiles4 = $(lisp)/*/*/*/*.el
54 ETAGS = "../lib-src/$(BLD)/etags.exe"
55 ## $(DEST) is overridden by ../src/makefile.w32-in.
58 # Automatically generated autoload files, apart from lisp/loaddefs.el.
59 LOADDEFS = $(lisp)/calendar/cal-loaddefs.el \
60 $(lisp)/calendar/diary-loaddefs.el $(lisp)/calendar/hol-loaddefs.el \
61 $(lisp)/mh-e/mh-loaddefs.el $(lisp)/net/tramp-loaddefs.el
63 AUTOGENEL = $(lisp)/loaddefs.el $(LOADDEFS) $(lisp)/cus-load.el \
64 $(lisp)/finder-inf.el $(lisp)/subdirs.el $(lisp)/eshell/esh-groups.el \
65 $(lisp)/calc/calc-loaddefs.el $(lisp)/nxml/subdirs.el \
66 $(lisp)/cedet/semantic/loaddefs.el $(lisp)/cedet/ede/loaddefs.el \
67 $(lisp)/cedet/srecode/loaddefs.el
69 # Value of max-lisp-eval-depth when compiling initially.
70 # During bootstrapping the byte-compiler is run interpreted when compiling
71 # itself, and uses more stack than usual.
73 BIG_STACK_DEPTH = 2200
74 BIG_STACK_OPTS = --eval "(setq max-lisp-eval-depth $(BIG_STACK_DEPTH))"
76 BYTE_COMPILE_FLAGS = $(BIG_STACK_OPTS) $(BYTE_COMPILE_EXTRA_FLAGS)
78 # Files to compile before others during a bootstrap. This is done to
79 # speed up the bootstrap process. The CC files are compiled first
80 # because CC mode tweaks the compilation process, and requiring
81 # cc-mode when it is not compiled doesn't work during the
85 $(lisp)/emacs-lisp/byte-opt.el \
86 $(lisp)/emacs-lisp/bytecomp.el \
87 $(lisp)/emacs-lisp/macroexp.el \
88 $(lisp)/emacs-lisp/cconv.el \
89 $(lisp)/progmodes/cc-mode.el \
90 $(lisp)/progmodes/cc-vars.el
92 # The actual Emacs command run in the targets below.
93 # The quotes around $(EMACS) are here because the user could type
94 # it with forward slashes and without quotes, which will fail if
95 # the shell is cmd.exe.
97 emacs = "$(EMACS)" $(EMACSOPT)
99 # Have to define the list of subdirs manually when not using sh.
105 cedet/semantic/analyze \
106 cedet/semantic/bovine \
107 cedet/semantic/decorate \
108 cedet/semantic/symref \
109 cedet/semantic/wisent
132 # Directories with lisp files to compile, and to extract data from
133 # (customs, autoloads, etc.)
134 WINS_UPDATES=$(WINS_BASIC) \
137 # Directories to add to subdirs.el
138 WINS_SUBDIR=$(WINS_BASIC) \
142 WINS= $(WINS_UPDATES) \
149 echo ";;; cus-load.el --- automatically extracted custom dependencies" > $@
150 echo ";;" >> $@; echo ";;; Code:" >> $@
152 echo ";; Local Variables:" >> $@
153 echo ";; version-control: never" >> $@
154 echo ";; no-byte-compile: t" >> $@
155 echo ";; no-update-autoloads: t" >> $@
159 echo ;;; cus-load.el --- automatically extracted custom dependencies> $@
163 echo ;; Local Variables:>> $@
164 echo ;; version-control: never>> $@
165 echo ;; no-byte-compile: t>> $@
166 echo ;; no-update-autoloads: t>> $@
170 $(MAKE) $(MFLAGS) cus-load.el-$(SHELLTYPE)
171 mv cus-load.el-$(SHELLTYPE) $@
173 # WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as
174 # this can break with GNU Make 3.81 and later if sh.exe is used.
175 custom-deps: $(lisp)/cus-load.el $(lisp)/loaddefs.el doit
176 @echo Directories: $(WINS_UPDATES)
177 -$(emacs) -l cus-dep --eval $(ARGQUOTE)(setq find-file-hook nil)$(ARGQUOTE) \
178 -f custom-make-dependencies $(lisp) $(WINS_UPDATES)
180 finder-data: $(lisp)/loaddefs.el doit
181 @echo Directories: $(WINS_UPDATES)
182 $(emacs) -l finder -f finder-compile-keywords-make-dist $(lisp) $(WINS_UPDATES)
185 $(MAKE) $(MFLAGS) loaddefs.el-$(SHELLTYPE)
186 cp loaddefs.el-$(SHELLTYPE) $@
187 rm loaddefs.el-$(SHELLTYPE)
190 echo ";;; loaddefs.el --- automatically extracted autoloads" > $@
191 echo ";;" >> $@; echo ";;; Code:" >> $@
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" >> $@
199 echo ";;; loaddefs.el ends here" >> $@
202 echo ;;; loaddefs.el --- automatically extracted autoloads> $@
206 echo ;; Local Variables:>> $@
207 echo ;; version-control: never>> $@
208 echo ;; no-byte-compile: t>> $@
209 echo ;; no-update-autoloads: t>> $@
210 echo ;; coding: utf-8>> $@
212 echo ;;; loaddefs.el ends here>> $@
214 # Use . instead of $(lisp) because $(lisp) is an absolute file name,
215 # including a drive letter and any leading directories, so the generated
216 # loaddefs.el will mention file names that on other machine reference
217 # possibly non-existent directories.
219 # WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as
220 # this can break with GNU Make 3.81 and later if sh.exe is used.
221 autoloads: $(lisp)/loaddefs.el $(LOADDEFS) doit
222 @echo Directories: . $(WINS_UPDATES)
223 $(emacs) -l autoload \
224 --eval $(ARGQUOTE)(setq find-file-hook nil find-file-suppress-same-file-warnings t)$(ARGQUOTE) \
225 -f w32-batch-update-autoloads "$(lisp)/loaddefs.el" $(MAKE) . $(WINS_UPDATES)
228 $(MAKE) $(MFLAGS) update-subdirs
230 # Need separate version for sh and native cmd.exe
231 update-subdirs: update-subdirs-$(SHELLTYPE)
233 update-subdirs-CMD: doit
234 echo ;; In load-path, after this directory should come> $(lisp)/subdirs.el
235 echo ;; certain of its subdirectories. Here we specify them.>> $(lisp)/subdirs.el
236 echo (normal-top-level-add-to-load-path $(SQUOTE)(>> $(lisp)/subdirs.el
237 @for %%d in ($(WINS_SUBDIR) cedet) do echo "%%d">> $(lisp)/subdirs.el
238 echo ))>> $(lisp)/subdirs.el
239 echo ;; Local Variables:>> $(lisp)/subdirs.el
240 echo ;; version-control: never>> $(lisp)/subdirs.el
241 echo ;; no-byte-compile: t>> $(lisp)/subdirs.el
242 echo ;; End:>> $(lisp)/subdirs.el
244 update-subdirs-SH: doit
245 $(srcdir)/build-aux/update-subdirs $(lisp); \
246 for file in $(WINS_SUBDIR); do \
247 $(srcdir)/build-aux/update-subdirs $$file; \
250 updates: update-subdirs autoloads mh-autoloads finder-data custom-deps
252 # This is useful after "bzr up".
253 bzr-update: recompile autoloads finder-data custom-deps
255 # For backwards compatibility:
256 cvs-update: bzr-update
258 # Update the AUTHORS file.
261 $(emacs) -l authors -f batch-update-authors $(srcdir)/etc/AUTHORS $(srcdir)
263 TAGS: TAGS-$(MAKETYPE)
265 TAGS-LISP: TAGS-LISP-$(MAKETYPE)
268 echo This target is not supported with NMake
272 echo This target is not supported with NMake
275 TAGS-gmake: TAGS-$(SHELLTYPE)
277 TAGS-LISP-gmake: TAGS-LISP-$(SHELLTYPE)
279 TAGS-SH: $(lisptagsfiles1) $(lisptagsfiles2) $(lisptagsfiles3) $(lisptagsfiles4)
281 for dir in . $(WINS_UPDATES); do \
282 $(ETAGS) -a $(lisp)/$$dir/*.el; \
285 TAGS-LISP-SH: $(lisptagsfiles1) $(lisptagsfiles2) $(lisptagsfiles3) $(lisptagsfiles4)
286 - $(DEL) $(DEST)/TAGS-LISP
287 for dir in . $(WINS_UPDATES); do \
288 $(ETAGS) -a -o $(DEST)/TAGS-LISP $(lisp)/$$dir/*.el; \
291 TAGS-CMD: $(lisptagsfiles1) $(lisptagsfiles2) $(lisptagsfiles3) $(lisptagsfiles4)
293 for %%d in (. $(WINS_UPDATES)) do $(ETAGS) -a $(lisp)/%%d/*.el
295 TAGS-LISP-CMD: $(lisptagsfiles1) $(lisptagsfiles2) $(lisptagsfiles3) $(lisptagsfiles4)
296 - $(DEL) $(DEST)/TAGS-LISP
297 for %%d in (. $(WINS_UPDATES)) do \
298 $(ETAGS) -a -o $(DEST)/TAGS-LISP $(lisp)/%%d/*.el
303 -$(emacs) $(BYTE_COMPILE_FLAGS) -f batch-byte-compile $<
305 # Compile all Lisp files, but don't recompile those that are up to
306 # date. Some files don't actually get compiled because they set the
307 # local variable no-byte-compile.
309 # All .elc files are made writable before compilation in case we
310 # checked out read-only (CVS option -r). Files MUST be compiled one by
311 # one. If we compile several files in a row we can't make sure that
312 # the compilation environment is clean. We also set the load-path of
313 # the Emacs used for compilation to the current directory and its
314 # subdirectories, to make sure require's and load's in the files being
315 # compiled find the right files.
317 # Need separate version for sh and native cmd.exe
318 compile: $(lisp)/subdirs.el compile-$(SHELLTYPE) doit
320 compile-CMD: autoloads
321 # -for %%f in ($(lisp) $(WINS)) do for %%g in (%%f\*.elc) do @attrib -r %%g
322 for %%f in ($(COMPILE_FIRST)) do \
323 $(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f batch-byte-compile-if-not-done %%f
324 for %%f in (. $(WINS)) do for %%g in (%%f/*.el) do \
325 $(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f batch-byte-compile-if-not-done %%f/%%g
327 compile-SH: autoloads
328 # for elc in $(lisp)/*.elc $(lisp)/*/*.elc; do attrib -r $$elc; done
329 for el in $(COMPILE_FIRST); do \
330 echo Compiling $$el; \
331 $(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f batch-byte-compile-if-not-done $$el; \
333 for dir in $(lisp) $(WINS); do \
334 for el in $$dir/*.el; do \
337 echo Compiling $$el; \
338 $(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f batch-byte-compile-if-not-done $$el; \
343 # Compile all Lisp files. This is like `compile' but compiles files
344 # unconditionally. Some files don't actually get compiled because they
345 # set the local variable no-byte-compile.
347 compile-always: $(lisp)/subdirs.el compile-always-$(SHELLTYPE) doit
350 # -for %%f in ($(lisp) $(WINS)) do for %%g in (%%f\*.elc) do @attrib -r %%g
351 for %%f in ($(COMPILE_FIRST)) do $(emacs) $(BYTE_COMPILE_FLAGS) -f batch-byte-compile %%f
352 for %%f in (. $(WINS)) do for %%g in (%%f/*.el) do $(emacs) $(BYTE_COMPILE_FLAGS) -f batch-byte-compile %%f/%%g
355 # for elc in $(lisp)/*.elc $(lisp)/*/*.elc; do attrib -r $$elc; done
356 for el in $(COMPILE_FIRST); do \
357 echo Compiling $$el; \
358 $(emacs) $(BYTE_COMPILE_FLAGS) -f batch-byte-compile $$el || exit 1; \
360 for dir in $(lisp) $(WINS); do \
361 for el in $$dir/*.el; do \
362 echo Compiling $$el; \
363 $(emacs) $(BYTE_COMPILE_FLAGS) -f batch-byte-compile $$el || exit 1; \
367 compile-calc: compile-calc-$(SHELLTYPE)
370 for %%f in ($(lisp)/calc/*.el) do $(emacs) $(BYTE_COMPILE_FLAGS) -f batch-byte-compile %%f
373 for el in $(lisp)/calc/*.el; do \
374 echo Compiling $$el; \
375 $(emacs) $(BYTE_COMPILE_FLAGS) -f batch-byte-compile $$el || exit 1; \
378 # Backup compiled Lisp files in elc.tar.gz. If that file already
379 # exists, make a backup of it.
381 backup-compiled-files:
382 -mv $(lisp)/elc.tar.gz $(lisp)/elc.tar.gz~
383 -tar czf $(lisp)/elc.tar.gz $(lisp)/*.elc $(lisp)/*/*.elc
385 # Compile Lisp files, but save old compiled files first.
387 compile-after-backup: backup-compiled-files compile-always
389 compile-first: $(lisp)/emacs-lisp/bytecomp.elc $(lisp)/emacs-lisp/byte-opt.elc \
390 $(lisp)/emacs-lisp/autoload.elc
392 # Recompile all Lisp files which are newer than their .elc files.
393 # Note that this doesn't create .elc files. It only recompiles if an
395 # WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as
396 # this can break with GNU Make 3.81 and later if sh.exe is used.
397 recompile: compile-first autoloads doit $(lisp)/progmodes/cc-mode.elc
398 $(emacs) --eval $(ARGQUOTE)(batch-byte-recompile-directory 0)$(ARGQUOTE) $(lisp)
400 $(lisp)/calendar/cal-loaddefs.el:
401 "$(EMACS)" $(EMACSOPT) -l autoload \
402 --eval "(setq generate-autoload-cookie \";;;###cal-autoload\")" \
403 --eval "(setq find-file-suppress-same-file-warnings t)" \
404 --eval "(setq make-backup-files nil)" \
405 -f w32-batch-update-autoloads "$(lisp)/calendar/cal-loaddefs.el" \
408 $(lisp)/calendar/diary-loaddefs.el:
409 "$(EMACS)" $(EMACSOPT) -l autoload \
410 --eval "(setq generate-autoload-cookie \";;;###diary-autoload\")" \
411 --eval "(setq find-file-suppress-same-file-warnings t)" \
412 --eval "(setq make-backup-files nil)" \
413 -f w32-batch-update-autoloads $(lisp)/calendar/diary-loaddefs.el \
416 $(lisp)/calendar/hol-loaddefs.el:
417 "$(EMACS)" $(EMACSOPT) -l autoload \
418 --eval "(setq generate-autoload-cookie \";;;###holiday-autoload\")" \
419 --eval "(setq find-file-suppress-same-file-warnings t)" \
420 --eval "(setq make-backup-files nil)" \
421 -f w32-batch-update-autoloads $(lisp)/calendar/hol-loaddefs.el \
424 # Update MH-E internal autoloads. These are not to be confused with
425 # the autoloads for the MH-E entry points, which are already in
427 MH_E_SRC = $(lisp)/mh-e/mh-acros.el $(lisp)/mh-e/mh-alias.el \
428 $(lisp)/mh-e/mh-buffers.el $(lisp)/mh-e/mh-compat.el \
429 $(lisp)/mh-e/mh-comp.el $(lisp)/mh-e/mh-e.el \
430 $(lisp)/mh-e/mh-folder.el $(lisp)/mh-e/mh-funcs.el \
431 $(lisp)/mh-e/mh-gnus.el $(lisp)/mh-e/mh-identity.el \
432 $(lisp)/mh-e/mh-inc.el $(lisp)/mh-e/mh-junk.el \
433 $(lisp)/mh-e/mh-letter.el $(lisp)/mh-e/mh-limit.el \
434 $(lisp)/mh-e/mh-mime.el $(lisp)/mh-e/mh-print.el \
435 $(lisp)/mh-e/mh-scan.el $(lisp)/mh-e/mh-search.el \
436 $(lisp)/mh-e/mh-seq.el $(lisp)/mh-e/mh-show.el \
437 $(lisp)/mh-e/mh-speed.el $(lisp)/mh-e/mh-thread.el \
438 $(lisp)/mh-e/mh-tool-bar.el $(lisp)/mh-e/mh-utils.el \
439 $(lisp)/mh-e/mh-xface.el
441 # See the commentary for autoloads above for why we use ./mh-e below
442 # instead of $(lisp)/mh-e.
443 mh-autoloads: $(lisp)/mh-e/mh-loaddefs.el
444 $(lisp)/mh-e/mh-loaddefs.el: $(MH_E_SRC)
445 "$(EMACS)" $(EMACSOPT) \
447 --eval $(ARGQUOTE)(setq generate-autoload-cookie $(DQUOTE);;;###mh-autoload$(DQUOTE))$(ARGQUOTE) \
448 --eval $(ARGQUOTE)(setq find-file-suppress-same-file-warnings t)$(ARGQUOTE) \
449 --eval $(ARGQUOTE)(setq make-backup-files nil)$(ARGQUOTE) \
450 -f w32-batch-update-autoloads \
451 $(ARGQUOTE)$(lisp)/mh-e/mh-loaddefs.el$(ARGQUOTE) $(MAKE) ./mh-e
453 # Update TRAMP internal autoloads. Maybe we could move tramp*.el into
454 # its own subdirectory. OTOH, it does not hurt to keep them in
456 TRAMP_SRC = $(lisp)/net/tramp.el $(lisp)/net/tramp-cache.el \
457 $(lisp)/net/tramp-cmds.el $(lisp)/net/tramp-compat.el \
458 $(lisp)/net/tramp-ftp.el $(lisp)/net/tramp-gvfs.el \
459 $(lisp)/net/tramp-gw.el $(lisp)/net/tramp-sh.el \
460 $(lisp)/net/tramp-smb.el $(lisp)/net/tramp-uu.el \
461 $(lisp)/net/trampver.el
463 $(lisp)/net/tramp-loaddefs.el: $(TRAMP_SRC)
464 "$(EMACS)" $(EMACSOPT) \
466 --eval $(ARGQUOTE)(setq generate-autoload-cookie $(DQUOTE);;;###tramp-autoload$(DQUOTE))$(ARGQUOTE) \
467 --eval $(ARGQUOTE)(setq find-file-suppress-same-file-warnings t)$(ARGQUOTE) \
468 --eval $(ARGQUOTE)(setq make-backup-files nil)$(ARGQUOTE) \
469 -f w32-batch-update-autoloads \
470 $(ARGQUOTE)$(lisp)/net/tramp-loaddefs.el$(ARGQUOTE) $(MAKE) ./net
472 # Prepare a bootstrap in the lisp subdirectory.
474 # Build loaddefs.el to make sure it's up-to-date. If it's not, that
475 # might lead to errors during the bootstrap because something fails to
476 # autoload as expected. If there is no emacs binary, then we can't
477 # build autoloads yet. In that case we have to use ldefs-boot.el;
478 # bootstrap should always work with ldefs-boot.el. (Because
479 # loaddefs.el is an automatically generated file, we don't want to
480 # store it in the source repository).
482 # Remove compiled Lisp files so that bootstrap-emacs will be built from
485 # Need separate version for sh and native cmd.exe
487 - $(DEL) $(lisp)/loaddefs.el
488 $(MAKE) $(MFLAGS) bootstrap-clean-$(SHELLTYPE)
491 # if exist "$(EMACS)" $(MAKE) $(MFLAGS) autoloads
492 -for %%f in (. $(WINS)) do for %%g in (%%f\*.elc) do @$(DEL) %%g
495 # if test -f "$(EMACS)"; then $(MAKE) $(MFLAGS) autoloads; fi
496 # -rm -f $(lisp)/*.elc $(lisp)/*/*.elc
497 -for dir in . $(WINS); do rm -f $$dir/*.elc $$dir/*/*.elc $$dir/*/*/*.elc; done
499 # Generate/update files for the bootstrap process.
500 # When done, remove bootstrap-emacs from ../bin, so that
501 # it will not be mistaken for an installed binary.
503 bootstrap: update-subdirs compile finder-data custom-deps
507 # Assuming INSTALL_DIR is defined, copy the elisp files to it
508 # Windows 95 makes this harder than it should be.
511 - mkdir "$(INSTALL_DIR)/lisp"
512 - $(DEL) ../$(DIRNAME)_same-dir.tst
513 - $(DEL) "$(INSTALL_DIR)/$(DIRNAME)_same-dir.tst"
514 echo SameDirTest > "$(INSTALL_DIR)/$(DIRNAME)_same-dir.tst"
515 #ifdef COPY_LISP_SOURCE
516 $(IFNOTSAMEDIR) $(MAKE) $(MFLAGS) install-lisp-$(SHELLTYPE) $(ENDIF)
518 # $(IFNOTSAMEDIR) $(CP_DIR) *.elc "$(INSTALL_DIR)/lisp" $(ENDIF)
519 # $(IFNOTSAMEDIR) $(CP) cus-load.el "$(INSTALL_DIR)/lisp" $(ENDIF)
520 # $(IFNOTSAMEDIR) $(CP) forms*.el "$(INSTALL_DIR)/lisp" $(ENDIF)
521 # $(IFNOTSAMEDIR) $(CP) patcomp.el "$(INSTALL_DIR)/lisp" $(ENDIF)
522 # $(IFNOTSAMEDIR) $(CP) subdirs.el "$(INSTALL_DIR)/lisp" $(ENDIF)
523 # $(IFNOTSAMEDIR) $(CP) version.el "$(INSTALL_DIR)/lisp" $(ENDIF)
524 # $(IFNOTSAMEDIR) $(CP) mail/blessmail.el "$(INSTALL_DIR)/lisp/mail" $(ENDIF)
525 # $(IFNOTSAMEDIR) $(CP) mail/sc.el "$(INSTALL_DIR)/lisp/mail" $(ENDIF)
526 # $(IFNOTSAMEDIR) $(CP) play/bruce.el "$(INSTALL_DIR)/lisp/play" $(ENDIF)
527 # $(IFNOTSAMEDIR) $(CP) international/latin-*.el "$(INSTALL_DIR)/lisp/international" $(ENDIF)
528 # $(IFNOTSAMEDIR) $(CP) international/mule-conf.el "$(INSTALL_DIR)/lisp/international" $(ENDIF)
530 - $(DEL) ../$(DIRNAME)_same-dir.tst
531 - $(DEL) "$(INSTALL_DIR)/$(DIRNAME)_same-dir.tst"
533 # Need to copy *.el files first, to avoid "source file is newer" annoyance
534 # since cp does not preserve time stamps
536 cp -f *.el "$(INSTALL_DIR)/lisp"
537 for dir in $(WINS); do [ -d "$(INSTALL_DIR)/lisp/$$dir" ] || mkdir "$(INSTALL_DIR)/lisp/$$dir"; done
538 for dir in $(WINS); do cp -f $$dir/*.el "$(INSTALL_DIR)/lisp/$$dir"; done
539 for dir in . $(WINS); do cp $$dir/*.elc "$(INSTALL_DIR)/lisp/$$dir"; done
542 cp -f *.el "$(INSTALL_DIR)/lisp"
543 for %%f in ($(WINS)) do if not exist "$(INSTALL_DIR)/lisp/%%f" mkdir "$(INSTALL_DIR)/lisp/%%f"
544 for %%f in ($(WINS)) do cp -f %%f/*.el "$(INSTALL_DIR)/lisp/%%f"
545 for %%f in (. $(WINS)) do cp -f %%f/*.elc "$(INSTALL_DIR)/lisp/%%f"
547 # WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as
548 # this can break with GNU Make 3.81 and later if sh.exe is used.
550 $(emacs) -l $(lisp)/emacs-lisp/check-declare --eval $(ARGQUOTE)(check-declare-directory $(DQUOTE)$(lisp)$(DQUOTE))$(ARGQUOTE)
555 # We used to delete *~ here, but that might inadvertently remove
556 # precious files if it happens to match their short 8+3 aliases.
559 - $(DEL) calc/calc-loaddefs.el~
560 - $(DEL) eshell/esh-groups.el~
563 - $(DEL) $(lisp)/Makefile
565 maintainer-clean: bootstrap-clean distclean
566 - $(DEL) $(AUTOGENEL)
570 # CC Mode uses a compile time macro system which causes a compile time
571 # dependency in cc-*.elc files on the macros in other cc-*.el and the
572 # version string in cc-defs.el.
573 $(lisp)/progmodes/cc-align.elc $(lisp)/progmodes/cc-awk.elc\
574 $(lisp)/progmodes/cc-cmds.elc $(lisp)/progmodes/cc-compat.elc\
575 $(lisp)/progmodes/cc-engine.elc $(lisp)/progmodes/cc-fonts.elc\
576 $(lisp)/progmodes/cc-langs.elc $(lisp)/progmodes/cc-menus.elc\
577 $(lisp)/progmodes/cc-mode.elc $(lisp)/progmodes/cc-styles.elc\
578 $(lisp)/progmodes/cc-vars.elc: \
579 $(lisp)/progmodes/cc-bytecomp.elc $(lisp)/progmodes/cc-defs.elc
581 $(lisp)/progmodes/cc-align.elc: \
582 $(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-engine.elc
584 $(lisp)/progmodes/cc-cmds.elc: \
585 $(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-engine.elc
587 $(lisp)/progmodes/cc-compat.elc: \
588 $(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-styles.elc \
589 $(lisp)/progmodes/cc-engine.elc
591 $(lisp)/progmodes/cc-defs.elc: $(lisp)/progmodes/cc-bytecomp.elc \
592 $(lisp)/emacs-lisp/cl.elc $(lisp)/emacs-lisp/regexp-opt.elc
594 $(lisp)/progmodes/cc-engine.elc: $(lisp)/progmodes/cc-langs.elc \
595 $(lisp)/progmodes/cc-vars.elc
597 $(lisp)/progmodes/cc-fonts.elc: $(lisp)/progmodes/cc-langs.elc \
598 $(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-engine.elc \
599 $(lisp)/font-lock.elc
601 $(lisp)/progmodes/cc-langs.elc: $(lisp)/progmodes/cc-vars.elc \
602 $(lisp)/emacs-lisp/cl.elc
604 $(lisp)/progmodes/cc-mode.elc: $(lisp)/progmodes/cc-langs.elc \
605 $(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-engine.elc \
606 $(lisp)/progmodes/cc-styles.elc $(lisp)/progmodes/cc-cmds.elc \
607 $(lisp)/progmodes/cc-align.elc $(lisp)/progmodes/cc-menus.elc
609 $(lisp)/progmodes/cc-styles.elc: $(lisp)/progmodes/cc-vars.elc \
610 $(lisp)/progmodes/cc-align.elc
612 $(lisp)/progmodes/cc-vars.elc: $(lisp)/custom.elc $(lisp)/widget.elc
614 # MH-E dependencies, mainly to prevent failures with parallel
615 # compilation, due to race conditions between writing a given FOO.elc
616 # file and another file being compiled that says "(require FOO)",
617 # which causes Emacs to try to read FOO.elc.
619 $(MH_E_DIR)/mh-alias.elc $(MH_E_DIR)/mh-comp.elc $(MH_E_DIR)/mh-folder.elc\
620 $(MH_E_DIR)/mh-funcs.elc $(MH_E_DIR)/mh-identity.elc $(MH_E_DIR)/mh-inc.elc\
621 $(MH_E_DIR)/mh-junk.elc $(MH_E_DIR)/mh-letter.elc $(MH_E_DIR)/mh-limit.elc\
622 $(MH_E_DIR)/mh-mime.elc $(MH_E_DIR)/mh-print.elc $(MH_E_DIR)/mh-scan.elc\
623 $(MH_E_DIR)/mh-search.elc $(MH_E_DIR)/mh-seq.elc $(MH_E_DIR)/mh-show.elc\
624 $(MH_E_DIR)/mh-speed.elc $(MH_E_DIR)/mh-thread.elc $(MH_E_DIR)/mh-tool-bar.elc\
625 $(MH_E_DIR)/mh-utils.elc $(MH_E_DIR)/mh-xface.elc:\
628 $(MH_E_DIR)/mh-alias.elc $(MH_E_DIR)/mh-e.elc $(MH_E_DIR)/mh-folder.elc\
629 $(MH_E_DIR)/mh-inc.elc $(MH_E_DIR)/mh-junk.elc $(MH_E_DIR)/mh-limit.elc\
630 $(MH_E_DIR)/mh-search.elc $(MH_E_DIR)/mh-seq.elc $(MH_E_DIR)/mh-speed.elc\
631 $(MH_E_DIR)/mh-utils.elc $(MH_E_DIR)/mh-xface.elc:\
632 $(lisp)/emacs-lisp/cl.elc
634 $(MH_E_DIR)/mh-comp.elc $(MH_E_DIR)/mh-folder.elc $(MH_E_DIR)/mh-funcs.elc\
635 $(MH_E_DIR)/mh-junk.elc $(MH_E_DIR)/mh-limit.elc $(MH_E_DIR)/mh-print.elc\
636 $(MH_E_DIR)/mh-seq.elc $(MH_E_DIR)/mh-show.elc $(MH_E_DIR)/mh-thread.elc:\
637 $(MH_E_DIR)/mh-scan.elc
639 $(MH_E_DIR)/mh-folder.elc $(MH_E_DIR)/mh-letter.elc $(MH_E_DIR)/mh-mime.elc\
640 $(MH_E_DIR)/mh-search.elc $(MH_E_DIR)/mh-show.elc $(MH_E_DIR)/mh-speed.elc:\
641 $(lisp)/gnus/gnus-util.elc
643 $(MH_E_DIR)/mh-folder.elc $(MH_E_DIR)/mh-search.elc:\
644 $(lisp)/progmodes/which-func.elc
646 $(MH_E_DIR)/mh-letter.elc $(MH_E_DIR)/mh-seq.elc $(MH_E_DIR)/mh-show.elc\
647 $(MH_E_DIR)/mh-utils.elc:\
648 $(lisp)/font-lock.elc
650 $(MH_E_DIR)/mh-alias.elc $(MH_E_DIR)/mh-show.elc: $(lisp)/net/goto-addr.elc
652 $(MH_E_DIR)/mh-comp.elc: $(lisp)/mail/sendmail.elc
654 $(MH_E_DIR)/mh-e.elc: $(MH_E_DIR)/mh-buffers.elc $(lisp)/gnus/gnus.elc \
657 $(MH_E_DIR)/mh-letter.elc: $(lisp)/gnus/mailcap.elc $(lisp)/gnus/mm-decode.elc \
658 $(lisp)/gnus/mm-view.elc $(lisp)/gnus/mml.elc $(lisp)/gnus/message.elc
660 $(MH_E_DIR)/mh-print.elc: $(lisp)/ps-print.elc
662 $(MH_E_DIR)/mh-search.elc: $(lisp)/imenu.elc
664 $(MH_E_DIR)/mh-show.elc: $(lisp)/gnus/gnus-cite.elc
666 $(MH_E_DIR)/mh-speed.elc: $(lisp)/speedbar.elc $(lisp)/emacs-lisp/timer.elc
668 $(MH_E_DIR)/mh-tool-bar.elc: $(lisp)/tool-bar.elc