Fix and simplify "any bundled extensions installed" check

First, Extension_nlpsolver is not unconditionally covered by --with-java, but by
a dedicated --enable-ext-nlpsolver (which requires --with-java).  (I had
overlooked that the whole Module_nlpsolver is conditional in
RepositoryModule_host.mk.)  So the check for Extension_nlpsolver should instead
check for NLPSOLVER in BUILD_TYPE.

Second, the check for --enable-ext-numbertext could check for NUMBERTEXT in
BUILD_TYPE instead of checking for NUMBERTEXT_EXTENSION_PACK, as
--enable-ext-numbertext sets both (cf. m4/libo_check_extension.m4).

And third, any --enable-ext-* will set WITH_EXTRA_EXTENSIONS (cf.
m4/libo_check_extension.m4), so all those various BUILD_TYPE checks can all be
subsumed by a single WITH_EXTRA_EXTENSIONS check.  (Which nicely reduces the
maintenance burden mentioned in the commit message of
f267340d30 "Remove unused
$(LIBO_SHARE_FOLDER)/extensions/package.txt.")

Change-Id: Ifdf8b59febd49661500292ab2003c792d8cb60a7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120104
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
Stephan Bergmann 2021-08-06 09:17:37 +02:00
parent 5ba792bdda
commit 6c487d2d7e

View file

@ -9,12 +9,11 @@
$(eval $(call gb_Package_Package,setup_native_packinfo,$(SRCDIR)))
# Check if any bundled extensions are installed (where ENABLE_JAVA covers Extension_nlpsolver, cf.
# nlpsolver/Module_nlpsolver.mk); if none are installed, then gb_Package_add_empty_directory is
# needed to create the empty extensions directory (but if any are installed, then
# gb_Package_add_empty_directory would cause errors during CustomTarget_instsetoo_native/install, as
# the directory is not empty in that case):
ifeq ($(filter CT2N DICTIONARIES LANGUAGETOOL,$(BUILD_TYPE))$(ENABLE_MEDIAWIKI)$(NUMBERTEXT_EXTENSION_PACK)$(ENABLE_JAVA),)
# Check if any bundled extensions are installed; if none are installed, then
# gb_Package_add_empty_directory is needed to create the empty extensions directory (but if any are
# installed, then gb_Package_add_empty_directory would cause errors during
# CustomTarget_instsetoo_native/install, as the directory is not empty in that case):
ifeq ($(filter DICTIONARIES,$(BUILD_TYPE))$(WITH_EXTRA_EXTENSIONS)$(ENABLE_MEDIAWIKI),)
$(eval $(call gb_Package_add_empty_directory,setup_native_packinfo,$(LIBO_SHARE_FOLDER)/extensions))
endif