~ chicken-core (chicken-5) 4121a759e68849836e1bc1988beed7d450e798a6


commit 4121a759e68849836e1bc1988beed7d450e798a6
Author:     Mario Domenech Goulart <mario.goulart@gmail.com>
AuthorDate: Thu Feb 20 21:57:05 2014 -0300
Commit:     Peter Bex <peter.bex@xs4all.nl>
CommitDate: Fri Feb 21 20:28:14 2014 +0100

    Quote $(MAKE) invocations
    
    Unquoted $(MAKE) seems to cause problems on Windows (cmd.exe) when the
    path to `make' contains spaces.
    
    Signed-off-by: Peter Bex <peter.bex@xs4all.nl>

diff --git a/GNUmakefile b/GNUmakefile
index bdeb3014..9714a25f 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -36,7 +36,7 @@ endif
 ifndef PLATFORM
 $(info Please select your target platform by running one of the following commands:)
 $(info )
-$(foreach mf, $(wildcard Makefile.*), $(info $(MAKE) PLATFORM=$(mf:Makefile.%=%)))
+$(foreach mf, $(wildcard Makefile.*), $(info "$(MAKE)" PLATFORM=$(mf:Makefile.%=%)))
 $(info )
 $(info For more information, consult the README file.)
 $(error No PLATFORM given.)
@@ -51,10 +51,10 @@ STANDARD_TARGETS \
 .PHONY: $(STANDARD_TARGETS) dist boot-chicken
 
 $(STANDARD_TARGETS):
-	$(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) CONFIG=$(CONFIG) $@
+	"$(MAKE)" -f $(SRCDIR)/Makefile.$(PLATFORM) CONFIG=$(CONFIG) $@
 
 dist:
-	$(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) CONFIG=$(CONFIG) dist
+	"$(MAKE)" -f $(SRCDIR)/Makefile.$(PLATFORM) CONFIG=$(CONFIG) dist
 
 boot-chicken:
-	$(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) boot-chicken
+	"$(MAKE)" -f $(SRCDIR)/Makefile.$(PLATFORM) boot-chicken
diff --git a/rules.make b/rules.make
index 48e41d9a..cf8da064 100644
--- a/rules.make
+++ b/rules.make
@@ -350,7 +350,7 @@ install-bin:
 	$(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) $(IMPORT_LIBRARIES:%=%.so)
 	$(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) $(IMPORT_LIBRARIES:%=%.import.so)
 	$(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) $(LIBCHICKEN_SO_FILE)
-	$(MAKE) -f $(SRCDIR)Makefile.$(PLATFORM) CONFIG=$(CONFIG) NEEDS_RELINKING=no RUNTIME_LINKER_PATH="$(LIBDIR)" install-bin
+	"$(MAKE)" -f $(SRCDIR)Makefile.$(PLATFORM) CONFIG=$(CONFIG) NEEDS_RELINKING=no RUNTIME_LINKER_PATH="$(LIBDIR)" install-bin
 # Damn. What was this for, again?
 #
 # 	$(MAKE_WRITABLE_COMMAND) $(CHICKEN_PROGRAM)$(EXE) $(CSI_PROGRAM)$(EXE) $(CSC_PROGRAM)$(EXE) $(CHICKEN_PROFILE_PROGRAM)$(EXE)
@@ -673,11 +673,11 @@ bench: $(CHICKEN_SHARED_EXECUTABLE) $(CSI_SHARED_EXECUTABLE) $(CSC_PROGRAM)$(EXE
 .PHONY: boot-chicken
 
 boot-chicken:
-	$(MAKE) -f Makefile.$(PLATFORM) PLATFORM=$(PLATFORM) PREFIX=/nowhere CONFIG= \
+	"$(MAKE)" -f Makefile.$(PLATFORM) PLATFORM=$(PLATFORM) PREFIX=/nowhere CONFIG= \
 	  CHICKEN=$(CHICKEN) PROGRAM_SUFFIX=-boot-stage1 STATICBUILD=1 \
 	  C_COMPILER_OPTIMIZATION_OPTIONS="$(C_COMPILER_OPTIMIZATION_OPTIONS)" C_HACKED_APPLY= BUILDING_CHICKEN_BOOT=1 \
 	  confclean chicken-boot-stage1$(EXE)
-	$(MAKE) -f Makefile.$(PLATFORM) PLATFORM=$(PLATFORM) PREFIX=/nowhere CONFIG= \
+	"$(MAKE)" -f Makefile.$(PLATFORM) PLATFORM=$(PLATFORM) PREFIX=/nowhere CONFIG= \
 	  CHICKEN=.$(SEP)chicken-boot-stage1$(EXE) PROGRAM_SUFFIX=-boot \
 	  STATICBUILD=1 C_COMPILER_OPTIMIZATION_OPTIONS="$(C_COMPILER_OPTIMIZATION_OPTIONS)" \
 	  touchfiles chicken-boot$(EXE) confclean
Trap