summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2012-09-05 07:15:39 +0200
committerMatúš Kukan <matus.kukan@gmail.com>2012-09-08 12:45:11 +0200
commit3d8ceca16461c12801f73a8bd67544bd4e4370e4 (patch)
treea1e554cae451d9c4bdcf770e1dd72d006c3eb59a /solenv
parent3790e84ec782af2b64c286d134c728993adb3214 (diff)
use "scoped" global var. to set the suffix of gen. C++ files
Change-Id: I992d361d489bee59414a4a259fd73a06dd56a72c
Diffstat (limited to 'solenv')
-rw-r--r--solenv/gbuild/LinkTarget.mk20
1 files changed, 9 insertions, 11 deletions
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index 58b79110963a..19e944cfce66 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -169,13 +169,13 @@ endif
# GenCxxObject class
-gb_GenCxxObject_get_source = $(WORKDIR)/$(1).$(CXX_SUFFIX)
+gb_GenCxxObject_get_source = $(WORKDIR)/$(1).$(gb_LinkTarget_CXX_SUFFIX_$(2))
# defined by platform
# gb_CxxObject__command
$(call gb_GenCxxObject_get_target,%) :
- test -f $(call gb_GenCxxObject_get_source,$*) || (echo "Missing generated source file $(call gb_GenCxxObject_get_source,$*)" && false)
- $(call gb_CxxObject__command,$@,$*,$(call gb_GenCxxObject_get_source,$*),$(call gb_GenCxxObject_get_dep_target,$*))
+ test -f $(GEN_CXX_SOURCE) || (echo "Missing generated source file $(GEN_CXX_SOURCE)" && false)
+ $(call gb_CxxObject__command,$@,$*,$(GEN_CXX_SOURCE),$(call gb_GenCxxObject_get_dep_target,$*))
ifeq ($(gb_FULLDEPS),$(true))
$(call gb_GenCxxObject_get_dep_target,%) :
@@ -494,7 +494,6 @@ $(call gb_LinkTarget_get_target,$(1)) : PDBFILE :=
$(call gb_LinkTarget_get_target,$(1)) : EXTRAOBJECTLISTS :=
$(call gb_LinkTarget_get_target,$(1)) : NATIVERES :=
$(call gb_LinkTarget_get_target,$(1)) : WARNINGS_NOT_ERRORS :=
-$(call gb_LinkTarget_get_target,$(1)) : $(eval CXX_SUFFIX := cxx)
ifeq ($(gb_FULLDEPS),$(true))
-include $(call gb_LinkTarget_get_dep_target,$(1))
@@ -518,9 +517,10 @@ $(call gb_LinkTarget_get_dep_target,$(1)) : TARGETTYPE :=
$(call gb_LinkTarget_get_dep_target,$(1)) : LIBRARY_X64 :=
$(call gb_LinkTarget_get_dep_target,$(1)) : EXTRAOBJECTLISTS :=
$(call gb_LinkTarget_get_dep_target,$(1)) : WARNINGS_NOT_ERRORS :=
-$(call gb_LinkTarget_get_dep_target,$(1)) : $(eval CXX_SUFFIX := cxx)
endif
+gb_LinkTarget_CXX_SUFFIX_$(1) := cxx
+
endef
define gb_LinkTarget_add_defs
@@ -875,14 +875,15 @@ $(call gb_LinkTarget_get_target,$(1)) : GENCXXOBJECTS += $(2)
$(call gb_LinkTarget_get_clean_target,$(1)) : GENCXXOBJECTS += $(2)
$(call gb_LinkTarget_get_target,$(1)) : $(call gb_GenCxxObject_get_target,$(2))
-$(call gb_GenCxxObject_get_target,$(2)) : $(call gb_GenCxxObject_get_source,$(2))
+$(call gb_GenCxxObject_get_target,$(2)) : $(call gb_GenCxxObject_get_source,$(2),$(1))
# Often gb_GenCxxObject_get_source does not have its own rule and is only a byproduct.
# That's why we need this order-only dependency on gb_Helper_MISCDUMMY
-$(call gb_GenCxxObject_get_source,$(2)) : | $(gb_Helper_MISCDUMMY)
+$(call gb_GenCxxObject_get_source,$(2),$(1)) : | $(gb_Helper_MISCDUMMY)
$(call gb_GenCxxObject_get_target,$(2)) : | $(call gb_LinkTarget_get_headers_target,$(1))
$(call gb_GenCxxObject_get_target,$(2)) : T_CXXFLAGS += $(3)
$(call gb_GenCxxObject_get_target,$(2)) : \
OBJECTOWNER := $(call gb_Object__owner,$(2),$(1))
+$(call gb_GenCxxObject_get_target,$(2)) : GEN_CXX_SOURCE := $(call gb_GenCxxObject_get_source,$(2),$(1))
ifeq ($(gb_FULLDEPS),$(true))
$(call gb_LinkTarget_get_dep_target,$(1)) : GENCXXOBJECTS += $(2)
@@ -1130,10 +1131,7 @@ endef
#
# gb_LinkTarget_set_cxx_suffix linktarget used-suffix
define gb_LinkTarget_set_cxx_suffix
-$(call gb_LinkTarget_get_target,$(1)) : $(eval CXX_SUFFIX := $(2))
-ifeq ($(gb_FULLDEPS),$(true))
-$(call gb_LinkTarget_get_dep_target,$(1)) : $(eval CXX_SUFFIX := $(2))
-endif
+gb_LinkTarget_CXX_SUFFIX_$(1) := $(2)
endef