Allow user to use external toolchain with TOOLCHAIN make variable.
authorTaylor R Campbell <campbell@mumble.net>
Mon, 2 Jan 2017 15:41:20 +0000 (15:41 +0000)
committerTaylor R Campbell <campbell@mumble.net>
Mon, 2 Jan 2017 15:41:20 +0000 (15:41 +0000)
src/Makefile.in

index 9a5a41dcf622fcb9c92a0d44ded9e7a726e1bb37..9efb88bc9e9bb691c0d3b9ec578ae1cac8e042d1 100644 (file)
@@ -103,16 +103,19 @@ TOOL_COMPILER_SETTINGS = \
        $(COMPILER_SETTINGS_CROSS) \
        $(COMPILER_SETTINGS_LIARC)
 
+# User can override this to use another toolchain.
+TOOLCHAIN = ./tools
+
 HOST_SCHEME = '$(MIT_SCHEME_EXE)' --batch-mode
 TOOL_COMPILER = $(TOOL_TOOLCHAIN)
-TOOL_SYNTAXER = $(HOST_SCHEME) --band ./tools/syntaxer.com
-TOOL_TOOLCHAIN = $(HOST_SCHEME) --band ./tools/compiler.com \
+TOOL_SYNTAXER = $(HOST_SCHEME) --band $(TOOLCHAIN)/syntaxer.com
+TOOL_TOOLCHAIN = $(HOST_SCHEME) --band $(TOOLCHAIN)/compiler.com \
   --eval '(begin $(TOOL_COMPILER_SETTINGS))'
 
 .PHONY: toolchain
-toolchain: tools/compiler.com
+toolchain: $(TOOLCHAIN)/compiler.com
 
-tools/compiler.com:
+./tools/compiler.com:
        $(MAKE) -f Makefile.tools clean && $(MAKE) -f Makefile.tools allclean
 
 # This target toolchain crud is a kludge until the whole system can be