summaryrefslogtreecommitdiff
path: root/sw/Library_sw.mk
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2021-12-08 22:53:44 +0100
committerStephan Bergmann <sbergman@redhat.com>2021-12-14 07:38:05 +0100
commit65c0887bca2909b2046eb5aa4aaace0cc320c3f2 (patch)
treec4558d703db1521d2999f9421d2ab104555f33ad /sw/Library_sw.mk
parent28ff78c950e3480077145f15e7cff36c375a689c (diff)
Allow for conditional parts of component files
1c9a40299d328c78c035ca63ccdf22c5c669a03b "gbuild: create services.rdb from built components" had moved parts of svx/util/svx.component and sw/util/sw.component into additional, conditionally included component files (and which this commit moves back into the original component files). But that lead to multiple <component> elements for a single library in service rdb files, which was unfortunate for several reasons: For one, while the code in cppuhelper/source/servicemanager.cxx happened to support that, it was not guaranteed to support it, so this relied on an implementation detail of that code. And for another, for that to work, all the component files for a library had to provide identical environment, loader, and prefix (if any) attributes, but which was not verified and thus was brittle. Instead, introduce a CONDITION attribute for the <implementation> elements in the source component files, which decides whether or not such <implementation> elements are passed through (after dropping the CONDITION attribute) into the processed component files (in workdir/ComponentTarget/). (The attribute is spelled all-uppercase to make it more obvious that it is special syntax that is not simply passed through to the output component file.) For now, such a CONDITION attribute must have a value that matches BUILD_TYPE:x for some feature x in $(BUILD_TYPE), but the syntax can be extended if the need arises. (gb_Library_set_componentfiles is thus no longer needed and has been removed again.) Change-Id: I360cf4cc0f3a2a738113d430891500715a8fe3a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126560 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw/Library_sw.mk')
-rw-r--r--sw/Library_sw.mk5
1 files changed, 1 insertions, 4 deletions
diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk
index 7ff8190b8858..6989bce49cea 100644
--- a/sw/Library_sw.mk
+++ b/sw/Library_sw.mk
@@ -21,10 +21,7 @@ $(eval $(call gb_Library_Library,sw))
$(eval $(call gb_Library_add_sdi_headers,sw,sw/sdi/swslots))
-$(eval $(call gb_Library_set_componentfiles,sw, \
- $(call gb_Helper_optional,DBCONNECTIVITY,sw/util/sw_mm) \
- sw/util/sw \
-,services))
+$(eval $(call gb_Library_set_componentfile,sw,sw/util/sw,services))
$(eval $(call gb_Library_set_precompiled_header,sw,sw/inc/pch/precompiled_sw))