Add option for interpreted toolchain to facilitate debugging.
authorTaylor R Campbell <campbell@mumble.net>
Thu, 3 Nov 2016 20:17:32 +0000 (20:17 +0000)
committerTaylor R Campbell <campbell@mumble.net>
Thu, 3 Nov 2016 20:17:32 +0000 (20:17 +0000)
src/Makefile.tools.in
src/configure.ac

index fce74d2dbaa61058c1f36481c90588e6272b7208..d8d167dafd57576c98bf7527e8180c8244514b04 100644 (file)
@@ -119,10 +119,10 @@ restore:
        (cd tools/saved-objects && pax -rw -pe -v . ../../.)
 
 tools/compiler.com: tools/syntaxer.com
-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: cross-compiler
+tools/compiler.com: cross-cref
+tools/compiler.com: cross-sf
+tools/compiler.com: kludgerous-star-parser
        (echo '(begin' && \
         echo '  (with-working-directory-pathname "cref"' && \
         echo '    (lambda () (load "make")))' && \
@@ -135,9 +135,9 @@ tools/compiler.com: compile-kludgerous-star-parser
         echo '  (disk-save "$@"))') \
        | $(HOST_RUNTIME)
 
-tools/syntaxer.com: compile-cross-cref
-tools/syntaxer.com: compile-cross-sf
-tools/syntaxer.com: compile-kludgerous-star-parser
+tools/syntaxer.com: cross-cref
+tools/syntaxer.com: cross-sf
+tools/syntaxer.com: kludgerous-star-parser
        (echo '(begin' && \
         echo '  (with-working-directory-pathname "cref"' && \
         echo '    (lambda () (load "make")))' && \
@@ -150,6 +150,10 @@ tools/syntaxer.com: compile-kludgerous-star-parser
 
 # Compiler (LIAR)
 
+.PHONY: cross-compiler
+@IF_DEBUG_TOOLCHAIN@cross-compiler: syntax-cross-compiler
+@IF_NOT_DEBUG_TOOLCHAIN@cross-compiler: compile-cross-compiler
+
 .PHONY: compile-cross-compiler
 compile-cross-compiler: compile-cross-compiler-back
 compile-cross-compiler: compile-cross-compiler-base
@@ -218,6 +222,10 @@ cref-cross-compiler: cref-kludgerous-runtime
 
 # CREF
 
+.PHONY: cross-cref
+@IF_DEBUG_TOOLCHAIN@cross-cref: syntax-cross-cref
+@IF_NOT_DEBUG_TOOLCHAIN@cross-cref: compile-cross-cref
+
 .PHONY: compile-cross-cref
 compile-cross-cref: syntax-cross-cref
        (echo '(with-working-directory-pathname "cref"' && \
@@ -239,6 +247,10 @@ cref-cross-cref: cref-kludgerous-runtime
 
 # SF
 
+.PHONY: cross-sf
+@IF_DEBUG_TOOLCHAIN@cross-sf: syntax-cross-sf
+@IF_NOT_DEBUG_TOOLCHAIN@cross-sf: compile-cross-sf
+
 .PHONY: compile-cross-sf
 compile-cross-sf: syntax-cross-sf
        (echo '(with-working-directory-pathname "sf"' && \
@@ -263,6 +275,8 @@ cref-cross-sf: cref-kludgerous-runtime
 # XXX This is a kludge that should be abolished.  The compiler should
 # be able to load and run macros for the target even if we are cross-
 # compiling, but currently that's not doable.
+.PHONY: kludgerous-star-parser
+kludgerous-star-parser: compile-kludgerous-star-parser
 .PHONY: compile-kludgerous-star-parser
 compile-kludgerous-star-parser: cref-kludgerous-runtime
        (echo '(with-working-directory-pathname "star-parser"' && \
index e15b195d7acbb014bb121dfe78de607f508b246a..2072a6fb228d71cd3ac7b7e6fb7a57a1cd2ac31c 100644 (file)
@@ -64,6 +64,18 @@ else
     IF_CROSS=\#
 fi
 
+AC_ARG_ENABLE([debug-toolchain],
+    AS_HELP_STRING([--enable-debug-toolchain],
+       [Use slow interpreted cross-compiler toolchain]))
+: ${enable_debug_toolchain=no}
+if test "x$enable_debug_toolchain" = xyes; then
+    IF_DEBUG_TOOLCHAIN=
+    IF_NOT_DEBUG_TOOLCHAIN=\#
+else
+    IF_DEBUG_TOOLCHAIN=\#
+    IF_NOT_DEBUG_TOOLCHAIN=
+fi
+
 AC_ARG_WITH([default-target],
     AS_HELP_STRING([--with-default-target],
        [Set the default make target [[all]]]))
@@ -173,7 +185,9 @@ AC_SUBST([MIT_SCHEME_EXE])
 AC_SUBST([AUXDIR_NAME])
 AC_SUBST([AUXDIR])
 AC_SUBST([IF_CROSS])
+AC_SUBST([IF_DEBUG_TOOLCHAIN])
 AC_SUBST([IF_LIARC])
+AC_SUBST([IF_NOT_DEBUG_TOOLCHAIN])
 AC_SUBST([IF_SVM])
 
 AC_PROG_INSTALL