Temporary kludge: bake a fresh runtime into the toolchain.
authorTaylor R Campbell <campbell@mumble.net>
Sat, 22 Feb 2014 22:31:17 +0000 (22:31 +0000)
committerTaylor R Campbell <campbell@mumble.net>
Sat, 22 Feb 2014 22:31:18 +0000 (22:31 +0000)
This is practically necessary for now because of the SEQUENCE-2 mess.
It may continue to be necessary in the future until we have proper
cross-compilation tools that can handle macros and fasdump format
changes sanely.

src/Makefile.tools.in

index 2953cebf19369f9510062cde4696e2413e67d8f2..31bf9076dedf99cdeb07e123403401355eb10813 100644 (file)
@@ -70,6 +70,10 @@ HOST_SYNTAXER = '$(MIT_SCHEME_EXE)' --batch-mode --band runtime.com \
 HOST_TOOLCHAIN = '$(MIT_SCHEME_EXE)' --batch-mode \
        --eval '(load-option (quote CREF))'
 
+# XXX Temporary kludge until we get 9.2 out.  Replace by HOST_RUNTIME.
+KLUDGEROUS_RUNTIME = ((echo '(cd "..")' && cat) | (cd runtime && \
+       '$(MIT_SCHEME_EXE)' --batch-mode --fasl make.com --library "../lib"))
+
 SUBDIRS = compiler cref runtime sf star-parser
 
 .PHONY: all
@@ -123,6 +127,7 @@ tools/compiler.com: compile-cross-compiler
 tools/compiler.com: compile-cross-cref
 tools/compiler.com: compile-cross-sf
 tools/compiler.com: compile-kludgerous-star-parser
+tools/compiler.com: compile-kludgerous-runtime
        (echo '(begin' && \
         echo '  (with-working-directory-pathname "cref"' && \
         echo '    (lambda () (load "make")))' && \
@@ -133,11 +138,12 @@ tools/compiler.com: compile-kludgerous-star-parser
         echo '  (with-working-directory-pathname "compiler"' && \
         echo '    (lambda () (load "make")))' && \
         echo '  (disk-save "$@"))') \
-       | $(HOST_RUNTIME)
+       | $(KLUDGEROUS_RUNTIME)
 
 tools/syntaxer.com: compile-cross-cref
 tools/syntaxer.com: compile-cross-sf
 tools/syntaxer.com: compile-kludgerous-star-parser
+tools/syntaxer.com: compile-kludgerous-runtime
        (echo '(begin' && \
         echo '  (with-working-directory-pathname "cref"' && \
         echo '    (lambda () (load "make")))' && \
@@ -146,7 +152,7 @@ tools/syntaxer.com: compile-kludgerous-star-parser
         echo '  (with-working-directory-pathname "star-parser"' && \
         echo '    (lambda () (load "load")))' && \
         echo '  (disk-save "$@"))') \
-       | $(HOST_RUNTIME)
+       | $(KLUDGEROUS_RUNTIME)
 
 # Compiler (LIAR)
 
@@ -281,3 +287,18 @@ cref-kludgerous-runtime:
         echo '  (lambda ()' && \
         echo '    (cref/generate-trivial-constructor "runtime")))') \
        | $(HOST_TOOLCHAIN)
+
+# XXX Temporary kludge until we get 9.2 out.  Get rid of
+# compile-kludgerous-runtime and syntax-kludgerous-runtime when that
+# happens.
+.PHONY: compile-kludgerous-runtime
+compile-kludgerous-runtime: syntax-kludgerous-runtime
+       (echo '(with-working-directory-pathname "runtime"' && \
+        echo '  (lambda () (load "runtime.cbf")))') \
+       | $(HOST_TOOLCHAIN)
+
+.PHONY: syntax-kludgerous-runtime
+syntax-kludgerous-runtime: cref-kludgerous-runtime
+       (echo '(with-working-directory-pathname "runtime"' && \
+        echo '  (lambda () (load "runtime.sf")))') \
+       | $(HOST_TOOLCHAIN)