1 # -*- Makefile -*- for GNU Emacs on the Microsoft Windows API.
2 # Copyright (C) 2000-2014 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.
82 $(lisp)/emacs-lisp/macroexp.el \
83 $(lisp)/emacs-lisp/cconv.el \
84 $(lisp)/emacs-lisp/byte-opt.el \
85 $(lisp)/emacs-lisp/bytecomp.el \
86 $(lisp)/emacs-lisp/autoload.el
88 # The actual Emacs command run in the targets below.
89 # The quotes around $(EMACS) are here because the user could type
90 # it with forward slashes and without quotes, which will fail if
91 # the shell is cmd.exe.
93 emacs = "$(EMACS)" $(EMACSOPT)
95 # Have to define the list of subdirs manually when not using sh.
101 cedet/semantic/analyze \
102 cedet/semantic/bovine \
103 cedet/semantic/decorate \
104 cedet/semantic/symref \
105 cedet/semantic/wisent
107 # The list of subdirectories is subdivided into 4 more or less equal
108 # parts so that we could have 4-way parallelism while compiling Lisp
109 # files, which helps to slash bootstrap times. See the 'compile'
138 WINS_BASIC= $(WINS_BASIC1) $(WINS_BASIC2) $(WINS_BASIC3) $(WINS_BASIC4)
140 # Directories with lisp files to compile, and to extract data from
141 # (customs, autoloads, etc.)
142 WINS_UPDATES=$(WINS_BASIC) \
145 # Directories to add to subdirs.el
146 WINS_SUBDIR=$(WINS_BASIC) \
150 WINS= $(WINS_UPDATES) \
157 echo ";;; cus-load.el --- automatically extracted custom dependencies" > $@
158 echo ";;" >> $@; echo ";;; Code:" >> $@
160 echo ";; Local Variables:" >> $@
161 echo ";; version-control: never" >> $@
162 echo ";; no-byte-compile: t" >> $@
163 echo ";; no-update-autoloads: t" >> $@
167 echo ;;; cus-load.el --- automatically extracted custom dependencies> $@
171 echo ;; Local Variables:>> $@
172 echo ;; version-control: never>> $@
173 echo ;; no-byte-compile: t>> $@
174 echo ;; no-update-autoloads: t>> $@
178 $(MAKE) $(MFLAGS) cus-load.el-$(SHELLTYPE)
179 mv cus-load.el-$(SHELLTYPE) $@
181 # WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as
182 # this can break with GNU Make 3.81 and later if sh.exe is used.
183 custom-deps: $(lisp)/cus-load.el $(lisp)/loaddefs.el $(lisp)/subdirs.el doit
184 @echo Directories: $(WINS_UPDATES)
185 -$(emacs) -l cus-dep --eval $(ARGQUOTE)(setq find-file-hook nil)$(ARGQUOTE) \
186 -f custom-make-dependencies $(lisp) $(WINS_UPDATES)
188 finder-data: $(lisp)/loaddefs.el $(lisp)/subdirs.el doit
189 @echo Directories: $(WINS_UPDATES)
190 $(emacs) -l finder -f finder-compile-keywords-make-dist $(lisp) $(WINS_UPDATES)
193 $(MAKE) $(MFLAGS) loaddefs.el-$(SHELLTYPE)
194 cp loaddefs.el-$(SHELLTYPE) $@
195 rm loaddefs.el-$(SHELLTYPE)
198 echo ";;; loaddefs.el --- automatically extracted autoloads" > $@
199 echo ";;" >> $@; echo ";;; Code:" >> $@
201 echo ";; Local Variables:" >> $@
202 echo ";; version-control: never" >> $@
203 echo ";; no-byte-compile: t" >> $@
204 echo ";; no-update-autoloads: t" >> $@
205 echo ";; coding: utf-8" >> $@
207 echo ";;; loaddefs.el ends here" >> $@
210 echo ;;; loaddefs.el --- automatically extracted autoloads> $@
214 echo ;; Local Variables:>> $@
215 echo ;; version-control: never>> $@
216 echo ;; no-byte-compile: t>> $@
217 echo ;; no-update-autoloads: t>> $@
218 echo ;; coding: utf-8>> $@
220 echo ;;; loaddefs.el ends here>> $@
222 # Use . instead of $(lisp) because $(lisp) is an absolute file name,
223 # including a drive letter and any leading directories, so the generated
224 # loaddefs.el will mention file names that on other machine reference
225 # possibly non-existent directories.
227 # WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as
228 # this can break with GNU Make 3.81 and later if sh.exe is used.
229 autoloads: $(lisp)/loaddefs.el $(LOADDEFS) doit
230 @echo Directories: . $(WINS_UPDATES)
231 $(emacs) -l autoload \
232 --eval $(ARGQUOTE)(setq find-file-hook nil find-file-suppress-same-file-warnings t)$(ARGQUOTE) \
233 -f w32-batch-update-autoloads "$(lisp)/loaddefs.el" $(MAKE) . $(WINS_UPDATES)
236 $(MAKE) $(MFLAGS) update-subdirs
238 # Need separate version for sh and native cmd.exe
239 update-subdirs: update-subdirs-$(SHELLTYPE)
241 update-subdirs-CMD: doit
242 echo ;; In load-path, after this directory should come> $(lisp)/subdirs.el
243 echo ;; certain of its subdirectories. Here we specify them.>> $(lisp)/subdirs.el
244 echo (normal-top-level-add-to-load-path $(SQUOTE)(>> $(lisp)/subdirs.el
245 @for %%d in ($(WINS_SUBDIR) cedet) do echo "%%d">> $(lisp)/subdirs.el
246 echo ))>> $(lisp)/subdirs.el
247 echo ;; Local Variables:>> $(lisp)/subdirs.el
248 echo ;; version-control: never>> $(lisp)/subdirs.el
249 echo ;; no-byte-compile: t>> $(lisp)/subdirs.el
250 echo ;; End:>> $(lisp)/subdirs.el
252 update-subdirs-SH: doit
253 $(srcdir)/build-aux/update-subdirs $(lisp); \
254 for file in $(WINS_SUBDIR); do \
255 $(srcdir)/build-aux/update-subdirs $$file; \
258 updates: $(lisp)/subdirs.el autoloads mh-autoloads finder-data custom-deps
260 # This is useful after "bzr up".
261 bzr-update: recompile autoloads finder-data custom-deps
263 # For backwards compatibility:
264 cvs-update: bzr-update
266 # Update the AUTHORS file.
269 $(emacs) -l authors -f batch-update-authors $(srcdir)/etc/AUTHORS $(srcdir)
271 TAGS: TAGS-$(MAKETYPE)
273 TAGS-LISP: TAGS-LISP-$(MAKETYPE)
276 echo This target is not supported with NMake
280 echo This target is not supported with NMake
283 TAGS-gmake: TAGS-$(SHELLTYPE)
285 TAGS-LISP-gmake: TAGS-LISP-$(SHELLTYPE)
287 TAGS-SH: $(lisptagsfiles1) $(lisptagsfiles2) $(lisptagsfiles3) $(lisptagsfiles4)
289 for dir in . $(WINS_UPDATES); do \
290 $(ETAGS) -a $(lisp)/$$dir/*.el; \
293 TAGS-LISP-SH: $(lisptagsfiles1) $(lisptagsfiles2) $(lisptagsfiles3) $(lisptagsfiles4)
294 - $(DEL) $(DEST)/TAGS-LISP
295 for dir in . $(WINS_UPDATES); do \
296 $(ETAGS) -a -o $(DEST)/TAGS-LISP $(lisp)/$$dir/*.el; \
299 TAGS-CMD: $(lisptagsfiles1) $(lisptagsfiles2) $(lisptagsfiles3) $(lisptagsfiles4)
301 for %%d in (. $(WINS_UPDATES)) do $(ETAGS) -a $(lisp)/%%d/*.el
303 TAGS-LISP-CMD: $(lisptagsfiles1) $(lisptagsfiles2) $(lisptagsfiles3) $(lisptagsfiles4)
304 - $(DEL) $(DEST)/TAGS-LISP
305 for %%d in (. $(WINS_UPDATES)) do \
306 $(ETAGS) -a -o $(DEST)/TAGS-LISP $(lisp)/%%d/*.el
311 -$(emacs) $(BYTE_COMPILE_FLAGS) -f batch-byte-compile $<
313 # Compile all Lisp files, but don't recompile those that are up to
314 # date. Some files don't actually get compiled because they set the
315 # local variable no-byte-compile.
317 # All .elc files are made writable before compilation in case we
318 # checked out read-only (CVS option -r). Files MUST be compiled one by
319 # one. If we compile several files in a row we can't make sure that
320 # the compilation environment is clean. We also set the load-path of
321 # the Emacs used for compilation to the current directory and its
322 # subdirectories, to make sure require's and load's in the files being
323 # compiled find the right files.
325 # Need separate version for sh and native cmd.exe
326 compile: $(lisp)/subdirs.el compile0-$(SHELLTYPE) compile1-$(SHELLTYPE) compile2-$(SHELLTYPE) compile3-$(SHELLTYPE) compile4-$(SHELLTYPE) doit
328 compile0-CMD: autoloads
329 # -for %%f in ($(lisp) $(WINS)) do for %%g in (%%f\*.elc) do @attrib -r %%g
330 for %%f in ($(COMPILE_FIRST)) do \
331 $(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f batch-byte-compile-if-not-done %%f
333 compile1-CMD: autoloads compile0-CMD
334 for %%f in (. $(WINS_BASIC1)) do for %%g in (%%f/*.el) do \
335 $(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f batch-byte-compile-if-not-done %%f/%%g
337 compile2-CMD: autoloads compile0-CMD
338 for %%f in ($(WINS_BASIC2)) do for %%g in (%%f/*.el) do \
339 $(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f batch-byte-compile-if-not-done %%f/%%g
341 compile3-CMD: autoloads compile0-CMD
342 for %%f in ($(WINS_BASIC3)) do for %%g in (%%f/*.el) do \
343 $(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f batch-byte-compile-if-not-done %%f/%%g
345 compile4-CMD: autoloads compile0-CMD
346 for %%f in ($(WINS_BASIC4) $(WINS_CEDET) term obsolete) do for %%g in (%%f/*.el) do \
347 $(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f batch-byte-compile-if-not-done %%f/%%g
349 compile0-SH: autoloads
350 # for elc in $(lisp)/*.elc $(lisp)/*/*.elc; do attrib -r $$elc; done
351 for el in $(COMPILE_FIRST); do \
352 echo Compiling $$el; \
353 $(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f batch-byte-compile-if-not-done $$el; \
356 compile1-SH: autoloads compile0-SH
357 for dir in $(lisp) $(WINS_BASIC1); do \
358 for el in $$dir/*.el; do \
361 echo Compiling $$el; \
362 $(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f batch-byte-compile-if-not-done $$el; \
367 compile2-SH: autoloads compile0-SH
368 for dir in $(WINS_BASIC2); do \
369 for el in $$dir/*.el; do \
372 echo Compiling $$el; \
373 $(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f batch-byte-compile-if-not-done $$el; \
378 compile3-SH: autoloads compile0-SH
379 for dir in $(WINS_BASIC3); do \
380 for el in $$dir/*.el; do \
383 echo Compiling $$el; \
384 $(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f batch-byte-compile-if-not-done $$el; \
389 compile4-SH: autoloads compile0-SH
390 for dir in $(WINS_BASIC4) $(WINS_CEDET) term obsolete; do \
391 for el in $$dir/*.el; do \
394 echo Compiling $$el; \
395 $(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f batch-byte-compile-if-not-done $$el; \
400 # Compile all Lisp files. This is like `compile' but compiles files
401 # unconditionally. Some files don't actually get compiled because they
402 # set the local variable no-byte-compile.
404 compile-always: $(lisp)/subdirs.el compile-always-$(SHELLTYPE) doit
407 # -for %%f in ($(lisp) $(WINS)) do for %%g in (%%f\*.elc) do @attrib -r %%g
408 for %%f in ($(COMPILE_FIRST)) do $(emacs) $(BYTE_COMPILE_FLAGS) -f batch-byte-compile %%f
409 for %%f in (. $(WINS)) do for %%g in (%%f/*.el) do $(emacs) $(BYTE_COMPILE_FLAGS) -f batch-byte-compile %%f/%%g
412 # for elc in $(lisp)/*.elc $(lisp)/*/*.elc; do attrib -r $$elc; done
413 for el in $(COMPILE_FIRST); do \
414 echo Compiling $$el; \
415 $(emacs) $(BYTE_COMPILE_FLAGS) -f batch-byte-compile $$el || exit 1; \
417 for dir in $(lisp) $(WINS); do \
418 for el in $$dir/*.el; do \
419 echo Compiling $$el; \
420 $(emacs) $(BYTE_COMPILE_FLAGS) -f batch-byte-compile $$el || exit 1; \
424 compile-calc: compile-calc-$(SHELLTYPE)
427 for %%f in ($(lisp)/calc/*.el) do $(emacs) $(BYTE_COMPILE_FLAGS) -f batch-byte-compile %%f
430 for el in $(lisp)/calc/*.el; do \
431 echo Compiling $$el; \
432 $(emacs) $(BYTE_COMPILE_FLAGS) -f batch-byte-compile $$el || exit 1; \
435 # Backup compiled Lisp files in elc.tar.gz. If that file already
436 # exists, make a backup of it.
438 backup-compiled-files:
439 -mv $(lisp)/elc.tar.gz $(lisp)/elc.tar.gz~
440 -tar czf $(lisp)/elc.tar.gz $(lisp)/*.elc $(lisp)/*/*.elc
442 # Compile Lisp files, but save old compiled files first.
444 compile-after-backup: backup-compiled-files compile-always
446 compile-first: $(lisp)/emacs-lisp/bytecomp.elc $(lisp)/emacs-lisp/byte-opt.elc \
447 $(lisp)/emacs-lisp/autoload.elc $(lisp)/subdirs.el
449 # Recompile all Lisp files which are newer than their .elc files.
450 # Note that this doesn't create .elc files. It only recompiles if an
452 # WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as
453 # this can break with GNU Make 3.81 and later if sh.exe is used.
454 recompile: compile-first autoloads doit $(lisp)/progmodes/cc-mode.elc
455 $(emacs) --eval $(ARGQUOTE)(batch-byte-recompile-directory 0)$(ARGQUOTE) $(lisp)
457 $(lisp)/calendar/cal-loaddefs.el: $(lisp)/subdirs.el
458 "$(EMACS)" $(EMACSOPT) -l autoload \
459 --eval "(setq generate-autoload-cookie \";;;###cal-autoload\")" \
460 --eval "(setq find-file-suppress-same-file-warnings t)" \
461 --eval "(setq make-backup-files nil)" \
462 -f w32-batch-update-autoloads "$(lisp)/calendar/cal-loaddefs.el" \
465 $(lisp)/calendar/diary-loaddefs.el: $(lisp)/subdirs.el
466 "$(EMACS)" $(EMACSOPT) -l autoload \
467 --eval "(setq generate-autoload-cookie \";;;###diary-autoload\")" \
468 --eval "(setq find-file-suppress-same-file-warnings t)" \
469 --eval "(setq make-backup-files nil)" \
470 -f w32-batch-update-autoloads $(lisp)/calendar/diary-loaddefs.el \
473 $(lisp)/calendar/hol-loaddefs.el: $(lisp)/subdirs.el
474 "$(EMACS)" $(EMACSOPT) -l autoload \
475 --eval "(setq generate-autoload-cookie \";;;###holiday-autoload\")" \
476 --eval "(setq find-file-suppress-same-file-warnings t)" \
477 --eval "(setq make-backup-files nil)" \
478 -f w32-batch-update-autoloads $(lisp)/calendar/hol-loaddefs.el \
481 # Update MH-E internal autoloads. These are not to be confused with
482 # the autoloads for the MH-E entry points, which are already in
484 MH_E_SRC = $(lisp)/mh-e/mh-acros.el $(lisp)/mh-e/mh-alias.el \
485 $(lisp)/mh-e/mh-buffers.el $(lisp)/mh-e/mh-compat.el \
486 $(lisp)/mh-e/mh-comp.el $(lisp)/mh-e/mh-e.el \
487 $(lisp)/mh-e/mh-folder.el $(lisp)/mh-e/mh-funcs.el \
488 $(lisp)/mh-e/mh-gnus.el $(lisp)/mh-e/mh-identity.el \
489 $(lisp)/mh-e/mh-inc.el $(lisp)/mh-e/mh-junk.el \
490 $(lisp)/mh-e/mh-letter.el $(lisp)/mh-e/mh-limit.el \
491 $(lisp)/mh-e/mh-mime.el $(lisp)/mh-e/mh-print.el \
492 $(lisp)/mh-e/mh-scan.el $(lisp)/mh-e/mh-search.el \
493 $(lisp)/mh-e/mh-seq.el $(lisp)/mh-e/mh-show.el \
494 $(lisp)/mh-e/mh-speed.el $(lisp)/mh-e/mh-thread.el \
495 $(lisp)/mh-e/mh-tool-bar.el $(lisp)/mh-e/mh-utils.el \
496 $(lisp)/mh-e/mh-xface.el
498 # See the commentary for autoloads above for why we use ./mh-e below
499 # instead of $(lisp)/mh-e.
500 mh-autoloads: $(lisp)/mh-e/mh-loaddefs.el
501 $(lisp)/mh-e/mh-loaddefs.el: $(MH_E_SRC) $(lisp)/subdirs.el
502 "$(EMACS)" $(EMACSOPT) \
504 --eval $(ARGQUOTE)(setq generate-autoload-cookie $(DQUOTE);;;###mh-autoload$(DQUOTE))$(ARGQUOTE) \
505 --eval $(ARGQUOTE)(setq find-file-suppress-same-file-warnings t)$(ARGQUOTE) \
506 --eval $(ARGQUOTE)(setq make-backup-files nil)$(ARGQUOTE) \
507 -f w32-batch-update-autoloads \
508 $(ARGQUOTE)$(lisp)/mh-e/mh-loaddefs.el$(ARGQUOTE) $(MAKE) ./mh-e
510 # Update TRAMP internal autoloads. Maybe we could move tramp*.el into
511 # an own subdirectory. OTOH, it does not hurt to keep them in
513 TRAMP_DIR = $(lisp)/net
514 TRAMP_SRC = $(TRAMP_DIR)/tramp.el $(TRAMP_DIR)/tramp-adb.el \
515 $(TRAMP_DIR)/tramp-cache.el $(TRAMP_DIR)/tramp-cmds.el \
516 $(TRAMP_DIR)/tramp-compat.el $(TRAMP_DIR)/tramp-ftp.el \
517 $(TRAMP_DIR)/tramp-gvfs.el $(TRAMP_DIR)/tramp-gw.el \
518 $(TRAMP_DIR)/tramp-sh.el $(TRAMP_DIR)/tramp-smb.el \
519 $(TRAMP_DIR)/tramp-uu.el $(TRAMP_DIR)/trampver.el
521 $(TRAMP_DIR)/tramp-loaddefs.el: $(TRAMP_SRC) $(lisp)/subdirs.el
522 "$(EMACS)" $(EMACSOPT) \
524 --eval $(ARGQUOTE)(setq generate-autoload-cookie $(DQUOTE);;;###tramp-autoload$(DQUOTE))$(ARGQUOTE) \
525 --eval $(ARGQUOTE)(setq find-file-suppress-same-file-warnings t)$(ARGQUOTE) \
526 --eval $(ARGQUOTE)(setq make-backup-files nil)$(ARGQUOTE) \
527 -f w32-batch-update-autoloads \
528 $(ARGQUOTE)$(TRAMP_DIR)/tramp-loaddefs.el$(ARGQUOTE) $(MAKE) ./net
530 # Prepare a bootstrap in the lisp subdirectory.
532 # Build loaddefs.el to make sure it's up-to-date. If it's not, that
533 # might lead to errors during the bootstrap because something fails to
534 # autoload as expected. If there is no emacs binary, then we can't
535 # build autoloads yet. In that case we have to use ldefs-boot.el;
536 # bootstrap should always work with ldefs-boot.el. (Because
537 # loaddefs.el is an automatically generated file, we don't want to
538 # store it in the source repository).
540 # Remove compiled Lisp files so that bootstrap-emacs will be built from
543 # Need separate version for sh and native cmd.exe
545 - $(DEL) $(lisp)/loaddefs.el
546 - $(DEL) $(lisp)/subdirs.el
547 $(MAKE) $(MFLAGS) bootstrap-clean-$(SHELLTYPE)
550 # if exist "$(EMACS)" $(MAKE) $(MFLAGS) autoloads
551 -for %%f in (. $(WINS)) do for %%g in (%%f\*.elc) do @$(DEL) %%g
554 # if test -f "$(EMACS)"; then $(MAKE) $(MFLAGS) autoloads; fi
555 # -rm -f $(lisp)/*.elc $(lisp)/*/*.elc
556 -for dir in . $(WINS); do rm -f $$dir/*.elc $$dir/*/*.elc $$dir/*/*/*.elc; done
558 # Generate/update files for the bootstrap process.
559 # When done, remove bootstrap-emacs from ../bin, so that
560 # it will not be mistaken for an installed binary.
562 bootstrap: $(lisp)/subdirs.el compile finder-data custom-deps
566 # Assuming INSTALL_DIR is defined, copy the elisp files to it
567 # Windows 95 makes this harder than it should be.
570 - mkdir "$(INSTALL_DIR)/lisp"
571 - $(DEL) ../$(DIRNAME)_same-dir.tst
572 - $(DEL) "$(INSTALL_DIR)/$(DIRNAME)_same-dir.tst"
573 echo SameDirTest > "$(INSTALL_DIR)/$(DIRNAME)_same-dir.tst"
574 #ifdef COPY_LISP_SOURCE
575 $(IFNOTSAMEDIR) $(MAKE) $(MFLAGS) install-lisp-$(SHELLTYPE) $(ENDIF)
577 # $(IFNOTSAMEDIR) $(CP_DIR) *.elc "$(INSTALL_DIR)/lisp" $(ENDIF)
578 # $(IFNOTSAMEDIR) $(CP) cus-load.el "$(INSTALL_DIR)/lisp" $(ENDIF)
579 # $(IFNOTSAMEDIR) $(CP) forms*.el "$(INSTALL_DIR)/lisp" $(ENDIF)
580 # $(IFNOTSAMEDIR) $(CP) patcomp.el "$(INSTALL_DIR)/lisp" $(ENDIF)
581 # $(IFNOTSAMEDIR) $(CP) subdirs.el "$(INSTALL_DIR)/lisp" $(ENDIF)
582 # $(IFNOTSAMEDIR) $(CP) version.el "$(INSTALL_DIR)/lisp" $(ENDIF)
583 # $(IFNOTSAMEDIR) $(CP) mail/blessmail.el "$(INSTALL_DIR)/lisp/mail" $(ENDIF)
584 # $(IFNOTSAMEDIR) $(CP) mail/sc.el "$(INSTALL_DIR)/lisp/mail" $(ENDIF)
585 # $(IFNOTSAMEDIR) $(CP) play/bruce.el "$(INSTALL_DIR)/lisp/play" $(ENDIF)
586 # $(IFNOTSAMEDIR) $(CP) international/latin-*.el "$(INSTALL_DIR)/lisp/international" $(ENDIF)
587 # $(IFNOTSAMEDIR) $(CP) international/mule-conf.el "$(INSTALL_DIR)/lisp/international" $(ENDIF)
589 - $(DEL) ../$(DIRNAME)_same-dir.tst
590 - $(DEL) "$(INSTALL_DIR)/$(DIRNAME)_same-dir.tst"
592 # Need to copy *.el files first, to avoid "source file is newer" annoyance
593 # since cp does not preserve time stamps
595 cp -f *.el "$(INSTALL_DIR)/lisp"
596 for dir in $(WINS); do [ -d "$(INSTALL_DIR)/lisp/$$dir" ] || mkdir "$(INSTALL_DIR)/lisp/$$dir"; done
597 for dir in $(WINS); do cp -f $$dir/*.el "$(INSTALL_DIR)/lisp/$$dir"; done
598 for dir in . $(WINS); do cp $$dir/*.elc "$(INSTALL_DIR)/lisp/$$dir"; done
601 cp -f *.el "$(INSTALL_DIR)/lisp"
602 for %%f in ($(WINS)) do if not exist "$(INSTALL_DIR)/lisp/%%f" mkdir "$(INSTALL_DIR)/lisp/%%f"
603 for %%f in ($(WINS)) do cp -f %%f/*.el "$(INSTALL_DIR)/lisp/%%f"
604 for %%f in (. $(WINS)) do cp -f %%f/*.elc "$(INSTALL_DIR)/lisp/%%f"
606 # WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as
607 # this can break with GNU Make 3.81 and later if sh.exe is used.
609 $(emacs) -l $(lisp)/emacs-lisp/check-declare --eval $(ARGQUOTE)(check-declare-directory $(DQUOTE)$(lisp)$(DQUOTE))$(ARGQUOTE)
614 # We used to delete *~ here, but that might inadvertently remove
615 # precious files if it happens to match their short 8+3 aliases.
618 - $(DEL) calc/calc-loaddefs.el~
619 - $(DEL) eshell/esh-groups.el~
622 - $(DEL) $(lisp)/Makefile
624 maintainer-clean: bootstrap-clean distclean
625 - $(DEL) $(AUTOGENEL)
629 # CC Mode uses a compile time macro system which causes a compile time
630 # dependency in cc-*.elc files on the macros in other cc-*.el and the
631 # version string in cc-defs.el.
632 $(lisp)/progmodes/cc-align.elc $(lisp)/progmodes/cc-awk.elc\
633 $(lisp)/progmodes/cc-cmds.elc $(lisp)/progmodes/cc-compat.elc\
634 $(lisp)/progmodes/cc-engine.elc $(lisp)/progmodes/cc-fonts.elc\
635 $(lisp)/progmodes/cc-langs.elc $(lisp)/progmodes/cc-menus.elc\
636 $(lisp)/progmodes/cc-mode.elc $(lisp)/progmodes/cc-styles.elc\
637 $(lisp)/progmodes/cc-vars.elc: \
638 $(lisp)/progmodes/cc-bytecomp.elc $(lisp)/progmodes/cc-defs.elc
640 $(lisp)/progmodes/cc-align.elc: \
641 $(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-engine.elc
643 $(lisp)/progmodes/cc-cmds.elc: \
644 $(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-engine.elc
646 $(lisp)/progmodes/cc-compat.elc: \
647 $(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-styles.elc \
648 $(lisp)/progmodes/cc-engine.elc
650 $(lisp)/progmodes/cc-defs.elc: $(lisp)/progmodes/cc-bytecomp.elc \
651 $(lisp)/emacs-lisp/cl.elc $(lisp)/emacs-lisp/regexp-opt.elc
653 $(lisp)/progmodes/cc-engine.elc: $(lisp)/progmodes/cc-langs.elc \
654 $(lisp)/progmodes/cc-vars.elc
656 $(lisp)/progmodes/cc-fonts.elc: $(lisp)/progmodes/cc-langs.elc \
657 $(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-engine.elc \
658 $(lisp)/font-lock.elc
660 $(lisp)/progmodes/cc-langs.elc: $(lisp)/progmodes/cc-vars.elc \
661 $(lisp)/emacs-lisp/cl.elc
663 $(lisp)/progmodes/cc-mode.elc: $(lisp)/progmodes/cc-langs.elc \
664 $(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-engine.elc \
665 $(lisp)/progmodes/cc-styles.elc $(lisp)/progmodes/cc-cmds.elc \
666 $(lisp)/progmodes/cc-align.elc $(lisp)/progmodes/cc-menus.elc \
669 $(lisp)/progmodes/cc-styles.elc: $(lisp)/progmodes/cc-vars.elc \
670 $(lisp)/progmodes/cc-align.elc
672 $(lisp)/progmodes/cc-vars.elc: $(lisp)/custom.elc $(lisp)/widget.elc
674 # MH-E dependencies, mainly to prevent failures with parallel
675 # compilation, due to race conditions between writing a given FOO.elc
676 # file and another file being compiled that says "(require FOO)",
677 # which causes Emacs to try to read FOO.elc.
679 $(MH_E_DIR)/mh-alias.elc $(MH_E_DIR)/mh-comp.elc $(MH_E_DIR)/mh-folder.elc\
680 $(MH_E_DIR)/mh-funcs.elc $(MH_E_DIR)/mh-identity.elc $(MH_E_DIR)/mh-inc.elc\
681 $(MH_E_DIR)/mh-junk.elc $(MH_E_DIR)/mh-letter.elc $(MH_E_DIR)/mh-limit.elc\
682 $(MH_E_DIR)/mh-mime.elc $(MH_E_DIR)/mh-print.elc $(MH_E_DIR)/mh-scan.elc\
683 $(MH_E_DIR)/mh-search.elc $(MH_E_DIR)/mh-seq.elc $(MH_E_DIR)/mh-show.elc\
684 $(MH_E_DIR)/mh-speed.elc $(MH_E_DIR)/mh-thread.elc $(MH_E_DIR)/mh-tool-bar.elc\
685 $(MH_E_DIR)/mh-utils.elc $(MH_E_DIR)/mh-xface.elc:\
688 $(MH_E_DIR)/mh-alias.elc $(MH_E_DIR)/mh-e.elc $(MH_E_DIR)/mh-folder.elc\
689 $(MH_E_DIR)/mh-inc.elc $(MH_E_DIR)/mh-junk.elc $(MH_E_DIR)/mh-limit.elc\
690 $(MH_E_DIR)/mh-search.elc $(MH_E_DIR)/mh-seq.elc $(MH_E_DIR)/mh-speed.elc\
691 $(MH_E_DIR)/mh-utils.elc $(MH_E_DIR)/mh-xface.elc:\
692 $(lisp)/emacs-lisp/cl.elc
694 $(MH_E_DIR)/mh-comp.elc $(MH_E_DIR)/mh-folder.elc $(MH_E_DIR)/mh-funcs.elc\
695 $(MH_E_DIR)/mh-junk.elc $(MH_E_DIR)/mh-limit.elc $(MH_E_DIR)/mh-print.elc\
696 $(MH_E_DIR)/mh-seq.elc $(MH_E_DIR)/mh-show.elc $(MH_E_DIR)/mh-thread.elc:\
697 $(MH_E_DIR)/mh-scan.elc
699 $(MH_E_DIR)/mh-folder.elc $(MH_E_DIR)/mh-letter.elc $(MH_E_DIR)/mh-mime.elc\
700 $(MH_E_DIR)/mh-search.elc $(MH_E_DIR)/mh-show.elc $(MH_E_DIR)/mh-speed.elc:\
701 $(lisp)/gnus/gnus-util.elc
703 $(MH_E_DIR)/mh-folder.elc $(MH_E_DIR)/mh-search.elc:\
704 $(lisp)/progmodes/which-func.elc
706 $(MH_E_DIR)/mh-letter.elc $(MH_E_DIR)/mh-seq.elc $(MH_E_DIR)/mh-show.elc\
707 $(MH_E_DIR)/mh-utils.elc:\
708 $(lisp)/font-lock.elc
710 $(MH_E_DIR)/mh-alias.elc $(MH_E_DIR)/mh-show.elc: $(lisp)/net/goto-addr.elc
712 $(MH_E_DIR)/mh-comp.elc: $(lisp)/mail/sendmail.elc
714 $(MH_E_DIR)/mh-e.elc: $(MH_E_DIR)/mh-buffers.elc $(lisp)/gnus/gnus.elc \
717 $(MH_E_DIR)/mh-letter.elc: $(lisp)/gnus/mailcap.elc $(lisp)/gnus/mm-decode.elc \
718 $(lisp)/gnus/mm-view.elc $(lisp)/gnus/mml.elc $(lisp)/gnus/message.elc
720 $(MH_E_DIR)/mh-print.elc: $(lisp)/ps-print.elc
722 $(MH_E_DIR)/mh-search.elc: $(lisp)/imenu.elc
724 $(MH_E_DIR)/mh-show.elc: $(lisp)/gnus/gnus-cite.elc
726 $(MH_E_DIR)/mh-speed.elc: $(lisp)/speedbar.elc $(lisp)/emacs-lisp/timer.elc
728 $(MH_E_DIR)/mh-tool-bar.elc: $(lisp)/tool-bar.elc