-# -*- Makefile -*- for GNU Emacs on the Microsoft W32 API.
-# Copyright (C) 2000-2012 Free Software Foundation, Inc.
+# -*- Makefile -*- for GNU Emacs on the Microsoft Windows API.
+# Copyright (C) 2000-2014 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
BYTE_COMPILE_FLAGS = $(BIG_STACK_OPTS) $(BYTE_COMPILE_EXTRA_FLAGS)
# Files to compile before others during a bootstrap. This is done to
-# speed up the bootstrap process. The CC files are compiled first
-# because CC mode tweaks the compilation process, and requiring
-# cc-mode when it is not compiled doesn't work during the
-# bootstrapping.
+# speed up the bootstrap process.
COMPILE_FIRST = \
- $(lisp)/emacs-lisp/byte-opt.el \
- $(lisp)/emacs-lisp/bytecomp.el \
$(lisp)/emacs-lisp/macroexp.el \
$(lisp)/emacs-lisp/cconv.el \
- $(lisp)/progmodes/cc-mode.el \
- $(lisp)/progmodes/cc-vars.el
+ $(lisp)/emacs-lisp/byte-opt.el \
+ $(lisp)/emacs-lisp/bytecomp.el \
+ $(lisp)/emacs-lisp/autoload.el
# The actual Emacs command run in the targets below.
# The quotes around $(EMACS) are here because the user could type
cedet/semantic/symref \
cedet/semantic/wisent
-WINS_BASIC=\
+# The list of subdirectories is subdivided into 4 more or less equal
+# parts so that we could have 4-way parallelism while compiling Lisp
+# files, which helps to slash bootstrap times. See the 'compile'
+# target below.
+WINS_BASIC1=\
calc \
calendar \
emacs-lisp \
- emulation \
erc \
- eshell \
+ net \
+ url
+
+WINS_BASIC2=\
gnus \
international \
language \
- mail \
+ mail
+
+WINS_BASIC3=\
+ emulation \
mh-e \
- net \
nxml \
org \
play \
- progmodes \
textmodes \
- url \
vc
+WINS_BASIC4=\
+ eshell \
+ progmodes
+
+WINS_BASIC= $(WINS_BASIC1) $(WINS_BASIC2) $(WINS_BASIC3) $(WINS_BASIC4)
+
# Directories with lisp files to compile, and to extract data from
# (customs, autoloads, etc.)
WINS_UPDATES=$(WINS_BASIC) \
# WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as
# this can break with GNU Make 3.81 and later if sh.exe is used.
-custom-deps: $(lisp)/cus-load.el $(lisp)/loaddefs.el doit
+custom-deps: $(lisp)/cus-load.el $(lisp)/loaddefs.el $(lisp)/subdirs.el doit
@echo Directories: $(WINS_UPDATES)
-$(emacs) -l cus-dep --eval $(ARGQUOTE)(setq find-file-hook nil)$(ARGQUOTE) \
-f custom-make-dependencies $(lisp) $(WINS_UPDATES)
-finder-data: $(lisp)/loaddefs.el doit
+finder-data: $(lisp)/loaddefs.el $(lisp)/subdirs.el doit
@echo Directories: $(WINS_UPDATES)
$(emacs) -l finder -f finder-compile-keywords-make-dist $(lisp) $(WINS_UPDATES)
$(srcdir)/build-aux/update-subdirs $$file; \
done;
-updates: update-subdirs autoloads mh-autoloads finder-data custom-deps
+updates: $(lisp)/subdirs.el autoloads mh-autoloads finder-data custom-deps
# This is useful after "bzr up".
bzr-update: recompile autoloads finder-data custom-deps
# compiled find the right files.
# Need separate version for sh and native cmd.exe
-compile: $(lisp)/subdirs.el compile-$(SHELLTYPE) doit
+compile: $(lisp)/subdirs.el compile0-$(SHELLTYPE) compile1-$(SHELLTYPE) compile2-$(SHELLTYPE) compile3-$(SHELLTYPE) compile4-$(SHELLTYPE) doit
-compile-CMD: autoloads
+compile0-CMD: autoloads
# -for %%f in ($(lisp) $(WINS)) do for %%g in (%%f\*.elc) do @attrib -r %%g
for %%f in ($(COMPILE_FIRST)) do \
$(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f batch-byte-compile-if-not-done %%f
- for %%f in (. $(WINS)) do for %%g in (%%f/*.el) do \
+
+compile1-CMD: autoloads compile0-CMD
+ for %%f in (. $(WINS_BASIC1)) do for %%g in (%%f/*.el) do \
+ $(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f batch-byte-compile-if-not-done %%f/%%g
+
+compile2-CMD: autoloads compile0-CMD
+ for %%f in ($(WINS_BASIC2)) do for %%g in (%%f/*.el) do \
+ $(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f batch-byte-compile-if-not-done %%f/%%g
+
+compile3-CMD: autoloads compile0-CMD
+ for %%f in ($(WINS_BASIC3)) do for %%g in (%%f/*.el) do \
$(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f batch-byte-compile-if-not-done %%f/%%g
-compile-SH: autoloads
+compile4-CMD: autoloads compile0-CMD
+ for %%f in ($(WINS_BASIC4) $(WINS_CEDET) term obsolete) do for %%g in (%%f/*.el) do \
+ $(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f batch-byte-compile-if-not-done %%f/%%g
+
+compile0-SH: autoloads
# for elc in $(lisp)/*.elc $(lisp)/*/*.elc; do attrib -r $$elc; done
for el in $(COMPILE_FIRST); do \
echo Compiling $$el; \
$(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f batch-byte-compile-if-not-done $$el; \
done
- for dir in $(lisp) $(WINS); do \
+
+compile1-SH: autoloads compile0-SH
+ for dir in $(lisp) $(WINS_BASIC1); do \
+ for el in $$dir/*.el; do \
+ if test -f $$el; \
+ then \
+ echo Compiling $$el; \
+ $(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f batch-byte-compile-if-not-done $$el; \
+ fi \
+ done; \
+ done
+
+compile2-SH: autoloads compile0-SH
+ for dir in $(WINS_BASIC2); do \
+ for el in $$dir/*.el; do \
+ if test -f $$el; \
+ then \
+ echo Compiling $$el; \
+ $(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f batch-byte-compile-if-not-done $$el; \
+ fi \
+ done; \
+ done
+
+compile3-SH: autoloads compile0-SH
+ for dir in $(WINS_BASIC3); do \
+ for el in $$dir/*.el; do \
+ if test -f $$el; \
+ then \
+ echo Compiling $$el; \
+ $(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f batch-byte-compile-if-not-done $$el; \
+ fi \
+ done; \
+ done
+
+compile4-SH: autoloads compile0-SH
+ for dir in $(WINS_BASIC4) $(WINS_CEDET) term obsolete; do \
for el in $$dir/*.el; do \
if test -f $$el; \
then \
compile-after-backup: backup-compiled-files compile-always
compile-first: $(lisp)/emacs-lisp/bytecomp.elc $(lisp)/emacs-lisp/byte-opt.elc \
- $(lisp)/emacs-lisp/autoload.elc
+ $(lisp)/emacs-lisp/autoload.elc $(lisp)/subdirs.el
# Recompile all Lisp files which are newer than their .elc files.
# Note that this doesn't create .elc files. It only recompiles if an
recompile: compile-first autoloads doit $(lisp)/progmodes/cc-mode.elc
$(emacs) --eval $(ARGQUOTE)(batch-byte-recompile-directory 0)$(ARGQUOTE) $(lisp)
-$(lisp)/calendar/cal-loaddefs.el:
+$(lisp)/calendar/cal-loaddefs.el: $(lisp)/subdirs.el
"$(EMACS)" $(EMACSOPT) -l autoload \
--eval "(setq generate-autoload-cookie \";;;###cal-autoload\")" \
--eval "(setq find-file-suppress-same-file-warnings t)" \
-f w32-batch-update-autoloads "$(lisp)/calendar/cal-loaddefs.el" \
$(MAKE) ./calendar
-$(lisp)/calendar/diary-loaddefs.el:
+$(lisp)/calendar/diary-loaddefs.el: $(lisp)/subdirs.el
"$(EMACS)" $(EMACSOPT) -l autoload \
--eval "(setq generate-autoload-cookie \";;;###diary-autoload\")" \
--eval "(setq find-file-suppress-same-file-warnings t)" \
-f w32-batch-update-autoloads $(lisp)/calendar/diary-loaddefs.el \
$(MAKE) ./calendar
-$(lisp)/calendar/hol-loaddefs.el:
+$(lisp)/calendar/hol-loaddefs.el: $(lisp)/subdirs.el
"$(EMACS)" $(EMACSOPT) -l autoload \
--eval "(setq generate-autoload-cookie \";;;###holiday-autoload\")" \
--eval "(setq find-file-suppress-same-file-warnings t)" \
# See the commentary for autoloads above for why we use ./mh-e below
# instead of $(lisp)/mh-e.
mh-autoloads: $(lisp)/mh-e/mh-loaddefs.el
-$(lisp)/mh-e/mh-loaddefs.el: $(MH_E_SRC)
+$(lisp)/mh-e/mh-loaddefs.el: $(MH_E_SRC) $(lisp)/subdirs.el
"$(EMACS)" $(EMACSOPT) \
-l autoload \
--eval $(ARGQUOTE)(setq generate-autoload-cookie $(DQUOTE);;;###mh-autoload$(DQUOTE))$(ARGQUOTE) \
$(ARGQUOTE)$(lisp)/mh-e/mh-loaddefs.el$(ARGQUOTE) $(MAKE) ./mh-e
# Update TRAMP internal autoloads. Maybe we could move tramp*.el into
-# its own subdirectory. OTOH, it does not hurt to keep them in
+# an own subdirectory. OTOH, it does not hurt to keep them in
# lisp/net.
-TRAMP_SRC = $(lisp)/net/tramp.el $(lisp)/net/tramp-cache.el \
- $(lisp)/net/tramp-cmds.el $(lisp)/net/tramp-compat.el \
- $(lisp)/net/tramp-ftp.el $(lisp)/net/tramp-gvfs.el \
- $(lisp)/net/tramp-gw.el $(lisp)/net/tramp-sh.el \
- $(lisp)/net/tramp-smb.el $(lisp)/net/tramp-uu.el \
- $(lisp)/net/trampver.el
-
-$(lisp)/net/tramp-loaddefs.el: $(TRAMP_SRC)
+TRAMP_DIR = $(lisp)/net
+TRAMP_SRC = $(TRAMP_DIR)/tramp.el $(TRAMP_DIR)/tramp-adb.el \
+ $(TRAMP_DIR)/tramp-cache.el $(TRAMP_DIR)/tramp-cmds.el \
+ $(TRAMP_DIR)/tramp-compat.el $(TRAMP_DIR)/tramp-ftp.el \
+ $(TRAMP_DIR)/tramp-gvfs.el $(TRAMP_DIR)/tramp-gw.el \
+ $(TRAMP_DIR)/tramp-sh.el $(TRAMP_DIR)/tramp-smb.el \
+ $(TRAMP_DIR)/tramp-uu.el $(TRAMP_DIR)/trampver.el
+
+$(TRAMP_DIR)/tramp-loaddefs.el: $(TRAMP_SRC) $(lisp)/subdirs.el
"$(EMACS)" $(EMACSOPT) \
-l autoload \
--eval $(ARGQUOTE)(setq generate-autoload-cookie $(DQUOTE);;;###tramp-autoload$(DQUOTE))$(ARGQUOTE) \
--eval $(ARGQUOTE)(setq find-file-suppress-same-file-warnings t)$(ARGQUOTE) \
--eval $(ARGQUOTE)(setq make-backup-files nil)$(ARGQUOTE) \
-f w32-batch-update-autoloads \
- $(ARGQUOTE)$(lisp)/net/tramp-loaddefs.el$(ARGQUOTE) $(MAKE) ./net
+ $(ARGQUOTE)$(TRAMP_DIR)/tramp-loaddefs.el$(ARGQUOTE) $(MAKE) ./net
# Prepare a bootstrap in the lisp subdirectory.
#
# Need separate version for sh and native cmd.exe
bootstrap-clean:
- $(DEL) $(lisp)/loaddefs.el
+ - $(DEL) $(lisp)/subdirs.el
$(MAKE) $(MFLAGS) bootstrap-clean-$(SHELLTYPE)
bootstrap-clean-CMD:
# When done, remove bootstrap-emacs from ../bin, so that
# it will not be mistaken for an installed binary.
-bootstrap: update-subdirs compile finder-data custom-deps
+bootstrap: $(lisp)/subdirs.el compile finder-data custom-deps
- $(DEL) "$(EMACS)"
#
$(lisp)/progmodes/cc-mode.elc: $(lisp)/progmodes/cc-langs.elc \
$(lisp)/progmodes/cc-vars.elc $(lisp)/progmodes/cc-engine.elc \
$(lisp)/progmodes/cc-styles.elc $(lisp)/progmodes/cc-cmds.elc \
- $(lisp)/progmodes/cc-align.elc $(lisp)/progmodes/cc-menus.elc
+ $(lisp)/progmodes/cc-align.elc $(lisp)/progmodes/cc-menus.elc \
+ $(lisp)/subdirs.el
$(lisp)/progmodes/cc-styles.elc: $(lisp)/progmodes/cc-vars.elc \
$(lisp)/progmodes/cc-align.elc