summaryrefslogtreecommitdiff
path: root/solenv/gbuild/Executable.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/Executable.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/Executable.mk')
-rw-r--r--solenv/gbuild/Executable.mk11
1 files changed, 6 insertions, 5 deletions
diff --git a/solenv/gbuild/Executable.mk b/solenv/gbuild/Executable.mk
index 2b8188adbaa0..bb9358e82cb5 100644
--- a/solenv/gbuild/Executable.mk
+++ b/solenv/gbuild/Executable.mk
@@ -53,10 +53,11 @@ ifeq (,$$(findstring $(1),$$(gb_Executable_KNOWN)))
$$(eval $$(call gb_Output_info,Currently known executables: $(sort $(gb_Executable_KNOWN)),ALL))
$$(eval $$(call gb_Output_error,Executable $(1) must be registered in Repository.mk))
endif
-$(call gb_Executable__Executable_impl,$(1),$(call gb_Executable_get_linktargetname,$(1)))
+$(call gb_Executable__Executable_impl,$(1),$(call gb_Executable_get_linktarget,$(1)))
endef
+# call gb_Executable__Executable_impl,exe,linktarget
define gb_Executable__Executable_impl
$(call gb_LinkTarget_LinkTarget,$(2),Executable_$(1))
$(call gb_LinkTarget_set_targettype,$(2),Executable)
@@ -81,21 +82,21 @@ $(call gb_Deliver_add_deliverable,$(call gb_Executable_get_target,$(1)),$(call g
endef
define gb_Executable_set_targettype_gui
-$(call gb_LinkTarget_get_target,$(call gb_Executable_get_linktargetname,$(1))) : TARGETGUI := $(2)
+$(call gb_LinkTarget_get_target,$(call gb_Executable_get_linktarget,$(1))) : TARGETGUI := $(2)
endef
# The auxtarget is delivered via the rule in Package.mk.
# gb_Executable_add_auxtarget executable outdirauxtarget
define gb_Executable_add_auxtarget
-$(call gb_LinkTarget_add_auxtarget,$(call gb_Executable_get_linktargetname,$(1)),$(dir $(call gb_LinkTarget_get_target,$(call gb_Executable_get_linktargetname,$(1))))/$(notdir $(2)))
+$(call gb_LinkTarget_add_auxtarget,$(call gb_Executable_get_linktarget,$(1)),$(dir $(call gb_LinkTarget_get_target,$(call gb_Executable_get_linktarget,$(1))))/$(notdir $(2)))
$(call gb_Executable_get_target,$(1)) : $(2)
-$(2) : $(dir $(call gb_LinkTarget_get_target,$(call gb_Executable_get_linktargetname,$(1))))/$(notdir $(2))
+$(2) : $(dir $(call gb_LinkTarget_get_target,$(call gb_Executable_get_linktarget,$(1))))/$(notdir $(2))
$(call gb_Executable_get_clean_target,$(1)) : AUXTARGETS += $(2)
endef
define gb_Executable_forward_to_Linktarget
-gb_Executable_$(1) = $$(call gb_LinkTarget_$(1),$$(call gb_Executable_get_linktargetname,$$(1)),$$(2),$$(3),Executable_$$(1))
+gb_Executable_$(1) = $$(call gb_LinkTarget_$(1),$$(call gb_Executable_get_linktarget,$$(1)),$$(2),$$(3),Executable_$$(1))
endef