diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-09-16 12:13:02 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-09-22 11:08:29 +0200 |
commit | 5905dfeafff2c8071e6f2e212a077b8450d1a0d6 (patch) | |
tree | a74299c5f8f5150920a49341b596e503fb214715 /solenv/gbuild/Library.mk | |
parent | 031fca3abac5692bf89a2e8a34dead3425154a4f (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/Library.mk')
-rw-r--r-- | solenv/gbuild/Library.mk | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/solenv/gbuild/Library.mk b/solenv/gbuild/Library.mk index 34e590065b38..f5b4a9f53e2b 100644 --- a/solenv/gbuild/Library.mk +++ b/solenv/gbuild/Library.mk @@ -58,9 +58,9 @@ $(call gb_Library_get_target,$(1)) : SOVERSION := $(if $(gb_Package_PRESTAGEDIR),\ $(if $(wildcard $(gb_Package_PRESTAGEDIR)/$(call gb_Library_get_instdir,$(1))/$(call gb_Library_get_runtime_filename,$(1))),\ $(call gb_Library__Library_impl_copy,$(0),$(call gb_Library_get_instdir,$(1))/$(call gb_Library_get_runtime_filename,$(1))),\ - $(call gb_Library__Library_impl,$(1),$(call gb_Library_get_linktargetname,$(1)))\ + $(call gb_Library__Library_impl,$(1),$(call gb_Library_get_linktarget,$(1)))\ ), - $(call gb_Library__Library_impl,$(1),$(call gb_Library_get_linktargetname,$(1)))\ + $(call gb_Library__Library_impl,$(1),$(call gb_Library_get_linktarget,$(1)))\ ) endef @@ -72,6 +72,7 @@ $(call gb_Package_add_file,Library_Copy_$(1),$(2),$(2)) $(OUTDIR)/lib/$(notdir $(2)) : $(gb_INSTROOT)/$(2) endef +# call gb_Library__Library_impl,library,linktarget define gb_Library__Library_impl $(call gb_LinkTarget_LinkTarget,$(2),Library_$(1)) $(call gb_LinkTarget_set_targettype,$(2),Library) @@ -105,9 +106,9 @@ endef # The auxtarget is delivered via the rule in Package.mk. # gb_Library_add_auxtarget library outdirauxtarget define gb_Library_add_auxtarget -$(call gb_LinkTarget_add_auxtarget,$(call gb_Library_get_linktargetname,$(1)),$(dir $(call gb_LinkTarget_get_target,$(call gb_Library_get_linktargetname,$(1))))/$(notdir $(2))) +$(call gb_LinkTarget_add_auxtarget,$(call gb_Library_get_linktarget,$(1)),$(dir $(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,$(1))))/$(notdir $(2))) $(call gb_Library_get_target,$(1)) : $(2) -$(2) : $(dir $(call gb_LinkTarget_get_target,$(call gb_Library_get_linktargetname,$(1))))/$(notdir $(2)) +$(2) : $(dir $(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,$(1))))/$(notdir $(2)) $(2) :| $(dir $(2)).dir $(call gb_Library_get_clean_target,$(1)) : AUXTARGETS += $(2) @@ -125,12 +126,12 @@ $(call gb_Library_add_auxtarget,$(1),$(2)) endef define gb_Library__set_soversion_script -$(call gb_LinkTarget_set_soversion_script,$(call gb_Library_get_linktargetname,$(1)),$(2),$(3)) +$(call gb_LinkTarget_set_soversion_script,$(call gb_Library_get_linktarget,$(1)),$(2),$(3)) $(call gb_Library_get_target,$(1)) : SOVERSION := $(2) $(call gb_Library__add_soversion_link,$(1),$(call gb_Library_get_target,$(1)).$(2)) $(call gb_Helper_install,$(call gb_Library__get_final_target,$(1)), \ $(call gb_Library_get_install_target,$(1)).$(2), \ - $(call gb_LinkTarget_get_target,$(call gb_Library_get_linktargetname,$(1))).$(2)) + $(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,$(1))).$(2)) endef @@ -184,7 +185,7 @@ gb_Library__COMPONENTPREFIXES := \ OXT:./ \ define gb_Library__forward_to_Linktarget -gb_Library_$(1) = $$(call gb_LinkTarget_$(1),$$(call gb_Library_get_linktargetname,$$(1)),$$(2),$$(3),Library_$$(1)) +gb_Library_$(1) = $$(call gb_LinkTarget_$(1),$$(call gb_Library_get_linktarget,$$(1)),$$(2),$$(3),Library_$$(1)) endef |