diff options
author | Michael Stahl <mstahl@redhat.com> | 2012-10-05 21:17:25 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-10-05 21:19:58 +0200 |
commit | 2b7536a99839543cc535c1c60a019bd2f784a847 (patch) | |
tree | 79489e9a2ec32a76ec9d0c7fc8a393862419b813 /solenv | |
parent | gbuild: ExternalProject: add use_libraries, use_static_libraries (diff) | |
download | core-2b7536a99839543cc535c1c60a019bd2f784a847.tar.gz core-2b7536a99839543cc535c1c60a019bd2f784a847.zip |
gbuild: add gb_ExternalProject_use_external:
Or rather, re-purpose that for consistency (and rename original to
gb_ExternalProject_use_external_project), to abstract over the
system/internal status of dependencies of external projects.
Use it in libcdr and replace exisiting uses in apache-commons.
Change-Id: Ie144600688fa884b5b6faa986c6b95bdfc1ee15c
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/gbuild/ExternalProject.mk | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/solenv/gbuild/ExternalProject.mk b/solenv/gbuild/ExternalProject.mk index 81081b53ee63..ff504bb38200 100644 --- a/solenv/gbuild/ExternalProject.mk +++ b/solenv/gbuild/ExternalProject.mk @@ -103,14 +103,24 @@ $(foreach target,$(2),$(call gb_ExternalProject_register_target,$(1),$(target))) endef -# Make an external Project depend on another external project -define gb_ExternalProject_use_external +# Make an external Project depend on another ExternalProject +define gb_ExternalProject_use_external_project $(call gb_ExternalProject_get_preparation_target,$(1)) : $(call gb_ExternalProject_get_target,$(2)) endef +# Make an ExternalProject depend on an external +# +# this forwards to functions that must be defined in RepositoryExternal.mk. +# $(eval $(call gb_ExternalProject_use_external,library,external)) +define gb_ExternalProject_use_external +$(if $(filter undefined,$(origin gb_ExternalProject__use_$(2))),\ + $(error gb_ExternalProject_use_external: unknown external: $(2)),\ + $(call gb_ExternalProject__use_$(2),$(1))) +endef + define gb_ExternalProject_use_externals -$(foreach external,$(2),$(call gb_ExternalProject_use_external,$(1),$(2))) +$(foreach external,$(2),$(call gb_ExternalProject_use_external,$(1),$(external))) endef # Make an external project depend on a package |