aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii <[email protected]>2012-12-09 23:32:12 +0200
committerEli Zaretskii <[email protected]>2012-12-09 23:32:12 +0200
commitca065258cc3f6622dba45654f01cb71589cd29d4 (patch)
tree5ee61bf1114f28440481b1881b3157c86c2a2c16
parentb5591ebb3b37bd9809b7775d1c297093cac0311d (diff)
Parallelize byte compilation on MS-Windows.
lisp/makefile.w32-in (WINS_BASIC1, WINS_BASIC2, WINS_BASIC3) (WINS_BASIC4): New variables, subdivide subdirectories into 4 parts. (WINS_BASIC): Define as concatenation of the above. (compile): Subdivide into 4 separate and independent jobs that can be run in parallel. (compile0-CMD, compile0-SH): New targets for compiling COMPILE_FIRST files, which are prerequisites for the rest of the byte-compilation. (compile1-CMD, compile2-CMD, compile3-CMD, compile4-CMD): New targets for parallel compilation with cmd.exe. (compile1-SH, compile2-SH, compile3-SH, compile4-SH): Ditto for compiling under a Unixy shell.
-rw-r--r--lisp/ChangeLog17
-rw-r--r--lisp/makefile.w32-in85
2 files changed, 90 insertions, 12 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index e7d8f0652c..5dba3964f1 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,20 @@
+2012-12-09 Eli Zaretskii <[email protected]>
+
+ Parallelize byte compilation on MS-Windows.
+ * makefile.w32-in (WINS_BASIC1, WINS_BASIC2, WINS_BASIC3)
+ (WINS_BASIC4): New variables, subdivide subdirectories into 4
+ parts.
+ (WINS_BASIC): Define as concatenation of the above.
+ (compile): Subdivide into 4 separate and independent jobs that can
+ be run in parallel.
+ (compile0-CMD, compile0-SH): New targets for compiling
+ COMPILE_FIRST files, which are prerequisites for the rest of the
+ byte-compilation.
+ (compile1-CMD, compile2-CMD, compile3-CMD, compile4-CMD): New
+ targets for parallel compilation with cmd.exe.
+ (compile1-SH, compile2-SH, compile3-SH, compile4-SH): Ditto for
+ compiling under a Unixy shell.
+
2012-12-09 Chong Yidong <[email protected]>
* simple.el (set-mark-default-inactive): Delete this
diff --git a/lisp/makefile.w32-in b/lisp/makefile.w32-in
index 9f1b57e85b..cb2cba466f 100644
--- a/lisp/makefile.w32-in
+++ b/lisp/makefile.w32-in
@@ -104,27 +104,39 @@ WINS_CEDET=\
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) \
@@ -311,22 +323,71 @@ TAGS-LISP-CMD: $(lisptagsfiles1) $(lisptagsfiles2) $(lisptagsfiles3) $(lisptagsf
# 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
-compile-SH: autoloads
+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
+
+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) terms obsolete; do \
for el in $$dir/*.el; do \
if test -f $$el; \
then \