summaryrefslogtreecommitdiff
path: root/solenv/gbuild/CppunitTest.mk
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-09-16 12:13:02 +0200
committerMichael Stahl <mstahl@redhat.com>2013-09-22 11:08:29 +0200
commit5905dfeafff2c8071e6f2e212a077b8450d1a0d6 (patch)
treea74299c5f8f5150920a49341b596e503fb214715 /solenv/gbuild/CppunitTest.mk
parent031fca3abac5692bf89a2e8a34dead3425154a4f (diff)
gbuild: refactor LinkTarget representation
If the link targets are not in workdir then 2 different aspects are needed: the previously used location relative to workdir's LinkTarget dir (for all the misc. related targets), and the full target file. Adding an additional parameter to all LinkTarget functions would be quite annoying, especially since it would need passing through all the gb_LinkTarget__use functions in RepositoryExternal.mk; instead encode both into the linktarget itself, and modify the functions gb_LinkTarget_get_target to return the target and all others to return the workdir linktargetname. - replace gb_Library_get_linktargetname with either: * gb_Library__get_workdir_linktargetname * gb_Library__get_linktarget_target * gb_Library_get_linktarget - similar for gb_Executable_get_linktargetname - similar for gb_StaticLibrary_get_linktargetname - similar for gb_CppunitTest__get_linktargetname - add calls to gb_LinkTarget__get_workdir_linktargetname where needed Change-Id: I917ad7957fee50ec2517a9f9cc9ff452c8d97d1b
Diffstat (limited to 'solenv/gbuild/CppunitTest.mk')
-rw-r--r--solenv/gbuild/CppunitTest.mk11
1 files changed, 5 insertions, 6 deletions
diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index 25afb392518a..2b5e854fe040 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -48,8 +48,6 @@ endif
gb_CppunitTest_CPPTESTDEPS := $(call gb_Executable_get_runtime_dependencies,cppunit/cppunittester)
gb_CppunitTest_CPPTESTCOMMAND := $(call gb_Executable_get_target_for_build,cppunit/cppunittester)
-gb_CppunitTest__get_linktargetname = CppunitTest/$(call gb_CppunitTest_get_filename,$(1))
-
define gb_CppunitTest__make_args
$(HEADLESS) \
"-env:BRAND_BASE_DIR=$(call gb_Helper_make_url,$(OUTDIR)/unittest/install)" \
@@ -88,7 +86,7 @@ $(call gb_CppunitTest_get_target,%) :| $(gb_CppunitTest_CPPTESTDEPS)
DISABLE_SAL_DBGBOX=t \
$(if $(SAL_DIAGNOSE_ABORT),SAL_DIAGNOSE_ABORT=$(SAL_DIAGNOSE_ABORT)) \
$(ICECREAM_RUN) $(gb_CppunitTest_GDBTRACE) $(gb_CppunitTest_VALGRINDTOOL) $(gb_CppunitTest_CPPTESTCOMMAND) \
- $(call gb_LinkTarget_get_target,CppunitTest/$(call gb_CppunitTest_get_libfilename,$*)) \
+ $(WORKDIR)/LinkTarget/CppunitTest/$(call gb_CppunitTest_get_libfilename,$*) \
$(call gb_CppunitTest__make_args) \
$(if $(gb_CppunitTest__interactive),, \
> $@.log 2>&1 \
@@ -98,10 +96,11 @@ $(call gb_CppunitTest_get_target,%) :| $(gb_CppunitTest_CPPTESTDEPS)
&& false))))
define gb_CppunitTest_CppunitTest
-$(call gb_CppunitTest__CppunitTest_impl,$(1),$(call gb_CppunitTest__get_linktargetname,$(1)))
+$(call gb_CppunitTest__CppunitTest_impl,$(1),$(call gb_CppunitTest_get_linktarget,$(1)))
endef
+# call gb_CppunitTest__CppunitTest_impl,cppunittest,linktarget
define gb_CppunitTest__CppunitTest_impl
$(call gb_LinkTarget_LinkTarget,$(2),CppunitTest_$(1))
$(call gb_LinkTarget_set_targettype,$(2),CppunitTest)
@@ -195,7 +194,7 @@ $$(call gb_Output_error,\
endef
define gb_CppunitTest_use_api
-$(call gb_LinkTarget_use_api,$(call gb_CppunitTest__get_linktargetname,$(1)),$(2))
+$(call gb_LinkTarget_use_api,$(call gb_CppunitTest_get_linktarget,$(1)),$(2))
$(foreach rdb,$(2),$(call gb_CppunitTest__use_api,$(1),$(rdb)))
endef
@@ -333,7 +332,7 @@ $(call gb_CppunitTestFakeExecutable_get_clean_target,$(2)) :
endef
define gb_CppunitTest__forward_to_Linktarget
-gb_CppunitTest_$(1) = $$(call gb_LinkTarget_$(1),$$(call gb_CppunitTest__get_linktargetname,$$(1)),$$(2),$$(3),CppunitTest_$$(1))
+gb_CppunitTest_$(1) = $$(call gb_LinkTarget_$(1),$$(call gb_CppunitTest_get_linktarget,$$(1)),$$(2),$$(3),CppunitTest_$$(1))
endef