diff options
| author | Eli Zaretskii | 2012-12-09 23:32:12 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2012-12-09 23:32:12 +0200 |
| commit | ca065258cc3f6622dba45654f01cb71589cd29d4 (patch) | |
| tree | 5ee61bf1114f28440481b1881b3157c86c2a2c16 | |
| parent | b5591ebb3b37bd9809b7775d1c297093cac0311d (diff) | |
| download | emacs-ca065258cc3f6622dba45654f01cb71589cd29d4.tar.gz emacs-ca065258cc3f6622dba45654f01cb71589cd29d4.zip | |
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/ChangeLog | 17 | ||||
| -rw-r--r-- | lisp/makefile.w32-in | 85 |
2 files changed, 90 insertions, 12 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e7d8f0652cc..5dba3964f1c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,20 @@ | |||
| 1 | 2012-12-09 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | Parallelize byte compilation on MS-Windows. | ||
| 4 | * makefile.w32-in (WINS_BASIC1, WINS_BASIC2, WINS_BASIC3) | ||
| 5 | (WINS_BASIC4): New variables, subdivide subdirectories into 4 | ||
| 6 | parts. | ||
| 7 | (WINS_BASIC): Define as concatenation of the above. | ||
| 8 | (compile): Subdivide into 4 separate and independent jobs that can | ||
| 9 | be run in parallel. | ||
| 10 | (compile0-CMD, compile0-SH): New targets for compiling | ||
| 11 | COMPILE_FIRST files, which are prerequisites for the rest of the | ||
| 12 | byte-compilation. | ||
| 13 | (compile1-CMD, compile2-CMD, compile3-CMD, compile4-CMD): New | ||
| 14 | targets for parallel compilation with cmd.exe. | ||
| 15 | (compile1-SH, compile2-SH, compile3-SH, compile4-SH): Ditto for | ||
| 16 | compiling under a Unixy shell. | ||
| 17 | |||
| 1 | 2012-12-09 Chong Yidong <cyd@gnu.org> | 18 | 2012-12-09 Chong Yidong <cyd@gnu.org> |
| 2 | 19 | ||
| 3 | * simple.el (set-mark-default-inactive): Delete this | 20 | * simple.el (set-mark-default-inactive): Delete this |
diff --git a/lisp/makefile.w32-in b/lisp/makefile.w32-in index 9f1b57e85b1..cb2cba466f6 100644 --- a/lisp/makefile.w32-in +++ b/lisp/makefile.w32-in | |||
| @@ -104,27 +104,39 @@ WINS_CEDET=\ | |||
| 104 | cedet/semantic/symref \ | 104 | cedet/semantic/symref \ |
| 105 | cedet/semantic/wisent | 105 | cedet/semantic/wisent |
| 106 | 106 | ||
| 107 | WINS_BASIC=\ | 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' | ||
| 110 | # target below. | ||
| 111 | WINS_BASIC1=\ | ||
| 108 | calc \ | 112 | calc \ |
| 109 | calendar \ | 113 | calendar \ |
| 110 | emacs-lisp \ | 114 | emacs-lisp \ |
| 111 | emulation \ | ||
| 112 | erc \ | 115 | erc \ |
| 113 | eshell \ | 116 | net \ |
| 117 | url | ||
| 118 | |||
| 119 | WINS_BASIC2=\ | ||
| 114 | gnus \ | 120 | gnus \ |
| 115 | international \ | 121 | international \ |
| 116 | language \ | 122 | language \ |
| 117 | mail \ | 123 | |
| 124 | |||
| 125 | WINS_BASIC3=\ | ||
| 126 | emulation \ | ||
| 118 | mh-e \ | 127 | mh-e \ |
| 119 | net \ | ||
| 120 | nxml \ | 128 | nxml \ |
| 121 | org \ | 129 | org \ |
| 122 | play \ | 130 | play \ |
| 123 | progmodes \ | ||
| 124 | textmodes \ | 131 | textmodes \ |
| 125 | url \ | ||
| 126 | vc | 132 | vc |
| 127 | 133 | ||
| 134 | WINS_BASIC4=\ | ||
| 135 | eshell \ | ||
| 136 | progmodes | ||
| 137 | |||
| 138 | WINS_BASIC= $(WINS_BASIC1) $(WINS_BASIC2) $(WINS_BASIC3) $(WINS_BASIC4) | ||
| 139 | |||
| 128 | # Directories with lisp files to compile, and to extract data from | 140 | # Directories with lisp files to compile, and to extract data from |
| 129 | # (customs, autoloads, etc.) | 141 | # (customs, autoloads, etc.) |
| 130 | WINS_UPDATES=$(WINS_BASIC) \ | 142 | WINS_UPDATES=$(WINS_BASIC) \ |
| @@ -311,22 +323,71 @@ TAGS-LISP-CMD: $(lisptagsfiles1) $(lisptagsfiles2) $(lisptagsfiles3) $(lisptagsf | |||
| 311 | # compiled find the right files. | 323 | # compiled find the right files. |
| 312 | 324 | ||
| 313 | # Need separate version for sh and native cmd.exe | 325 | # Need separate version for sh and native cmd.exe |
| 314 | compile: $(lisp)/subdirs.el compile-$(SHELLTYPE) doit | 326 | compile: $(lisp)/subdirs.el compile0-$(SHELLTYPE) compile1-$(SHELLTYPE) compile2-$(SHELLTYPE) compile3-$(SHELLTYPE) compile4-$(SHELLTYPE) doit |
| 315 | 327 | ||
| 316 | compile-CMD: autoloads | 328 | compile0-CMD: autoloads |
| 317 | # -for %%f in ($(lisp) $(WINS)) do for %%g in (%%f\*.elc) do @attrib -r %%g | 329 | # -for %%f in ($(lisp) $(WINS)) do for %%g in (%%f\*.elc) do @attrib -r %%g |
| 318 | for %%f in ($(COMPILE_FIRST)) do \ | 330 | for %%f in ($(COMPILE_FIRST)) do \ |
| 319 | $(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f batch-byte-compile-if-not-done %%f | 331 | $(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f batch-byte-compile-if-not-done %%f |
| 320 | for %%f in (. $(WINS)) do for %%g in (%%f/*.el) do \ | 332 | |
| 333 | compile1-CMD: autoloads compile0-CMD | ||
| 334 | for %%f in (. $(WINS_BASIC1)) do for %%g in (%%f/*.el) do \ | ||
| 321 | $(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f batch-byte-compile-if-not-done %%f/%%g | 335 | $(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f batch-byte-compile-if-not-done %%f/%%g |
| 322 | 336 | ||
| 323 | compile-SH: autoloads | 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 | ||
| 340 | |||
| 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 | ||
| 344 | |||
| 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 | ||
| 348 | |||
| 349 | compile0-SH: autoloads | ||
| 324 | # for elc in $(lisp)/*.elc $(lisp)/*/*.elc; do attrib -r $$elc; done | 350 | # for elc in $(lisp)/*.elc $(lisp)/*/*.elc; do attrib -r $$elc; done |
| 325 | for el in $(COMPILE_FIRST); do \ | 351 | for el in $(COMPILE_FIRST); do \ |
| 326 | echo Compiling $$el; \ | 352 | echo Compiling $$el; \ |
| 327 | $(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f batch-byte-compile-if-not-done $$el; \ | 353 | $(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f batch-byte-compile-if-not-done $$el; \ |
| 328 | done | 354 | done |
| 329 | for dir in $(lisp) $(WINS); do \ | 355 | |
| 356 | compile1-SH: autoloads compile0-SH | ||
| 357 | for dir in $(lisp) $(WINS_BASIC1); do \ | ||
| 358 | for el in $$dir/*.el; do \ | ||
| 359 | if test -f $$el; \ | ||
| 360 | then \ | ||
| 361 | echo Compiling $$el; \ | ||
| 362 | $(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f batch-byte-compile-if-not-done $$el; \ | ||
| 363 | fi \ | ||
| 364 | done; \ | ||
| 365 | done | ||
| 366 | |||
| 367 | compile2-SH: autoloads compile0-SH | ||
| 368 | for dir in $(WINS_BASIC2); do \ | ||
| 369 | for el in $$dir/*.el; do \ | ||
| 370 | if test -f $$el; \ | ||
| 371 | then \ | ||
| 372 | echo Compiling $$el; \ | ||
| 373 | $(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f batch-byte-compile-if-not-done $$el; \ | ||
| 374 | fi \ | ||
| 375 | done; \ | ||
| 376 | done | ||
| 377 | |||
| 378 | compile3-SH: autoloads compile0-SH | ||
| 379 | for dir in $(WINS_BASIC3); do \ | ||
| 380 | for el in $$dir/*.el; do \ | ||
| 381 | if test -f $$el; \ | ||
| 382 | then \ | ||
| 383 | echo Compiling $$el; \ | ||
| 384 | $(emacs) -l loaddefs $(BYTE_COMPILE_FLAGS) -f batch-byte-compile-if-not-done $$el; \ | ||
| 385 | fi \ | ||
| 386 | done; \ | ||
| 387 | done | ||
| 388 | |||
| 389 | compile4-SH: autoloads compile0-SH | ||
| 390 | for dir in $(WINS_BASIC4) $(WINS_CEDET) terms obsolete; do \ | ||
| 330 | for el in $$dir/*.el; do \ | 391 | for el in $$dir/*.el; do \ |
| 331 | if test -f $$el; \ | 392 | if test -f $$el; \ |
| 332 | then \ | 393 | then \ |