summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@collabora.com>2014-12-15 13:49:08 +0100
committerMatúš Kukan <matus.kukan@collabora.com>2014-12-15 14:42:59 +0100
commitb6be3d3db3ffbc4c1a4528a8dc17aa95084e12ca (patch)
treee0f15c723a60e673ee4e2acc394aaf04dd0a0e94 /solenv
parent13de511e7c3c7423dbac7e8751c95cac17194b69 (diff)
gbuild: Do not require gb_Library_use_externals for libmerged
Instead, automatically get the externals when parsing other makefiles. This commit fixes the build and hopefully avoids problems in future because people didn't know they had to add externals for libmerged too. Similar should be done for other functions like add_libs... Change-Id: I5aea4c43f4b6838092ada81c310ef1100f241108
Diffstat (limited to 'solenv')
-rw-r--r--solenv/gbuild/LinkTarget.mk14
1 files changed, 11 insertions, 3 deletions
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index 94781309d369..e59b425c9dea 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -853,6 +853,10 @@ define gb_LinkTarget__is_build_tool
$(if $(filter $(call gb_LinkTarget__get_workdir_linktargetname,$(1)),$(call gb_BUILD_HELPER_TOOLS)),$(true),$(false))
endef
+define gb_LinkTarget__is_merged
+$(filter $(1),$(foreach lib,$(gb_MERGEDLIBS),$(call gb_Library_get_linktarget,$(lib))))
+endef
+
# call gb_LinkTarget_use_libraries,linktarget,libs
define gb_LinkTarget_use_libraries
ifneq (,$$(filter-out $(gb_Library_KNOWNLIBS),$(2)))
@@ -865,7 +869,7 @@ $(call gb_LinkTarget__use_libraries,$(1),$(2),$(2),$(4))
else
$(call gb_LinkTarget__use_libraries,$(1),$(2),$(strip \
$(if $(filter $(gb_MERGEDLIBS),$(2)), \
- $(if $(filter $(1),$(foreach lib,$(gb_MERGEDLIBS),$(call gb_Library_get_linktarget,$(lib)))), \
+ $(if $(call gb_LinkTarget__is_merged,$(1)), \
$(filter $(gb_MERGEDLIBS),$(2)), merged)) \
$(if $(filter $(gb_URELIBS),$(2)), \
$(if $(filter $(1),$(foreach lib,$(gb_URELIBS),$(call gb_Library_get_linktarget,$(lib)))), \
@@ -1328,11 +1332,15 @@ $(call gb_LinkTarget_get_target,$(1)) :| \
endef
# this forwards to functions that must be defined in RepositoryExternal.mk.
-# call gb_LinkTarget_use_external,library,external
+# Automatically forward for libmerged library too when linktarget is merged.
+#
+# call gb_LinkTarget_use_external,linktarget,external
define gb_LinkTarget_use_external
$(if $(filter undefined,$(origin gb_LinkTarget__use_$(2))),\
$(error gb_LinkTarget_use_external: unknown external: $(2)),\
- $(call gb_LinkTarget__use_$(2),$(1)))
+ $(if $(call gb_LinkTarget__is_merged,$(1)),$(call gb_LinkTarget__use_$(2),$(call gb_Library_get_linktarget,merged))) \
+ $(call gb_LinkTarget__use_$(2),$(1)) \
+)
endef
# $(call gb_LinkTarget_use_externals,library,externals)