sdk/Build System: Solved the $(CPP) space issues
authorJerome St-Louis <jerome@ecere.com>
Mon, 5 Nov 2012 11:14:32 +0000 (06:14 -0500)
committerJerome St-Louis <jerome@ecere.com>
Mon, 5 Nov 2012 11:14:32 +0000 (06:14 -0500)
- Defined _CPP in crossplatform.mk which adds quotes only if CPP contains a space

23 files changed:
compiler/ecc/Makefile
compiler/ecp/Makefile
compiler/ecs/Makefile
compiler/libec/Makefile
crossplatform.mk
deps/freetype-2.3.12/Makefile
deps/jpeg-6b/Makefile
deps/libffi-3.0.11/Makefile
deps/libpng-1.4.0/Makefile
deps/libungif-4.1.1/Makefile
deps/zlib/Makefile
documentor/Makefile
ear/cmd/Makefile
ear/extract/Makefile
ecere/Makefile
ecere/Makefile.ecereCOM
ecere/Makefile.vanilla
eda/drivers/sqlite/Makefile
eda/drivers/sqliteCipher/Makefile
eda/libeda/Makefile
epj2make/Makefile
ide/Makefile
ide/src/project/Project.ec

index 2469ed4..46d3ae6 100755 (executable)
@@ -94,7 +94,7 @@ ECFLAGS += \
 
 
 
-CECFLAGS += "-cpp $(CPP)"
+CECFLAGS += -cpp $(_CPP)
 
 ifndef STATIC_LIBRARY_TARGET
 OFLAGS += $(FORCE_32_BIT) \
index ac27826..520c272 100755 (executable)
@@ -94,7 +94,7 @@ ECFLAGS += \
 
 
 
-CECFLAGS += "-cpp $(CPP)"
+CECFLAGS += -cpp $(_CPP)
 
 ifndef STATIC_LIBRARY_TARGET
 OFLAGS += $(FORCE_32_BIT) \
index d64a6c1..cef40ea 100755 (executable)
@@ -94,7 +94,7 @@ ECFLAGS += \
 
 
 
-CECFLAGS += "-cpp $(CPP)"
+CECFLAGS += -cpp $(_CPP)
 
 ifndef STATIC_LIBRARY_TARGET
 OFLAGS += $(FORCE_32_BIT) \
index c1b55f6..b1b4c26 100755 (executable)
@@ -133,7 +133,7 @@ ECFLAGS += \
 
 
 
-CECFLAGS += "-cpp $(CPP)"
+CECFLAGS += -cpp $(_CPP)
 
 ifndef STATIC_LIBRARY_TARGET
 OFLAGS += $(FORCE_32_BIT) \
index 83ac02c..389bbdc 100755 (executable)
@@ -149,6 +149,8 @@ ifdef DISTCC
 endif
 endif
 
+_CPP = $(if $(findstring $(space),$(CPP)),"$(CPP)",$(CPP))
+
 # SHELL COMMANDS
 ifdef WINDOWS_HOST
 ifndef MSYSCON
index 88a2ddb..2316d45 100755 (executable)
@@ -157,7 +157,7 @@ CFLAGS += \
 
 
 
-CECFLAGS += "-cpp $(CPP)"
+CECFLAGS += -cpp $(_CPP)
 
 ifndef STATIC_LIBRARY_TARGET
 OFLAGS +=
index 9a0db72..b2262e9 100755 (executable)
@@ -160,7 +160,7 @@ CFLAGS += \
 
 
 
-CECFLAGS += "-cpp $(CPP)"
+CECFLAGS += -cpp $(_CPP)
 
 ifndef STATIC_LIBRARY_TARGET
 OFLAGS +=
index c0e8e42..aa5a142 100755 (executable)
@@ -75,7 +75,7 @@ CFLAGS += \
 
 
 
-CECFLAGS += "-cpp $(CPP)"
+CECFLAGS += -cpp $(_CPP)
 
 ifndef STATIC_LIBRARY_TARGET
 OFLAGS +=
index 174c20d..0561318 100755 (executable)
@@ -92,7 +92,7 @@ CFLAGS += \
 
 
 
-CECFLAGS += "-cpp $(CPP)"
+CECFLAGS += -cpp $(_CPP)
 
 ifndef STATIC_LIBRARY_TARGET
 OFLAGS +=
index 616fb97..163e716 100755 (executable)
@@ -66,7 +66,7 @@ CFLAGS += \
 
 
 
-CECFLAGS += "-cpp $(CPP)"
+CECFLAGS += -cpp $(_CPP)
 
 ifndef STATIC_LIBRARY_TARGET
 OFLAGS += $(FORCE_32_BIT)
index 6ef9d6a..418c44e 100755 (executable)
@@ -84,7 +84,7 @@ CFLAGS += \
 
 
 
-CECFLAGS += "-cpp $(CPP)"
+CECFLAGS += -cpp $(_CPP)
 
 ifndef STATIC_LIBRARY_TARGET
 OFLAGS +=
