From a98fa6284ac71d465cc8418defdcedcc44fdbf45 Mon Sep 17 00:00:00 2001 From: Jerome St-Louis Date: Mon, 5 Nov 2012 06:14:32 -0500 Subject: [PATCH] sdk/Build System: Solved the $(CPP) space issues - Defined _CPP in crossplatform.mk which adds quotes only if CPP contains a space --- compiler/ecc/Makefile | 2 +- compiler/ecp/Makefile | 2 +- compiler/ecs/Makefile | 2 +- compiler/libec/Makefile | 2 +- crossplatform.mk | 2 ++ deps/freetype-2.3.12/Makefile | 2 +- deps/jpeg-6b/Makefile | 2 +- deps/libffi-3.0.11/Makefile | 2 +- deps/libpng-1.4.0/Makefile | 2 +- deps/libungif-4.1.1/Makefile | 2 +- deps/zlib/Makefile | 2 +- documentor/Makefile | 2 +- ear/cmd/Makefile | 2 +- ear/extract/Makefile | 2 +- ecere/Makefile | 2 +- ecere/Makefile.ecereCOM | 2 +- ecere/Makefile.vanilla | 2 +- eda/drivers/sqlite/Makefile | 2 +- eda/drivers/sqliteCipher/Makefile | 2 +- eda/libeda/Makefile | 2 +- epj2make/Makefile | 2 +- ide/Makefile | 2 +- ide/src/project/Project.ec | 4 ++-- 23 files changed, 25 insertions(+), 23 deletions(-) diff --git a/compiler/ecc/Makefile b/compiler/ecc/Makefile index 2469ed4..46d3ae6 100755 --- a/compiler/ecc/Makefile +++ b/compiler/ecc/Makefile @@ -94,7 +94,7 @@ ECFLAGS += \ -CECFLAGS += "-cpp $(CPP)" +CECFLAGS += -cpp $(_CPP) ifndef STATIC_LIBRARY_TARGET OFLAGS += $(FORCE_32_BIT) \ diff --git a/compiler/ecp/Makefile b/compiler/ecp/Makefile index ac27826..520c272 100755 --- a/compiler/ecp/Makefile +++ b/compiler/ecp/Makefile @@ -94,7 +94,7 @@ ECFLAGS += \ -CECFLAGS += "-cpp $(CPP)" +CECFLAGS += -cpp $(_CPP) ifndef STATIC_LIBRARY_TARGET OFLAGS += $(FORCE_32_BIT) \ diff --git a/compiler/ecs/Makefile b/compiler/ecs/Makefile index d64a6c1..cef40ea 100755 --- a/compiler/ecs/Makefile +++ b/compiler/ecs/Makefile @@ -94,7 +94,7 @@ ECFLAGS += \ -CECFLAGS += "-cpp $(CPP)" +CECFLAGS += -cpp $(_CPP) ifndef STATIC_LIBRARY_TARGET OFLAGS += $(FORCE_32_BIT) \ diff --git a/compiler/libec/Makefile b/compiler/libec/Makefile index c1b55f6..b1b4c26 100755 --- a/compiler/libec/Makefile +++ b/compiler/libec/Makefile @@ -133,7 +133,7 @@ ECFLAGS += \ -CECFLAGS += "-cpp $(CPP)" +CECFLAGS += -cpp $(_CPP) ifndef STATIC_LIBRARY_TARGET OFLAGS += $(FORCE_32_BIT) \ diff --git a/crossplatform.mk b/crossplatform.mk index 83ac02c..389bbdc 100755 --- a/crossplatform.mk +++ b/crossplatform.mk @@ -149,6 +149,8 @@ ifdef DISTCC endif endif +_CPP = $(if $(findstring $(space),$(CPP)),"$(CPP)",$(CPP)) + # SHELL COMMANDS ifdef WINDOWS_HOST ifndef MSYSCON diff --git a/deps/freetype-2.3.12/Makefile b/deps/freetype-2.3.12/Makefile index 88a2ddb..2316d45 100755 --- a/deps/freetype-2.3.12/Makefile +++ b/deps/freetype-2.3.12/Makefile @@ -157,7 +157,7 @@ CFLAGS += \ -CECFLAGS += "-cpp $(CPP)" +CECFLAGS += -cpp $(_CPP) ifndef STATIC_LIBRARY_TARGET OFLAGS += diff --git a/deps/jpeg-6b/Makefile b/deps/jpeg-6b/Makefile index 9a0db72..b2262e9 100755 --- a/deps/jpeg-6b/Makefile +++ b/deps/jpeg-6b/Makefile @@ -160,7 +160,7 @@ CFLAGS += \ -CECFLAGS += "-cpp $(CPP)" +CECFLAGS += -cpp $(_CPP) ifndef STATIC_LIBRARY_TARGET OFLAGS += diff --git a/deps/libffi-3.0.11/Makefile b/deps/libffi-3.0.11/Makefile index c0e8e42..aa5a142 100755 --- a/deps/libffi-3.0.11/Makefile +++ b/deps/libffi-3.0.11/Makefile @@ -75,7 +75,7 @@ CFLAGS += \ -CECFLAGS += "-cpp $(CPP)" +CECFLAGS += -cpp $(_CPP) ifndef STATIC_LIBRARY_TARGET OFLAGS += diff --git a/deps/libpng-1.4.0/Makefile b/deps/libpng-1.4.0/Makefile index 174c20d..0561318 100755 --- a/deps/libpng-1.4.0/Makefile +++ b/deps/libpng-1.4.0/Makefile @@ -92,7 +92,7 @@ CFLAGS += \ -CECFLAGS += "-cpp $(CPP)" +CECFLAGS += -cpp $(_CPP) ifndef STATIC_LIBRARY_TARGET OFLAGS += diff --git a/deps/libungif-4.1.1/Makefile b/deps/libungif-4.1.1/Makefile index 616fb97..163e716 100755 --- a/deps/libungif-4.1.1/Makefile +++ b/deps/libungif-4.1.1/Makefile @@ -66,7 +66,7 @@ CFLAGS += \ -CECFLAGS += "-cpp $(CPP)" +CECFLAGS += -cpp $(_CPP) ifndef STATIC_LIBRARY_TARGET OFLAGS += $(FORCE_32_BIT) diff --git a/deps/zlib/Makefile b/deps/zlib/Makefile index 6ef9d6a..418c44e 100755 --- a/deps/zlib/Makefile +++ b/deps/zlib/Makefile @@ -84,7 +84,7 @@ CFLAGS += \ -CECFLAGS += "-cpp $(CPP)" +CECFLAGS += -cpp $(_CPP) ifndef STATIC_LIBRARY_TARGET OFLAGS += diff --git a/documentor/Makefile b/documentor/Makefile index 2327b88..38f84d1 100755 --- a/documentor/Makefile +++ b/documentor/Makefile @@ -103,7 +103,7 @@ ECFLAGS += \ -CECFLAGS += "-cpp $(CPP)" +CECFLAGS += -cpp $(_CPP) ifndef STATIC_LIBRARY_TARGET OFLAGS += $(FORCE_32_BIT) \ diff --git a/ear/cmd/Makefile b/ear/cmd/Makefile index 883f560..e8c9085 100755 --- a/ear/cmd/Makefile +++ b/ear/cmd/Makefile @@ -95,7 +95,7 @@ ECFLAGS += \ -CECFLAGS += "-cpp $(CPP)" +CECFLAGS += -cpp $(_CPP) ifndef STATIC_LIBRARY_TARGET OFLAGS += $(FORCE_32_BIT) \ diff --git a/ear/extract/Makefile b/ear/extract/Makefile index 541b6a5..7721884 100755 --- a/ear/extract/Makefile +++ b/ear/extract/Makefile @@ -176,7 +176,7 @@ endif -CECFLAGS += "-cpp $(CPP)" +CECFLAGS += -cpp $(_CPP) ifndef STATIC_LIBRARY_TARGET OFLAGS += $(FORCE_32_BIT) \ diff --git a/ecere/Makefile b/ecere/Makefile index 4902a34..9b04fbc 100755 --- a/ecere/Makefile +++ b/ecere/Makefile @@ -507,7 +507,7 @@ endif -CECFLAGS += "-cpp $(CPP)" +CECFLAGS += -cpp $(_CPP) ifndef STATIC_LIBRARY_TARGET OFLAGS += $(FORCE_32_BIT) diff --git a/ecere/Makefile.ecereCOM b/ecere/Makefile.ecereCOM index 5c09cf7..74c612b 100755 --- a/ecere/Makefile.ecereCOM +++ b/ecere/Makefile.ecereCOM @@ -130,7 +130,7 @@ endif -CECFLAGS += "-cpp $(CPP)" +CECFLAGS += -cpp $(_CPP) ifndef STATIC_LIBRARY_TARGET OFLAGS += $(FORCE_32_BIT) diff --git a/ecere/Makefile.vanilla b/ecere/Makefile.vanilla index 45d6345..e7d6ba5 100755 --- a/ecere/Makefile.vanilla +++ b/ecere/Makefile.vanilla @@ -464,7 +464,7 @@ endif -CECFLAGS += "-cpp $(CPP)" +CECFLAGS += -cpp $(_CPP) ifndef STATIC_LIBRARY_TARGET OFLAGS += $(FORCE_32_BIT) diff --git a/eda/drivers/sqlite/Makefile b/eda/drivers/sqlite/Makefile index 6067fd5..152f23b 100755 --- a/eda/drivers/sqlite/Makefile +++ b/eda/drivers/sqlite/Makefile @@ -145,7 +145,7 @@ endif -CECFLAGS += "-cpp $(CPP)" +CECFLAGS += -cpp $(_CPP) ifndef STATIC_LIBRARY_TARGET OFLAGS += $(FORCE_32_BIT) \ diff --git a/eda/drivers/sqliteCipher/Makefile b/eda/drivers/sqliteCipher/Makefile index a176bbf..8b86aa9 100755 --- a/eda/drivers/sqliteCipher/Makefile +++ b/eda/drivers/sqliteCipher/Makefile @@ -154,7 +154,7 @@ endif -CECFLAGS += "-cpp $(CPP)" +CECFLAGS += -cpp $(_CPP) ifndef STATIC_LIBRARY_TARGET OFLAGS += $(FORCE_32_BIT) \ diff --git a/eda/libeda/Makefile b/eda/libeda/Makefile index 2bf381a..56ebe3c 100755 --- a/eda/libeda/Makefile +++ b/eda/libeda/Makefile @@ -115,7 +115,7 @@ endif -CECFLAGS += "-cpp $(CPP)" +CECFLAGS += -cpp $(_CPP) ifndef STATIC_LIBRARY_TARGET OFLAGS += $(FORCE_32_BIT) \ diff --git a/epj2make/Makefile b/epj2make/Makefile index b747421..ba8399d 100755 --- a/epj2make/Makefile +++ b/epj2make/Makefile @@ -109,7 +109,7 @@ endif -CECFLAGS += "-cpp $(CPP)" +CECFLAGS += -cpp $(_CPP) ifndef STATIC_LIBRARY_TARGET OFLAGS += $(FORCE_32_BIT) \ diff --git a/ide/Makefile b/ide/Makefile index c979984..14bf649 100755 --- a/ide/Makefile +++ b/ide/Makefile @@ -231,7 +231,7 @@ endif -CECFLAGS += "-cpp $(CPP)" +CECFLAGS += -cpp $(_CPP) ifndef STATIC_LIBRARY_TARGET OFLAGS += $(FORCE_32_BIT) \ diff --git a/ide/src/project/Project.ec b/ide/src/project/Project.ec index 5f1a165..9011954 100755 --- a/ide/src/project/Project.ec +++ b/ide/src/project/Project.ec @@ -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"); -- 1.8.3.1