diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-09-14 23:11:14 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-09-22 11:08:28 +0200 |
commit | 8230c26e3d11b2033265ef81b21a1e2b7ccc1041 (patch) | |
tree | 4ddb91938b14bc40071a17f4b5ff219ae8c13895 /solenv | |
parent | 5fc689c9f7102b3e29fdd190fba11d6867d92bc3 (diff) |
gbuild: add gb_Library_use_restarget
Change-Id: Ic0a2fd3c1adeb55ec27f6a2eb4709be598120fba
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/gbuild/Library.mk | 1 | ||||
-rw-r--r-- | solenv/gbuild/LinkTarget.mk | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/solenv/gbuild/Library.mk b/solenv/gbuild/Library.mk index 6fda71f36256..34e590065b38 100644 --- a/solenv/gbuild/Library.mk +++ b/solenv/gbuild/Library.mk @@ -252,6 +252,7 @@ $(eval $(foreach method,\ use_package \ use_packages \ use_unpacked \ + use_restarget \ add_package_headers \ add_sdi_headers \ set_precompiled_header \ diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk index c1b40e8bcc3f..00abdc472a7d 100644 --- a/solenv/gbuild/LinkTarget.mk +++ b/solenv/gbuild/LinkTarget.mk @@ -1317,6 +1317,16 @@ $(call gb_LinkTarget_get_headers_target,$(1)) :| $(call gb_ExternalProject_get_t endef +# Delay linking until a res target has been built. This is needed so that +# unit tests using libraries do not fail if the res target is not yet built. +# +# gb_LinkTarget_use_restarget linktarget restarget(s) +define gb_LinkTarget_use_restarget +$(call gb_LinkTarget_get_target,$(1)) :| \ + $(foreach res,$(2),$(call gb_AllLangResTarget_get_target,$(res))) + +endef + # this forwards to functions that must be defined in RepositoryExternal.mk. # $(eval $(call gb_LinkTarget_use_external,library,external)) define gb_LinkTarget_use_external |