index 2327b88..38f84d1 100755 (executable)
@@ -103,7 +103,7 @@ ECFLAGS += \
 
 
 
-CECFLAGS += "-cpp $(CPP)"
+CECFLAGS += -cpp $(_CPP)
 
 ifndef STATIC_LIBRARY_TARGET
 OFLAGS += $(FORCE_32_BIT) \
index 883f560..e8c9085 100755 (executable)
@@ -95,7 +95,7 @@ ECFLAGS += \
 
 
 
-CECFLAGS += "-cpp $(CPP)"
+CECFLAGS += -cpp $(_CPP)
 
 ifndef STATIC_LIBRARY_TARGET
 OFLAGS += $(FORCE_32_BIT) \
index 541b6a5..7721884 100755 (executable)
@@ -176,7 +176,7 @@ endif
 
 
 
-CECFLAGS += "-cpp $(CPP)"
+CECFLAGS += -cpp $(_CPP)
 
 ifndef STATIC_LIBRARY_TARGET
 OFLAGS += $(FORCE_32_BIT) \
index 4902a34..9b04fbc 100755 (executable)
@@ -507,7 +507,7 @@ endif
 
 
 
-CECFLAGS += "-cpp $(CPP)"
+CECFLAGS += -cpp $(_CPP)
 
 ifndef STATIC_LIBRARY_TARGET
 OFLAGS += $(FORCE_32_BIT)
index 5c09cf7..74c612b 100755 (executable)
@@ -130,7 +130,7 @@ endif
 
 
 
-CECFLAGS += "-cpp $(CPP)"
+CECFLAGS += -cpp $(_CPP)
 
 ifndef STATIC_LIBRARY_TARGET
 OFLAGS += $(FORCE_32_BIT)
index 45d6345..e7d6ba5 100755 (executable)
@@ -464,7 +464,7 @@ endif
 
 
 
-CECFLAGS += "-cpp $(CPP)"
+CECFLAGS += -cpp $(_CPP)
 
 ifndef STATIC_LIBRARY_TARGET
 OFLAGS += $(FORCE_32_BIT)
index 6067fd5..152f23b 100755 (executable)
@@ -145,7 +145,7 @@ endif
 
 
 
-CECFLAGS += "-cpp $(CPP)"
+CECFLAGS += -cpp $(_CPP)
 
 ifndef STATIC_LIBRARY_TARGET
 OFLAGS += $(FORCE_32_BIT) \
index a176bbf..8b86aa9 100755 (executable)
@@ -154,7 +154,7 @@ endif
 
 
 
-CECFLAGS += "-cpp $(CPP)"
+CECFLAGS += -cpp $(_CPP)
 
 ifndef STATIC_LIBRARY_TARGET
 OFLAGS += $(FORCE_32_BIT) \
index 2bf381a..56ebe3c 100755 (executable)
@@ -115,7 +115,7 @@ endif
 
 
 
-CECFLAGS += "-cpp $(CPP)"
+CECFLAGS += -cpp $(_CPP)
 
 ifndef STATIC_LIBRARY_TARGET
 OFLAGS += $(FORCE_32_BIT) \
index b747421..ba8399d 100755 (executable)
@@ -109,7 +109,7 @@ endif
 
 
 
-CECFLAGS += "-cpp $(CPP)"
+CECFLAGS += -cpp $(_CPP)
 
 ifndef STATIC_LIBRARY_TARGET
 OFLAGS += $(FORCE_32_BIT) \
index c979984..14bf649 100755 (executable)
@@ -231,7 +231,7 @@ endif
 
 
 
-CECFLAGS += "-cpp $(CPP)"
+CECFLAGS += -cpp $(_CPP)
 
 ifndef STATIC_LIBRARY_TARGET
 OFLAGS += $(FORCE_32_BIT) \
index 5f1a165..9011954 100755 (executable)
@@ -2051,7 +2051,7 @@ private:
             f.Printf("CC := $(CCACHE_COMPILE)$(DISTCC_COMPILE)$(GCC_PREFIX)%s$(_SYSROOT)\n", compiler.ccCommand);
             f.Printf("CXX := $(CCACHE_COMPILE)$(DISTCC_COMPILE)$(GCC_PREFIX)%s$(_SYSROOT)\n", compiler.cxxCommand);
             f.Printf("ECP := %s\n", compiler.ecpCommand);
-            f.Printf("ECC := %s\n", compiler.eccCommand);
+            f.Printf("ECC := %s$(if $(CROSS_TARGET), -t $(TARGET_PLATFORM),)\n", compiler.eccCommand);
             f.Printf("ECS := %s$(if $(CROSS_TARGET), -t $(TARGET_PLATFORM),)\n", compiler.ecsCommand);
             f.Printf("EAR := %s\n", compiler.earCommand);
 
@@ -2521,7 +2521,7 @@ private:
          f.Puts("\n");
          f.Puts("\n");
 
-         f.Puts("CECFLAGS += -cpp \"$(CPP)\"");
+         f.Puts("CECFLAGS += -cpp $(_CPP)");
          f.Puts("\n");
          f.Puts("\n");