From ad3ffd12272b485f821602ac676ff3fb3bb05bd5 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Mon, 4 Jul 2005 11:14:31 +0000 Subject: [PATCH] BuildPlatformMain now uses the original DEFINES. Otherwise we e.g. get __HAIKU__ although compiling under R5. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13420 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- Jamrules | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Jamrules b/Jamrules index db5ed2512a..05f6adae7a 100644 --- a/Jamrules +++ b/Jamrules @@ -27,6 +27,8 @@ if ! $(INVOCATION_SUBDIR_SET) { } # vanilla Jam compatibility +BUILD_PLATFORM_DEFINES = $(DEFINES) ; + # The directory for build system specific files OBOS_BUILD_DIR = [ FDirName $(OBOS_TOP) build ] ; @@ -2031,11 +2033,14 @@ rule BuildPlatformMain SetupDefaultIncludes ; } - # Remove `-nostdinc' from CCFLAGS and C++FLAGS. + # Remove `-nostdinc' from CCFLAGS and C++FLAGS. Set DEFINES back to what + # was originally defined for the build platform. local oldCCFLAGS = $(CCFLAGS) ; local oldC++FLAGS = $(C++FLAGS) ; + local oldDefines = $(DEFINES) ; CCFLAGS = [ Filter $(CCFLAGS) : -nostdinc ] ; C++FLAGS = [ Filter $(C++FLAGS) : -nostdinc ] ; + DEFINES = $(BUILD_PLATFORM_DEFINES) ; Main $(1) : $(2) ; @@ -2045,6 +2050,7 @@ rule BuildPlatformMain # Reset CCFLAGS and C++FLAGS to original values. CCFLAGS = $(oldCCFLAGS) ; C++FLAGS = $(oldC++FLAGS) ; + DEFINES = $(oldDefines) ; } rule BuildPlatformTest