build system: Fixed CCACHE/DISTCC/SYSROOT space issues
authorJerome St-Louis <jerome@ecere.com>
Mon, 5 Nov 2012 09:37:50 +0000 (04:37 -0500)
committerJerome St-Louis <jerome@ecere.com>
Mon, 5 Nov 2012 09:37:50 +0000 (04:37 -0500)
- The preprocessor must be passed to ecp/ecc with -cpp "$(CPP)"
- The definitions of CC/CPP/CXX must not contain any spaces
- CCACHE_COMPILE/DISTCC_COMPILE must contain their own extra space at the end if set, with $(space), otherwise must be empty string

24 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
include.mk

index d5345db..2469ed4 100755 (executable)
@@ -94,7 +94,7 @@ ECFLAGS += \
 
 
 
-CECFLAGS += -cpp $(CPP)
+CECFLAGS += "-cpp $(CPP)"
 
 ifndef STATIC_LIBRARY_TARGET
 OFLAGS += $(FORCE_32_BIT) \
index e7f5b46..ac27826 100755 (executable)
@@ -94,7 +94,7 @@ ECFLAGS += \
 
 
 
-CECFLAGS += -cpp $(CPP)
+CECFLAGS += "-cpp $(CPP)"
 
 ifndef STATIC_LIBRARY_TARGET
 OFLAGS += $(FORCE_32_BIT) \
index 6e1f749..d64a6c1 100755 (executable)
@@ -94,7 +94,7 @@ ECFLAGS += \
 
 
 
-CECFLAGS += -cpp $(CPP)
+CECFLAGS += "-cpp $(CPP)"
 
 ifndef STATIC_LIBRARY_TARGET
 OFLAGS += $(FORCE_32_BIT) \
index 6db96a4..c1b55f6 100755 (executable)
@@ -133,7 +133,7 @@ ECFLAGS += \
 
 
 
-CECFLAGS += -cpp $(CPP)
+CECFLAGS += "-cpp $(CPP)"
 
 ifndef STATIC_LIBRARY_TARGET
 OFLAGS += $(FORCE_32_BIT) \
index cc1922d..83ac02c 100755 (executable)
@@ -139,13 +139,13 @@ LP := $(if $(WINDOWS_TARGET),$(if $(STATIC_LIBRARY_TARGET),lib,),lib)
 
 # SUPER TOOLS
 ifdef CCACHE
-   CCACHE_COMPILE := ccache
+   CCACHE_COMPILE := ccache$(space)
 ifdef DISTCC
-   DISTCC_COMPILE := distcc
+   DISTCC_COMPILE := distcc$(space)
 endif
 else
 ifdef DISTCC
-   DISTCC_COMPILE := distcc
+   DISTCC_COMPILE := distcc$(space)
 endif
 endif
 
index dcfc7aa..88a2ddb 100755 (executable)
@@ -157,7 +157,7 @@ CFLAGS += \
 
 
 
-CECFLAGS += -cpp $(CPP)
+CECFLAGS += "-cpp $(CPP)"
 
 ifndef STATIC_LIBRARY_TARGET
 OFLAGS +=
index 8ec4838..9a0db72 100755 (executable)
@@ -160,7 +160,7 @@ CFLAGS += \
 
 
 
-CECFLAGS += -cpp $(CPP)
+CECFLAGS += "-cpp $(CPP)"
 
 ifndef STATIC_LIBRARY_TARGET
 OFLAGS +=
index 602e55b..c0e8e42 100755 (executable)
@@ -75,7 +75,7 @@ CFLAGS += \
 
 
 
-CECFLAGS += -cpp $(CPP)
+CECFLAGS += "-cpp $(CPP)"
 
 ifndef STATIC_LIBRARY_TARGET
 OFLAGS +=
index 83dce21..174c20d 100755 (executable)
@@ -92,7 +92,7 @@ CFLAGS += \
 
 
 
-CECFLAGS += -cpp $(CPP)
+CECFLAGS += "-cpp $(CPP)"
 
 ifndef STATIC_LIBRARY_TARGET
 OFLAGS +=
index fe018da..616fb97 100755 (executable)
@@ -66,7 +66,7 @@ CFLAGS += \
 
 
 
-CECFLAGS += -cpp $(CPP)
+CECFLAGS += "-cpp $(CPP)"
 
 ifndef STATIC_LIBRARY_TARGET
 OFLAGS += $(FORCE_32_BIT)
index 81ae7c4..6ef9d6a 100755 (executable)
@@ -84,7 +84,7 @@ CFLAGS += \
 
 
 
-CECFLAGS += -cpp $(CPP)
+CECFLAGS += "-cpp $(CPP)"
 
 ifndef STATIC_LIBRARY_TARGET
 OFLAGS +=
index 5a00d0a..2327b88 100755 (executable)
@@ -103,7 +103,7 @@ ECFLAGS += \
 
 
 
-CECFLAGS += -cpp $(CPP)
+CECFLAGS += "-cpp $(CPP)"
 
 ifndef STATIC_LIBRARY_TARGET
 OFLAGS += $(FORCE_32_BIT) \
