Unify condition names and fix "else" paths
Drop Build prefix and settle on Lib and Exe prefixes. Also add a note about the "else" part of the condition and fix offenders. While at it, define COND_LIB_SAL_TEXTENC to be used by sal to prevent diverting coditions in build and cxx code. Change-Id: I944587ca1ccbe46b765d1a631a7214c8126fe951 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128136 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
This commit is contained in:
@@ -44,7 +44,7 @@ $(eval $(call gb_Helper_register_executables,NONE, \
|
|||||||
$(if $(filter iOS,$(OS)),LibreOffice) \
|
$(if $(filter iOS,$(OS)),LibreOffice) \
|
||||||
lngconvex \
|
lngconvex \
|
||||||
localize \
|
localize \
|
||||||
$(call gb_CondBuildLockfile,lockfile) \
|
$(call gb_CondExeLockfile,lockfile) \
|
||||||
makedepend \
|
makedepend \
|
||||||
mbsdiff \
|
mbsdiff \
|
||||||
osl_process_child \
|
osl_process_child \
|
||||||
@@ -147,7 +147,7 @@ $(eval $(call gb_Helper_register_executables_for_install,OOO,brand, \
|
|||||||
$(call gb_Helper_optional,FUZZERS,dbffuzzer) \
|
$(call gb_Helper_optional,FUZZERS,dbffuzzer) \
|
||||||
$(if $(filter-out ANDROID HAIKU iOS MACOSX WNT,$(OS)),oosplash) \
|
$(if $(filter-out ANDROID HAIKU iOS MACOSX WNT,$(OS)),oosplash) \
|
||||||
soffice_bin \
|
soffice_bin \
|
||||||
$(call gb_CondBuildUnopkg, \
|
$(call gb_CondExeUnopkg, \
|
||||||
unopkg_bin \
|
unopkg_bin \
|
||||||
$(if $(filter WNT,$(OS)), \
|
$(if $(filter WNT,$(OS)), \
|
||||||
unopkg \
|
unopkg \
|
||||||
@@ -235,7 +235,7 @@ endif
|
|||||||
|
|
||||||
$(eval $(call gb_Helper_register_executables_for_install,UREBIN,ure,\
|
$(eval $(call gb_Helper_register_executables_for_install,UREBIN,ure,\
|
||||||
$(if $(and $(ENABLE_JAVA),$(filter-out HAIKU MACOSX WNT,$(OS)),$(filter DESKTOP,$(BUILD_TYPE))),javaldx) \
|
$(if $(and $(ENABLE_JAVA),$(filter-out HAIKU MACOSX WNT,$(OS)),$(filter DESKTOP,$(BUILD_TYPE))),javaldx) \
|
||||||
$(call gb_CondBuildRegistryTools, \
|
$(call gb_CondExeRegistryTools, \
|
||||||
regmerge \
|
regmerge \
|
||||||
regview \
|
regview \
|
||||||
) \
|
) \
|
||||||
@@ -603,7 +603,7 @@ $(eval $(call gb_Helper_register_libraries_for_install,PRIVATELIBS_URE,ure, \
|
|||||||
))
|
))
|
||||||
|
|
||||||
$(eval $(call gb_Helper_register_plugins_for_install,PRIVATELIBS_URE,ure, \
|
$(eval $(call gb_Helper_register_plugins_for_install,PRIVATELIBS_URE,ure, \
|
||||||
$(call gb_CondSalTextEncodingLibrary,sal_textenc) \
|
$(call gb_CondLibSalTextenc,sal_textenc) \
|
||||||
))
|
))
|
||||||
|
|
||||||
$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
|
$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
|
||||||
@@ -638,7 +638,7 @@ $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
|
|||||||
$(call gb_Helper_optional,XMLHELP,ucpchelp1) \
|
$(call gb_Helper_optional,XMLHELP,ucpchelp1) \
|
||||||
ucphier1 \
|
ucphier1 \
|
||||||
ucppkg1 \
|
ucppkg1 \
|
||||||
$(call gb_CondBuildUnopkg,unopkgapp) \
|
$(call gb_CondExeUnopkg,unopkgapp) \
|
||||||
xmlsecurity \
|
xmlsecurity \
|
||||||
xsec_xmlsec \
|
xsec_xmlsec \
|
||||||
xstor \
|
xstor \
|
||||||
|
@@ -3772,7 +3772,7 @@ endif # SYSTEM_JFREEREPORT
|
|||||||
|
|
||||||
define gb_Executable__register_bestreversemap
|
define gb_Executable__register_bestreversemap
|
||||||
$(call gb_Executable_add_runtime_dependencies,bestreversemap,\
|
$(call gb_Executable_add_runtime_dependencies,bestreversemap,\
|
||||||
$(call gb_CondSalTextEncodingLibrary,$(call gb_Library_get_target_for_build,sal_textenc)) \
|
$(call gb_CondLibSalTextenc,$(call gb_Library_get_target_for_build,sal_textenc)) \
|
||||||
)
|
)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
@@ -3789,7 +3789,7 @@ endef
|
|||||||
|
|
||||||
define gb_Executable__register_cppumaker
|
define gb_Executable__register_cppumaker
|
||||||
$(call gb_Executable_add_runtime_dependencies,cppumaker,\
|
$(call gb_Executable_add_runtime_dependencies,cppumaker,\
|
||||||
$(call gb_CondSalTextEncodingLibrary,$(call gb_Library_get_target,sal_textenc)) \
|
$(call gb_CondLibSalTextenc,$(call gb_Library_get_target,sal_textenc)) \
|
||||||
)
|
)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
@@ -33,11 +33,11 @@ $(eval $(call gb_Module_add_l10n_targets,desktop,\
|
|||||||
ifneq (,$(filter DESKTOP,$(BUILD_TYPE)))
|
ifneq (,$(filter DESKTOP,$(BUILD_TYPE)))
|
||||||
$(eval $(call gb_Module_add_targets,desktop,\
|
$(eval $(call gb_Module_add_targets,desktop,\
|
||||||
Executable_soffice_bin \
|
Executable_soffice_bin \
|
||||||
$(call gb_CondBuildUnopkg,Executable_unopkg_bin) \
|
$(call gb_CondExeUnopkg,Executable_unopkg_bin) \
|
||||||
$(if $(ENABLE_BREAKPAD),Executable_minidump_upload) \
|
$(if $(ENABLE_BREAKPAD),Executable_minidump_upload) \
|
||||||
Library_migrationoo2 \
|
Library_migrationoo2 \
|
||||||
Library_migrationoo3 \
|
Library_migrationoo3 \
|
||||||
$(call gb_CondBuildUnopkg,Library_unopkgapp) \
|
$(call gb_CondExeUnopkg,Library_unopkgapp) \
|
||||||
Package_scripts \
|
Package_scripts \
|
||||||
$(if $(ENABLE_PAGEIN), \
|
$(if $(ENABLE_PAGEIN), \
|
||||||
Pagein_calc \
|
Pagein_calc \
|
||||||
@@ -79,7 +79,7 @@ $(eval $(call gb_Module_add_targets,desktop,\
|
|||||||
Executable_sweb \
|
Executable_sweb \
|
||||||
Executable_swriter \
|
Executable_swriter \
|
||||||
Executable_unoinfo \
|
Executable_unoinfo \
|
||||||
$(call gb_CondBuildUnopkg, \
|
$(call gb_CondExeUnopkg, \
|
||||||
Executable_unopkg \
|
Executable_unopkg \
|
||||||
Executable_unopkg_com \
|
Executable_unopkg_com \
|
||||||
) \
|
) \
|
||||||
|
@@ -12,7 +12,7 @@ $(eval $(call gb_Package_Package,desktop_scripts_install,$(SRCDIR)/desktop/scrip
|
|||||||
ifeq (,$(filter MACOSX WNT,$(OS)))
|
ifeq (,$(filter MACOSX WNT,$(OS)))
|
||||||
|
|
||||||
$(eval $(call gb_Package_add_file,desktop_scripts_install,$(LIBO_BIN_FOLDER)/gdbtrace,gdbtrace))
|
$(eval $(call gb_Package_add_file,desktop_scripts_install,$(LIBO_BIN_FOLDER)/gdbtrace,gdbtrace))
|
||||||
ifneq (,$(call gb_CondBuildUnopkg,$(true)))
|
ifneq (,$(call gb_CondExeUnopkg,$(true)))
|
||||||
$(eval $(call gb_Package_add_file,desktop_scripts_install,$(LIBO_BIN_FOLDER)/unopkg,unopkg.sh))
|
$(eval $(call gb_Package_add_file,desktop_scripts_install,$(LIBO_BIN_FOLDER)/unopkg,unopkg.sh))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@@ -75,7 +75,7 @@ $(eval $(call gb_Executable_add_exception_objects,idlc,\
|
|||||||
# to something other than listed in Impl_getTextEncodingData, because osl_getThreadTextEncoding()
|
# to something other than listed in Impl_getTextEncodingData, because osl_getThreadTextEncoding()
|
||||||
# returns Windows ACP, calling FullTextEncodingData ctor which loads the not-yet-built library
|
# returns Windows ACP, calling FullTextEncodingData ctor which loads the not-yet-built library
|
||||||
$(call gb_Executable_add_runtime_dependencies,idlc, \
|
$(call gb_Executable_add_runtime_dependencies,idlc, \
|
||||||
$(call gb_Library_get_target,sal_textenc) \
|
$(call gb_CondLibSalTextenc,$(call gb_Library_get_target,sal_textenc)) \
|
||||||
)
|
)
|
||||||
|
|
||||||
# vim:set noet sw=4 ts=4:
|
# vim:set noet sw=4 ts=4:
|
||||||
|
@@ -11,7 +11,7 @@ $(eval $(call gb_Module_Module,registry))
|
|||||||
|
|
||||||
$(eval $(call gb_Module_add_targets,registry,\
|
$(eval $(call gb_Module_add_targets,registry,\
|
||||||
Library_reg \
|
Library_reg \
|
||||||
$(call gb_CondBuildRegistryTools, \
|
$(call gb_CondExeRegistryTools, \
|
||||||
Executable_regmerge \
|
Executable_regmerge \
|
||||||
Executable_regview \
|
Executable_regview \
|
||||||
StaticLibrary_registry_helper \
|
StaticLibrary_registry_helper \
|
||||||
|
@@ -33,6 +33,7 @@ $(eval $(call gb_Library_add_defs,sal,\
|
|||||||
-DRTL_OS="\"$(RTL_OS)\"" \
|
-DRTL_OS="\"$(RTL_OS)\"" \
|
||||||
-DRTL_ARCH="\"$(RTL_ARCH)\"" \
|
-DRTL_ARCH="\"$(RTL_ARCH)\"" \
|
||||||
-DSRCDIR="\"$(SRCDIR)\"" \
|
-DSRCDIR="\"$(SRCDIR)\"" \
|
||||||
|
$(call gb_CondLibSalTextenc,-DCOND_LIB_SAL_TEXTENC) \
|
||||||
))
|
))
|
||||||
|
|
||||||
$(eval $(call gb_Library_use_libraries,sal,\
|
$(eval $(call gb_Library_use_libraries,sal,\
|
||||||
@@ -132,7 +133,7 @@ $(eval $(call gb_Library_add_cxxflags,sal,\
|
|||||||
))
|
))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq (,$(call gb_CondSalTextEncodingLibrary,$(true)))
|
ifeq (,$(call gb_CondLibSalTextenc,$(true)))
|
||||||
$(eval $(call gb_Library_add_exception_objects,sal,\
|
$(eval $(call gb_Library_add_exception_objects,sal,\
|
||||||
sal/textenc/context \
|
sal/textenc/context \
|
||||||
sal/textenc/convertbig5hkscs \
|
sal/textenc/convertbig5hkscs \
|
||||||
|
@@ -14,7 +14,7 @@ $(eval $(call gb_Module_add_targets,sal,\
|
|||||||
$(if $(filter $(OS),ANDROID), \
|
$(if $(filter $(OS),ANDROID), \
|
||||||
Library_lo-bootstrap) \
|
Library_lo-bootstrap) \
|
||||||
Library_sal \
|
Library_sal \
|
||||||
$(call gb_CondSalTextEncodingLibrary,Library_sal_textenc) \
|
$(call gb_CondLibSalTextenc,Library_sal_textenc) \
|
||||||
))
|
))
|
||||||
|
|
||||||
ifneq (,$(filter DESKTOP,$(BUILD_TYPE)))
|
ifneq (,$(filter DESKTOP,$(BUILD_TYPE)))
|
||||||
|
@@ -351,7 +351,7 @@ ImplTextEncodingData const aImplJavaUtf8TextEncodingData
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
#if defined DISABLE_DYNLOADING || defined ANDROID
|
#ifndef COND_LIB_SAL_TEXTENC
|
||||||
|
|
||||||
extern "C" ImplTextEncodingData const * sal_getFullTextEncodingData(
|
extern "C" ImplTextEncodingData const * sal_getFullTextEncodingData(
|
||||||
rtl_TextEncoding); // from tables.cxx in sal_textenc library
|
rtl_TextEncoding); // from tables.cxx in sal_textenc library
|
||||||
|
@@ -16,7 +16,7 @@ $(eval $(call gb_Module_add_targets_for_build,solenv,\
|
|||||||
|
|
||||||
ifeq (,$(LOCKFILE))
|
ifeq (,$(LOCKFILE))
|
||||||
$(eval $(call gb_Module_add_targets_for_build,solenv,\
|
$(eval $(call gb_Module_add_targets_for_build,solenv,\
|
||||||
$(call gb_CondBuildLockfile,Executable_lockfile) \
|
$(call gb_CondExeLockfile,Executable_lockfile) \
|
||||||
))
|
))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@@ -7,15 +7,16 @@
|
|||||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
#
|
#
|
||||||
|
|
||||||
define gb_CondBuildUnopkg
|
# IMPORTANT NOTE: make sure, the "else" part works as expected. This normally
|
||||||
$(if $(and $(filter DESKTOP,$(BUILD_TYPE)),$(if $(DISABLE_DYNLOADING),,$(true))),$(1),$(2))
|
# means, that the condition ends with "$(1),$(2))" or the reverse. It should
|
||||||
endef
|
# just end in two (!) braces, otherwise you may need to use either the $(1)
|
||||||
|
# or the $(2) multiple times.
|
||||||
|
|
||||||
define gb_CondBuildLockfile
|
define gb_CondExeLockfile
|
||||||
$(if $(and $(filter-out ANDROID MACOSX iOS WNT,$(OS))),$(1),$(2))
|
$(if $(and $(filter-out ANDROID MACOSX iOS WNT,$(OS))),$(1),$(2))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define gb_CondBuildRegistryTools
|
define gb_CondExeRegistryTools
|
||||||
$(if $(or $(DISABLE_DYNLOADING),$(ENABLE_MACOSX_SANDBOX)),$(2),$(1))
|
$(if $(or $(DISABLE_DYNLOADING),$(ENABLE_MACOSX_SANDBOX)),$(2),$(1))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
@@ -27,8 +28,12 @@ define gb_CondExeUno
|
|||||||
$(if $(and $(filter DESKTOP,$(BUILD_TYPE)),$(if $(DISABLE_DYNLOADING),,$(true))),$(1),$(2))
|
$(if $(and $(filter DESKTOP,$(BUILD_TYPE)),$(if $(DISABLE_DYNLOADING),,$(true))),$(1),$(2))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define gb_CondSalTextEncodingLibrary
|
define gb_CondExeUnopkg
|
||||||
$(if $(filter ANDROID,$(OS)),,$(if $(DISABLE_DYNLOADING),$(2),$(1)))
|
$(if $(and $(filter DESKTOP,$(BUILD_TYPE)),$(if $(DISABLE_DYNLOADING),,$(true))),$(1),$(2))
|
||||||
|
endef
|
||||||
|
|
||||||
|
define gb_CondLibSalTextenc
|
||||||
|
$(if $(or $(filter ANDROID,$(OS)),$(DISABLE_DYNLOADING)),$(2),$(1))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# vim: set noet sw=4 ts=4:
|
# vim: set noet sw=4 ts=4:
|
||||||
|
@@ -24,7 +24,7 @@ gb_BUILD_TOOLS_executables = \
|
|||||||
helpex \
|
helpex \
|
||||||
idxdict \
|
idxdict \
|
||||||
javamaker \
|
javamaker \
|
||||||
$(call gb_CondBuildLockfile,lockfile) \
|
$(call gb_CondExeLockfile,lockfile) \
|
||||||
makedepend \
|
makedepend \
|
||||||
propex \
|
propex \
|
||||||
saxparser \
|
saxparser \
|
||||||
|
@@ -105,7 +105,7 @@ gb_LinkTarget__Lock := $(WORKDIR)/LinkTarget/link.lock
|
|||||||
# No newline or space before endef!
|
# No newline or space before endef!
|
||||||
define gb_LinkTarget__WantLock
|
define gb_LinkTarget__WantLock
|
||||||
$(if $(strip $(and \
|
$(if $(strip $(and \
|
||||||
$(call gb_CondBuildLockfile,$(true)), \
|
$(call gb_CondExeLockfile,$(true)), \
|
||||||
$(filter-out Executable/lockfile,$(1)), \
|
$(filter-out Executable/lockfile,$(1)), \
|
||||||
$(if $(filter FUZZERS,$(BUILD_TYPE)),,$(DISABLE_DYNLOADING)), \
|
$(if $(filter FUZZERS,$(BUILD_TYPE)),,$(DISABLE_DYNLOADING)), \
|
||||||
$(filter CppunitTest Executable,$(TARGETTYPE)) \
|
$(filter CppunitTest Executable,$(TARGETTYPE)) \
|
||||||
|
Reference in New Issue
Block a user