[Libreoffice-commits] core.git: Branch 'aoo/trunk' - solenv/gbuild

Don Lewis truckman at apache.org
Sun Aug 28 06:08:24 UTC 2016


 solenv/gbuild/LinkTarget.mk        |    3 ---
 solenv/gbuild/platform/os2.mk      |    4 +++-
 solenv/gbuild/platform/windows.mk  |    4 +++-
 solenv/gbuild/platform/winmingw.mk |    2 ++
 4 files changed, 8 insertions(+), 5 deletions(-)

New commits:
commit 9491ff38f520bda897c8425eb642bace41702682
Author: Don Lewis <truckman at apache.org>
Date:   Sun Aug 28 05:41:36 2016 +0000

    Follow up to r1758061.  Only pass -DPRECOMPILED_HEADERS to the compiler
    
    when the precompiled header is actually going to be used.

diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index b875846..0bc6d59 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -717,14 +717,11 @@ $(call gb_LinkTarget_get_target,$(1)) : PCH_NAME := $(3)
 $(call gb_LinkTarget_get_target,$(1)) : PCHOBJS = $(call gb_PrecompiledHeader_get_target,$(3)).obj $(call gb_NoexPrecompiledHeader_get_target,$(3)).obj
 
 $(call gb_LinkTarget_get_headers_target,$(1)) \
-$(call gb_LinkTarget_get_target,$(1)) : DEFS := $$(DEFS) -DPRECOMPILED_HEADERS
-$(call gb_LinkTarget_get_headers_target,$(1)) \
 $(call gb_LinkTarget_get_target,$(1)) : PCH_DEFS = $$(DEFS)
 ifeq ($(gb_FULLDEPS),$(true))
 -include \
 	$(call gb_PrecompiledHeader_get_dep_target,$(3)) \
 	$(call gb_NoexPrecompiledHeader_get_dep_target,$(3))
-$(call gb_LinkTarget_get_dep_target,$(1)) : DEFS := $$(DEFS) -DPRECOMPILED_HEADERS
 $(call gb_LinkTarget_get_dep_target,$(1)) : PCH_NAME := $(3)
 $(call gb_LinkTarget_get_dep_target,$(1)) : PCH_DEFS = $$(DEFS)
 endif
diff --git a/solenv/gbuild/platform/os2.mk b/solenv/gbuild/platform/os2.mk
index b3bfffb..f5df15a 100644
--- a/solenv/gbuild/platform/os2.mk
+++ b/solenv/gbuild/platform/os2.mk
@@ -201,7 +201,7 @@ endef
 
 # PrecompiledHeader class
 
-gb_PrecompiledHeader_get_enableflags = -Yu$(1).hxx \
+gb_PrecompiledHeader_get_enableflags = -DPRECOMPILED_HEADERS -Yu$(1).hxx \
 									   -Fp$(call gb_PrecompiledHeader_get_target,$(1))
 
 ifeq ($(gb_FULLDEPS),$(true))
@@ -236,6 +236,7 @@ $(call gb_Helper_abbreviate_dirs_native,\
 		-I$(dir $(3)) \
 		$(6) \
 		-c $(3) \
+		-DPRECOMPILED_HEADERS \
 		-Yc$(notdir $(patsubst %.cxx,%.hxx,$(3))) -Fp$(1) -Fo$(1).obj)
 $(call gb_PrecompiledHeader__command_deponcompile,$(1),$(2),$(3),$(4),$(5),$(6))
 endef
@@ -277,6 +278,7 @@ $(call gb_Helper_abbreviate_dirs_native,\
 		-I$(dir $(3)) \
 		$(6) \
 		-c $(3) \
+		-DPRECOMPILED_HEADERS \
 		-Yc$(notdir $(patsubst %.cxx,%.hxx,$(3))) -Fp$(1) -Fo$(1).obj)
 $(call gb_NoexPrecompiledHeader__command_deponcompile,$(1),$(2),$(3),$(4),$(5),$(6))
 endef
diff --git a/solenv/gbuild/platform/windows.mk b/solenv/gbuild/platform/windows.mk
index 5bca80d..447ccab 100644
--- a/solenv/gbuild/platform/windows.mk
+++ b/solenv/gbuild/platform/windows.mk
@@ -309,7 +309,7 @@ endef
 
 # PrecompiledHeader class
 
-gb_PrecompiledHeader_get_enableflags = -Yu$(1).hxx \
+gb_PrecompiledHeader_get_enableflags = -DPRECOMPILED_HEADERS -Yu$(1).hxx \
 									   -Fp$(call gb_PrecompiledHeader_get_target,$(1))
 
 ifeq ($(gb_FULLDEPS),$(true))
@@ -344,6 +344,7 @@ $(call gb_Helper_abbreviate_dirs_native,\
 		-I$(dir $(3)) \
 		$(6) \
 		-c $(3) \
+		-DPRECOMPILED_HEADERS \
 		-Yc$(notdir $(patsubst %.cxx,%.hxx,$(3))) -Fp$(1) -Fo$(1).obj)
 $(call gb_PrecompiledHeader__command_deponcompile,$(1),$(2),$(3),$(4),$(5),$(6))
 endef
@@ -385,6 +386,7 @@ $(call gb_Helper_abbreviate_dirs_native,\
 		-I$(dir $(3)) \
 		$(6) \
 		-c $(3) \
+		-DPRECOMPILED_HEADERS \
 		-Yc$(notdir $(patsubst %.cxx,%.hxx,$(3))) -Fp$(1) -Fo$(1).obj)
 $(call gb_NoexPrecompiledHeader__command_deponcompile,$(1),$(2),$(3),$(4),$(5),$(6))
 endef
diff --git a/solenv/gbuild/platform/winmingw.mk b/solenv/gbuild/platform/winmingw.mk
index 0ae71ad..f921c7a 100644
--- a/solenv/gbuild/platform/winmingw.mk
+++ b/solenv/gbuild/platform/winmingw.mk
@@ -312,6 +312,7 @@ $(call gb_Helper_abbreviate_dirs_native,\
 		-x c++-header \
 		$(4) $(5) \
 		-I$(dir $(3)) \
+		-DPRECOMPILED_HEADERS \
 		$(6) \
 		-c $(3) \
 		-o$(1))
@@ -355,6 +356,7 @@ $(call gb_Helper_abbreviate_dirs_native,\
 		-x c++-header \
 		$(4) $(5) \
 		-I$(dir $(3)) \
+		-DPRECOMPILED_HEADERS \
 		$(6) \
 		-c $(3) \
 		-o$(1))


More information about the Libreoffice-commits mailing list