index b369783..883f560 100755 (executable)
@@ -95,7 +95,7 @@ ECFLAGS += \
 
 
 
-CECFLAGS += -cpp $(CPP)
+CECFLAGS += "-cpp $(CPP)"
 
 ifndef STATIC_LIBRARY_TARGET
 OFLAGS += $(FORCE_32_BIT) \
index 9ba18a9..541b6a5 100755 (executable)
@@ -176,7 +176,7 @@ endif
 
 
 
-CECFLAGS += -cpp $(CPP)
+CECFLAGS += "-cpp $(CPP)"
 
 ifndef STATIC_LIBRARY_TARGET
 OFLAGS += $(FORCE_32_BIT) \
index 92cc82b..4902a34 100755 (executable)
@@ -507,7 +507,7 @@ endif
 
 
 
-CECFLAGS += -cpp $(CPP)
+CECFLAGS += "-cpp $(CPP)"
 
 ifndef STATIC_LIBRARY_TARGET
 OFLAGS += $(FORCE_32_BIT)
index 0a37df5..5c09cf7 100755 (executable)
@@ -130,7 +130,7 @@ endif
 
 
 
-CECFLAGS += -cpp $(CPP)
+CECFLAGS += "-cpp $(CPP)"
 
 ifndef STATIC_LIBRARY_TARGET
 OFLAGS += $(FORCE_32_BIT)
index 7d3e1fa..45d6345 100755 (executable)
@@ -464,7 +464,7 @@ endif
 
 
 
-CECFLAGS += -cpp $(CPP)
+CECFLAGS += "-cpp $(CPP)"
 
 ifndef STATIC_LIBRARY_TARGET
 OFLAGS += $(FORCE_32_BIT)
index 1b7ccf6..6067fd5 100755 (executable)
@@ -145,7 +145,7 @@ endif
 
 
 
-CECFLAGS += -cpp $(CPP)
+CECFLAGS += "-cpp $(CPP)"
 
 ifndef STATIC_LIBRARY_TARGET
 OFLAGS += $(FORCE_32_BIT) \
index d7964d6..a176bbf 100755 (executable)
@@ -154,7 +154,7 @@ endif
 
 
 
-CECFLAGS += -cpp $(CPP)
+CECFLAGS += "-cpp $(CPP)"
 
 ifndef STATIC_LIBRARY_TARGET
 OFLAGS += $(FORCE_32_BIT) \
index 686d4fb..2bf381a 100755 (executable)
@@ -115,7 +115,7 @@ endif
 
 
 
-CECFLAGS += -cpp $(CPP)
+CECFLAGS += "-cpp $(CPP)"
 
 ifndef STATIC_LIBRARY_TARGET
 OFLAGS += $(FORCE_32_BIT) \
index fd1f3d3..b747421 100755 (executable)
@@ -109,7 +109,7 @@ endif
 
 
 
-CECFLAGS += -cpp $(CPP)
+CECFLAGS += "-cpp $(CPP)"
 
 ifndef STATIC_LIBRARY_TARGET
 OFLAGS += $(FORCE_32_BIT) \
index 6181ce7..c979984 100755 (executable)
@@ -231,7 +231,7 @@ endif
 
 
 
-CECFLAGS += -cpp $(CPP)
+CECFLAGS += "-cpp $(CPP)"
 
 ifndef STATIC_LIBRARY_TARGET
 OFLAGS += $(FORCE_32_BIT) \
index 61b64bc..5f1a165 100755 (executable)
@@ -2047,9 +2047,9 @@ private:
             }
 
             //f.Printf("SHELL := %s\n", "sh"/*compiler.shellCommand*/); // is this really needed?
-            f.Printf("CPP := $(GCC_PREFIX)%s$(_SYSROOT)\n", compiler.cppCommand);
-            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("CPP := $(CCACHE_COMPILE)$(DISTCC_COMPILE)$(GCC_PREFIX)%s$(_SYSROOT)\n", compiler.cppCommand);
+            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("ECS := %s$(if $(CROSS_TARGET), -t $(TARGET_PLATFORM),)\n", compiler.ecsCommand);
@@ -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");
 
index a6791f0..2744141 100644 (file)
@@ -1,6 +1,6 @@
 # TOOLCHAIN
-export CC      = $(CCACHE_COMPILE) $(DISTCC_COMPILE) $(GCC_PREFIX)gcc$(_SYSROOT)
-export CPP     = $(CCACHE_COMPILE) $(DISTCC_COMPILE) $(GCC_PREFIX)cpp$(_SYSROOT)
+export CC      = $(CCACHE_COMPILE)$(DISTCC_COMPILE)$(GCC_PREFIX)gcc$(_SYSROOT)
+export CPP     = $(CCACHE_COMPILE)$(DISTCC_COMPILE)$(GCC_PREFIX)cpp$(_SYSROOT)
 export ECP     = ecp
 export ECC     = ecc
 export ECS     = %s$(if $(CROSS_TARGET), -t $(TARGET_PLATFORM),)