summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--RepositoryExternal.mk33
-rw-r--r--apache-commons/ExternalProject_apache_commons_httpclient.mk4
-rw-r--r--libcdr/ExternalProject_libcdr.mk8
-rw-r--r--solenv/gbuild/ExternalProject.mk16
4 files changed, 50 insertions, 11 deletions
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index cbf337953223..6b3b2e5bb489 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -1020,6 +1020,7 @@ $(call gb_LinkTarget_set_include,$(1),\
$(call gb_LinkTarget_add_libs,$(1),$(WPD_LIBS))
endef
+gb_ExternalProject__use_wpd :=
else # !SYSTEM_LIBWPD
@@ -1036,6 +1037,10 @@ $(call gb_LinkTarget_use_static_libraries,$(1),\
)
endef
+define gb_ExternalProject__use_wpd
+$(call gb_ExternalProject_use_package,$(1),libwpd)
+
+endef
endif # SYSTEM_LIBWPD
@@ -1050,6 +1055,7 @@ $(call gb_LinkTarget_set_include,$(1),\
$(call gb_LinkTarget_add_libs,$(1),$(WPG_LIBS))
endef
+gb_ExternalProject__use_wpg :=
else # !SYSTEM_LIBWPG
@@ -1066,6 +1072,11 @@ $(call gb_LinkTarget_use_static_libraries,$(1),\
)
endef
+define gb_ExternalProject__use_wpg
+$(call gb_ExternalProject_use_package,$(1),libwpg_inc)
+$(call gb_ExternalProject_use_static_libraries,$(1),wpglib)
+
+endef
endif # SYSTEM_LIBWPG
@@ -1080,6 +1091,7 @@ $(call gb_LinkTarget_set_include,$(1),\
$(call gb_LinkTarget_add_libs,$(1),$(WPS_LIBS))
endef
+gb_ExternalProject__use_wps :=
else # !SYSTEM_LIBWPS
@@ -1093,6 +1105,11 @@ $(call gb_LinkTarget_use_static_libraries,$(1),\
)
endef
+define gb_ExternalProject__use_wps
+$(call gb_ExternalProject_use_package,$(1),libwps_inc)
+$(call gb_ExternalProject_use_static_libraries,$(1),wpslib)
+
+endef
endif # SYSTEM_LIBWPS
@@ -2161,18 +2178,22 @@ ifeq ($(SYSTEM_APACHE_COMMONS),YES)
define gb_Jar__use_commons-codec
$(call gb_Jar_use_system_jar,$(1),$(COMMONS_CODEC_JAR))
endef
+gb_ExternalProject__use_commons-codec :=
define gb_Jar__use_commons-httpclient
$(call gb_Jar_use_system_jar,$(1),$(COMMONS_HTTPCLIENT_JAR))
endef
+gb_ExternalProject__use_commons-httpclient :=
define gb_Jar__use_commons-lang
$(call gb_Jar_usadd_linked_libse_system_jar,$(1),$(COMMONS_LANG_JAR))
endef
+gb_ExternalProject__use_commons-lang :=
define gb_Jar__use_commons-logging
$(call gb_Jar_use_system_jar,$(1),$(COMMONS_LOGGING_JAR))
endef
+gb_ExternalProject__use_commons-logging :=
else # !SYSTEM_APACHE_COMMONS
@@ -2186,18 +2207,30 @@ $(eval $(call gb_Helper_register_jars,OXT,\
define gb_Jar__use_commons-codec
$(call gb_Jar_use_jar,$(1),commons-codec-1.3)
endef
+define gb_ExternalProject__use_commons-codec
+$(call gb_ExternalProject_use_external_project,$(1),apache_commons_codec)
+endef
define gb_Jar__use_commons-httpclient
$(call gb_Jar_use_jar,$(1),commons-httpclient-3.1)
endef
+define gb_ExternalProject__use_commons-httpclient
+$(call gb_ExternalProject_use_external_project,$(1),apache_commons_httpclient)
+endef
define gb_Jar__use_commons-lang
$(call gb_Jar_use_jar,$(1),commons-lang-2.3)
endef
+define gb_ExternalProject__use_commons-lang
+$(call gb_ExternalProject_use_external_project,$(1),apache_commons_lang)
+endef
define gb_Jar__use_commons-logging
$(call gb_Jar_use_jar,$(1),commons-logging-1.1.1)
endef
+define gb_ExternalProject__use_commons-logging
+$(call gb_ExternalProject_use_external_project,$(1),apache_commons_logging)
+endef
endif # SYSTEM_APACHE_COMMONS
diff --git a/apache-commons/ExternalProject_apache_commons_httpclient.mk b/apache-commons/ExternalProject_apache_commons_httpclient.mk
index 9dad40dc88cf..921ae1c48768 100644
--- a/apache-commons/ExternalProject_apache_commons_httpclient.mk
+++ b/apache-commons/ExternalProject_apache_commons_httpclient.mk
@@ -14,8 +14,8 @@ $(eval $(call gb_ExternalProject_ExternalProject,apache_commons_httpclient))
$(eval $(call gb_ExternalProject_use_unpacked,apache_commons_codec,apache_commons_httpclient))
-$(eval $(call gb_ExternalProject_use_external,apache_commons_httpclient,apache_commons_codec))
-$(eval $(call gb_ExternalProject_use_external,apache_commons_httpclient,apache_commons_logging))
+$(eval $(call gb_ExternalProject_use_external,apache_commons_httpclient,commons-codec))
+$(eval $(call gb_ExternalProject_use_external,apache_commons_httpclient,commons-logging))
$(eval $(call gb_ExternalProject_register_targets,apache_commons_httpclient,\
build \
diff --git a/libcdr/ExternalProject_libcdr.mk b/libcdr/ExternalProject_libcdr.mk
index 95d0eeb6e48f..fe6ce5f6898e 100644
--- a/libcdr/ExternalProject_libcdr.mk
+++ b/libcdr/ExternalProject_libcdr.mk
@@ -16,7 +16,8 @@ $(eval $(call gb_ExternalProject_register_targets,libcdr,\
))
$(eval $(call gb_ExternalProject_use_externals,cdrlib,\
- libwpd \
+ wpd \
+ wpg \
))
ifeq ($(OS)$(COM),WNTMSC)
@@ -45,8 +46,6 @@ else # !SYSTEM_LIBWPD
libcdr_cflags += -I$(OUTDIR)/inc/external
libcdr_libs += $(SOLARLIB)
-$(eval $(call gb_ExternalProject_use_package,libcdr,libwpd))
-
endif # SYSTEM_LIBWPD
@@ -60,9 +59,6 @@ else # !SYSTEM_LIBWPG
libcdr_cflags += -I$(OUTDIR)/inc/external
libcdr_libs += $(SOLARLIB)
-$(eval $(call gb_ExternalProject_use_package,libcdr,libwpg_inc))
-$(eval $(call gb_ExternalProject_use_static_libraries,libcdr,wpglib))
-
endif # SYSTEM_LIBWPG
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