summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2012-07-04 16:19:39 +0200
committerLuboš Luňák <l.lunak@suse.cz>2012-12-10 14:46:47 +0100
commitcd4d3d7f4eb90da1843ffd011e7d58f4231d4cd9 (patch)
tree0fa609b16719445dff11e26f40a21b6821f90ee7 /solenv
parent1143d490cfb4fce99e14376f8e1adea2dd361e44 (diff)
rebuild all dependent .cxx files that use a PCH that gets regenerated
This is the best I could come up with, create a timestamp file for every link target and make it depend on the precompiled_xxx.hxx file for those using PCH. Change-Id: I68a53a1315ba172543b0d8de4122c2856b37d72b
Diffstat (limited to 'solenv')
-rw-r--r--solenv/gbuild/LinkTarget.mk6
-rw-r--r--solenv/gbuild/PrecompiledHeaders.mk8
-rw-r--r--solenv/gbuild/TargetLocations.mk2
3 files changed, 16 insertions, 0 deletions
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index c4512a6d8a1b..1fc1503b4981 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -876,6 +876,10 @@ $(call gb_CxxObject_get_target,$(2)) : \
ifeq ($(gb_FULLDEPS),$(true))
$(call gb_LinkTarget_get_dep_target,$(1)) : CXXOBJECTS += $(2)
$(call gb_LinkTarget_get_dep_target,$(1)) : $(call gb_CxxObject_get_dep_target,$(2))
+# It is not known by this time (or at least I don't know how to find out) which
+# PCH variant will be used, so depend on both.
+$(call gb_CxxObject_get_target,$(2)) : $(call gb_PrecompiledHeader_get_timestamp,$(1))
+$(call gb_CxxObject_get_target,$(2)) : $(call gb_NoexPrecompiledHeader_get_timestamp,$(1))
endif
endef
@@ -1207,6 +1211,8 @@ ifeq ($(gb_FULLDEPS),$(true))
-include \
$(call gb_PrecompiledHeader_get_dep_target,$(3)) \
$(call gb_NoexPrecompiledHeader_get_dep_target,$(3))
+$(call gb_PrecompiledHeader_get_timestamp,$(1)) : $(call gb_PrecompiledHeader_get_target,$(3))
+$(call gb_NoexPrecompiledHeader_get_timestamp,$(1)) : $(call gb_NoexPrecompiledHeader_get_target,$(3))
$(call gb_LinkTarget_get_dep_target,$(1)) : DEFS := $$(DEFS) -DPRECOMPILED_HEADERS
$(call gb_LinkTarget_get_dep_target,$(1)) : PCH_DEFS := $$(DEFS)
$(call gb_LinkTarget_get_dep_target,$(1)) : PCH_CXXFLAGS := $$(T_CXXFLAGS) $(call gb_LinkTarget__get_cxxflags,$(1))
diff --git a/solenv/gbuild/PrecompiledHeaders.mk b/solenv/gbuild/PrecompiledHeaders.mk
index 6fbceb36195d..021abfa1b602 100644
--- a/solenv/gbuild/PrecompiledHeaders.mk
+++ b/solenv/gbuild/PrecompiledHeaders.mk
@@ -63,6 +63,7 @@ $(call gb_PrecompiledHeader_get_clean_target,%) :
rm -f $(call gb_PrecompiledHeader_get_target,$*) \
$(call gb_PrecompiledHeader_get_target,$*).obj \
$(call gb_PrecompiledHeader_get_target,$*).pdb \
+ $(call gb_PrecompiledHeader_get_timestamp,$*) \
$(call gb_PrecompiledHeader_get_dep_target,$*))
@@ -72,7 +73,14 @@ $(call gb_NoexPrecompiledHeader_get_clean_target,%) :
rm -f $(call gb_NoexPrecompiledHeader_get_target,$*) \
$(call gb_NoexPrecompiledHeader_get_target,$*).obj \
$(call gb_NoexPrecompiledHeader_get_target,$*).pdb \
+ $(call gb_NoexPrecompiledHeader_get_timestamp,$*) \
$(call gb_NoexPrecompiledHeader_get_dep_target,$*))
endif
+$(call gb_PrecompiledHeader_get_timestamp,%) :
+ mkdir -p $(dir $@) && touch $@
+
+$(call gb_NoexPrecompiledHeader_get_timestamp,%) :
+ mkdir -p $(dir $@) && touch $@
+
# vim: set noet sw=4:
diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk
index bf826054cba3..a32c99749ac5 100644
--- a/solenv/gbuild/TargetLocations.mk
+++ b/solenv/gbuild/TargetLocations.mk
@@ -135,12 +135,14 @@ gb_Module_get_subsequentcheck_target = $(WORKDIR)/Module/subsequentcheck/$(1)
gb_Module_get_target = $(WORKDIR)/Module/$(1)
gb_NoexPrecompiledHeader_get_dep_target = $(WORKDIR)/Dep/NoexPrecompiledHeader/$(gb_NoexPrecompiledHeader_DEBUGDIR)/$(1).hxx.pch.d
gb_NoexPrecompiledHeader_get_target = $(WORKDIR)/NoexPrecompiledHeader/$(gb_NoexPrecompiledHeader_DEBUGDIR)/$(1).hxx.pch
+gb_NoexPrecompiledHeader_get_timestamp = $(WORKDIR)/NoexPrecompiledHeader/$(gb_NoexPrecompiledHeader_DEBUGDIR)/Timestamps/$(1)
gb_ObjCxxObject_get_target = $(WORKDIR)/ObjCxxObject/$(1).o
gb_ObjCObject_get_target = $(WORKDIR)/ObjCObject/$(1).o
gb_Package_get_preparation_target = $(WORKDIR)/Package/prepared/$(1)
gb_Package_get_target = $(WORKDIR)/Package/$(1)
gb_PrecompiledHeader_get_dep_target = $(WORKDIR)/Dep/PrecompiledHeader/$(gb_PrecompiledHeader_DEBUGDIR)/$(1).hxx.pch.d
gb_PrecompiledHeader_get_target = $(WORKDIR)/PrecompiledHeader/$(gb_PrecompiledHeader_DEBUGDIR)/$(1).hxx.pch
+gb_PrecompiledHeader_get_timestamp = $(WORKDIR)/PrecompiledHeader/$(gb_PrecompiledHeader_DEBUGDIR)/Timestamps/$(1)
gb_Pagein_get_target = $(WORKDIR)/Pagein/$(1)
gb_Pyuno_get_target = $(WORKDIR)/Pyuno/$(1).zip
gb_Pyuno_get_outdir_target = $(OUTDIR)/bin/$(1).zip