Parallelize compiling compiler subdirectories.
authorTaylor R Campbell <campbell@mumble.net>
Sat, 5 Oct 2013 19:02:13 +0000 (19:02 +0000)
committerTaylor R Campbell <campbell@mumble.net>
Sat, 5 Oct 2013 19:02:13 +0000 (19:02 +0000)
All the compiler.cbfs are the same except for the machine directory,
which is available as a symlink.

src/Makefile.boot.in
src/Makefile.in

index c8487beff1a2d02a2e21bbbdc4b3f340032a4d8f..2ade3779c62dc993fd956ce9d275bc50e4b5f546 100644 (file)
@@ -144,10 +144,45 @@ boot/syntaxer.com: compile-kludgerous-star-parser
 # Compiler (LIAR)
 
 .PHONY: compile-cross-compiler
-compile-cross-compiler: syntax-cross-compiler
-       (echo '(with-working-directory-pathname "compiler"' && \
-        echo '  (lambda () (load "compiler.cbf")))') \
-       | $(HOST_COMPILER)
+compile-cross-compiler: compile-cross-compiler-back
+compile-cross-compiler: compile-cross-compiler-base
+compile-cross-compiler: compile-cross-compiler-fggen
+compile-cross-compiler: compile-cross-compiler-fgopt
+compile-cross-compiler: compile-cross-compiler-machine
+compile-cross-compiler: compile-cross-compiler-rtlbase
+compile-cross-compiler: compile-cross-compiler-rtlgen
+
+.PHONY: compile-cross-compiler-back
+compile-cross-compiler-back: syntax-cross-compiler
+       echo '(compile-directory "compiler/back")' | $(HOST_COMPILER)
+
+.PHONY: compile-cross-compiler-base
+compile-cross-compiler-base: syntax-cross-compiler
+       echo '(compile-directory "compiler/base")' | $(HOST_COMPILER)
+
+.PHONY: compile-cross-compiler-fggen
+compile-cross-compiler-fggen: syntax-cross-compiler
+       echo '(compile-directory "compiler/fggen")' | $(HOST_COMPILER)
+
+.PHONY: compile-cross-compiler-fgopt
+compile-cross-compiler-fgopt: syntax-cross-compiler
+       echo '(compile-directory "compiler/fgopt")' | $(HOST_COMPILER)
+
+.PHONY: compile-cross-compiler-machine
+compile-cross-compiler-machine: syntax-cross-compiler
+       echo '(compile-directory "compiler/machine")' | $(HOST_COMPILER)
+
+.PHONY: compile-cross-compiler-rtlbase
+compile-cross-compiler-rtlbase: syntax-cross-compiler
+       echo '(compile-directory "compiler/rtlbase")' | $(HOST_COMPILER)
+
+.PHONY: compile-cross-compiler-rtlgen
+compile-cross-compiler-rtlgen: syntax-cross-compiler
+       echo '(compile-directory "compiler/rtlgen")' | $(HOST_COMPILER)
+
+.PHONY: compile-cross-compiler-rtlopt
+compile-cross-compiler-rtlopt: syntax-cross-compiler
+       echo '(compile-directory "compiler/rtlopt")' | $(HOST_COMPILER)
 
 # Must use HOST_SYNTAXER here because compiler.sf's (and, more
 # generally, CREF's) host/target distinction is bollocksed up, and will
index 2c02988f8b47d2aff8cd6355b82034eae69d52d4..ca0cf551e99faf00192c2ec058624262b81e6a3f 100644 (file)
@@ -172,12 +172,58 @@ restore:
 
 # Compiler (LIAR)
 
+# The subdirectories can be compiled independently and in parallel, but
+# syntaxing the compiler is too hairy right now to do without the
+# compiler.sf script(s).
+
 .PHONY: compile-compiler
-compile-compiler: bootstrap-toolchain
-compile-compiler: syntax-compiler
-       (echo '(with-working-directory-pathname "compiler"' && \
-        echo '  (lambda () (load "compiler.cbf")))') \
-       | $(BOOTSTRAP_COMPILER)
+compile-compiler: compile-compiler-back
+compile-compiler: compile-compiler-base
+compile-compiler: compile-compiler-fggen
+compile-compiler: compile-compiler-fgopt
+compile-compiler: compile-compiler-machine
+compile-compiler: compile-compiler-rtlbase
+compile-compiler: compile-compiler-rtlgen
+
+.PHONY: compile-compiler-back
+compile-compiler-back: bootstrap-toolchain
+compile-compiler-back: syntax-compiler
+       echo '(compile-directory "compiler/back")' | $(BOOTSTRAP_COMPILER)
+
+.PHONY: compile-compiler-base
+compile-compiler-base: bootstrap-toolchain
+compile-compiler-base: syntax-compiler
+       echo '(compile-directory "compiler/base")' | $(BOOTSTRAP_COMPILER)
+
+.PHONY: compile-compiler-fggen
+compile-compiler-fggen: bootstrap-toolchain
+compile-compiler-fggen: syntax-compiler
+       echo '(compile-directory "compiler/fggen")' | $(BOOTSTRAP_COMPILER)
+
+.PHONY: compile-compiler-fgopt
+compile-compiler-fgopt: bootstrap-toolchain
+compile-compiler-fgopt: syntax-compiler
+       echo '(compile-directory "compiler/fgopt")' | $(BOOTSTRAP_COMPILER)
+
+.PHONY: compile-compiler-machine
+compile-compiler-machine: bootstrap-toolchain
+compile-compiler-machine: syntax-compiler
+       echo '(compile-directory "compiler/machine")' | $(BOOTSTRAP_COMPILER)
+
+.PHONY: compile-compiler-rtlbase
+compile-compiler-rtlbase: bootstrap-toolchain
+compile-compiler-rtlbase: syntax-compiler
+       echo '(compile-directory "compiler/rtlbase")' | $(BOOTSTRAP_COMPILER)
+
+.PHONY: compile-compiler-rtlgen
+compile-compiler-rtlgen: bootstrap-toolchain
+compile-compiler-rtlgen: syntax-compiler
+       echo '(compile-directory "compiler/rtlgen")' | $(BOOTSTRAP_COMPILER)
+
+.PHONY: compile-compiler-rtlopt
+compile-compiler-rtlopt: bootstrap-toolchain
+compile-compiler-rtlopt: syntax-compiler
+       echo '(compile-directory "compiler/rtlopt")' | $(BOOTSTRAP_COMPILER)
 
 .PHONY: syntax-compiler
 syntax-compiler: bootstrap-toolchain