emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r111166: Parallelize byte compilation


From: Eli Zaretskii
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r111166: Parallelize byte compilation on MS-Windows.
Date: Sun, 09 Dec 2012 23:32:12 +0200
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 111166
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Sun 2012-12-09 23:32:12 +0200
message:
  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.
modified:
  lisp/ChangeLog
  lisp/makefile.w32-in
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-12-09 03:40:09 +0000
+++ b/lisp/ChangeLog    2012-12-09 21:32:12 +0000
@@ -1,3 +1,20 @@
+2012-12-09  Eli Zaretskii  <address@hidden>
+
+       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  <address@hidden>
 
        * simple.el (set-mark-default-inactive): Delete this

=== modified file 'lisp/makefile.w32-in'
--- a/lisp/makefile.w32-in      2012-12-04 16:56:04 +0000
+++ b/lisp/makefile.w32-in      2012-12-09 21:32:12 +0000
@@ -104,27 +104,39 @@
        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 @@
 # 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 \
-         $(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f 
batch-byte-compile-if-not-done %%f/%%g
-
-compile-SH: autoloads
+
+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
+
+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 \


reply via email to

[Prev in Thread] Current Thread [Next in Thread]