summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2021-12-15 15:50:42 +0100
committerJan-Marek Glogowski <glogow@fbihome.de>2021-12-21 00:20:36 +0100
commitb8a801def427255587a7e519577d29d1acb91162 (patch)
treee7d5ef44efe9dfda7715d0280c6d9b84a12d33e4 /solenv
parent379b685730ca7adb3b8d1905c73a2c3df1d31799 (diff)
Disallow multiple component files per library
This converts existing users of multiple component files to the new filtering mechanism and adds a check to error in the case that someone tries to set multiple component files again. Change-Id: Ie75d6c5d1b78f446ff06faba7350715289b8d17e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126892 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'solenv')
-rw-r--r--solenv/gbuild/Library.mk9
1 files changed, 8 insertions, 1 deletions
diff --git a/solenv/gbuild/Library.mk b/solenv/gbuild/Library.mk
index 4f0bcaa54841..5252f2ac8772 100644
--- a/solenv/gbuild/Library.mk
+++ b/solenv/gbuild/Library.mk
@@ -148,7 +148,9 @@ $(call gb_ComponentTarget_get_target,$(2)) :| \
$(call gb_Library_get_target,$(gb_Library__get_name))
$(call gb_Library_get_clean_target,$(gb_Library__get_name)) : \
$(call gb_ComponentTarget_get_clean_target,$(2))
-$(eval $(call gb_Library__get_component_var,$(1)) += $(2))
+
+$(if $(call gb_Library__get_component,$(1)),$(error Can't have multiple component files per library))
+$(eval $(call gb_Library__get_component_var,$(1)) = $(2))
endef
@@ -162,6 +164,11 @@ $(call gb_ComponentTarget_add_componentimpl,$(call gb_Library__get_component,$(1
endef
+# call gb_Library_add_componentimpls,library,implids
+define gb_Library_add_componentimpls
+$(foreach comp,$(2),$(call gb_Library_add_componentimpl,$(1),$(comp)))
+endef
+
gb_Library__get_name = $(if $(filter $(1),$(gb_MERGEDLIBS)),merged,$(1))
gb_Library__get_componentprefix = \