summaryrefslogtreecommitdiff
path: root/solenv/gbuild/CompilerTest.mk
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-10-06 12:45:45 +0200
committerMichael Stahl <mstahl@redhat.com>2017-10-06 14:54:31 +0200
commitee75810ecb8f656c87363b8b952033c8ddb61de7 (patch)
tree05243d98eae4f5106d00481c0bc09d9ccb7abd43 /solenv/gbuild/CompilerTest.mk
parent798c18881d4db1930e71c471324b9048715439b5 (diff)
gbuild: more verbose forwarding of LinkTarget functions
The forwarding of LinkTarget subclass functions to LinkTarget functions is currently done in a very elegant way that only requires listing the bare function names once, but the downside is that the subclass functions aren't defined in a way that "git grep" or "ctags" can find, so replace that with more verbose copy-paste definitions. Change-Id: I4bd7f1b1bc0904ae345958e39403ab508db584a1 Reviewed-on: https://gerrit.libreoffice.org/43196 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'solenv/gbuild/CompilerTest.mk')
-rw-r--r--solenv/gbuild/CompilerTest.mk36
1 files changed, 18 insertions, 18 deletions
diff --git a/solenv/gbuild/CompilerTest.mk b/solenv/gbuild/CompilerTest.mk
index e7f798ba0eae..f4dae61bd2f2 100644
--- a/solenv/gbuild/CompilerTest.mk
+++ b/solenv/gbuild/CompilerTest.mk
@@ -25,27 +25,27 @@ $(call gb_Helper_make_userfriendly_targets,$(1),CompilerTest)
endef
+# forward the call to the gb_LinkTarget implementation
+# (note: because the function name is in $(1), the other args are shifted by 1)
define gb_CompilerTest__forward_to_Linktarget
-gb_CompilerTest_$(1) = $$(call gb_LinkTarget_$(1),$$(call gb_CompilerTest_get_linktarget,$$(1)),$$(2),$$(3),CompilerTest_$$(1))
+$(call gb_LinkTarget_$(1),$(call gb_CompilerTest_get_linktarget,$(2)),$(3),$(4),CompilerTest_$(2))
endef
-$(eval $(foreach method, \
- add_cobject \
- add_cobjects \
- add_cxxobject \
- add_cxxobjects \
- add_exception_objects \
- add_objcobject \
- add_objcobjects \
- add_objcxxobject \
- add_objcxxobjects \
- add_cxxclrobject \
- add_cxxclrobjects \
- use_externals \
- use_udk_api \
-, \
- $(call gb_CompilerTest__forward_to_Linktarget,$(method)) \
-))
+# copy pasta for forwarding: this could be (and was) done more elegantly, but
+# these here can be found by both git grep and ctags
+gb_CompilerTest_add_cobject = $(call gb_CompilerTest__forward_to_Linktarget,$(subst gb_CompilerTest_,,$(0)),$(1),$(2),$(3))
+gb_CompilerTest_add_cobjects = $(call gb_CompilerTest__forward_to_Linktarget,$(subst gb_CompilerTest_,,$(0)),$(1),$(2),$(3))
+gb_CompilerTest_add_cxxobject = $(call gb_CompilerTest__forward_to_Linktarget,$(subst gb_CompilerTest_,,$(0)),$(1),$(2),$(3))
+gb_CompilerTest_add_cxxobjects = $(call gb_CompilerTest__forward_to_Linktarget,$(subst gb_CompilerTest_,,$(0)),$(1),$(2),$(3))
+gb_CompilerTest_add_exception_objects = $(call gb_CompilerTest__forward_to_Linktarget,$(subst gb_CompilerTest_,,$(0)),$(1),$(2),$(3))
+gb_CompilerTest_add_objcobject = $(call gb_CompilerTest__forward_to_Linktarget,$(subst gb_CompilerTest_,,$(0)),$(1),$(2),$(3))
+gb_CompilerTest_add_objcobjects = $(call gb_CompilerTest__forward_to_Linktarget,$(subst gb_CompilerTest_,,$(0)),$(1),$(2),$(3))
+gb_CompilerTest_add_objcxxobject = $(call gb_CompilerTest__forward_to_Linktarget,$(subst gb_CompilerTest_,,$(0)),$(1),$(2),$(3))
+gb_CompilerTest_add_objcxxobjects = $(call gb_CompilerTest__forward_to_Linktarget,$(subst gb_CompilerTest_,,$(0)),$(1),$(2),$(3))
+gb_CompilerTest_add_cxxclrobject = $(call gb_CompilerTest__forward_to_Linktarget,$(subst gb_CompilerTest_,,$(0)),$(1),$(2),$(3))
+gb_CompilerTest_add_cxxclrobjects = $(call gb_CompilerTest__forward_to_Linktarget,$(subst gb_CompilerTest_,,$(0)),$(1),$(2),$(3))
+gb_CompilerTest_use_externals = $(call gb_CompilerTest__forward_to_Linktarget,$(subst gb_CompilerTest_,,$(0)),$(1),$(2),$(3))
+gb_CompilerTest_use_udk_api = $(call gb_CompilerTest__forward_to_Linktarget,$(subst gb_CompilerTest_,,$(0)),$(1),$(2),$(3))
# vim: set noet sw=4 ts=4: