diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2022-01-08 06:47:02 +0100 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2022-01-08 12:26:30 +0100 |
commit | ed1aa172f8807ee479e4f529df49d19c13a8bc86 (patch) | |
tree | 61352b390a5be1575d5c07b509b26889187cc90a /solenv | |
parent | 92a90cf5ccb998d2fcc77a62bb971534e410cdec (diff) |
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>
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/Module_solenv.mk | 2 | ||||
-rw-r--r-- | solenv/gbuild/Conditions.mk | 19 | ||||
-rw-r--r-- | solenv/gbuild/extensions/pre_BuildTools.mk | 2 | ||||
-rw-r--r-- | solenv/gbuild/platform/unxgcc.mk | 2 |
4 files changed, 15 insertions, 10 deletions
diff --git a/solenv/Module_solenv.mk b/solenv/Module_solenv.mk index 1c2793c104bf..a26775f71083 100644 --- a/solenv/Module_solenv.mk +++ b/solenv/Module_solenv.mk @@ -16,7 +16,7 @@ $(eval $(call gb_Module_add_targets_for_build,solenv,\ ifeq (,$(LOCKFILE)) $(eval $(call gb_Module_add_targets_for_build,solenv,\ - $(call gb_CondBuildLockfile,Executable_lockfile) \ + $(call gb_CondExeLockfile,Executable_lockfile) \ )) endif diff --git a/solenv/gbuild/Conditions.mk b/solenv/gbuild/Conditions.mk index f405ab86308b..0a7b88969557 100644 --- a/solenv/gbuild/Conditions.mk +++ b/solenv/gbuild/Conditions.mk @@ -7,15 +7,16 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # -define gb_CondBuildUnopkg -$(if $(and $(filter DESKTOP,$(BUILD_TYPE)),$(if $(DISABLE_DYNLOADING),,$(true))),$(1),$(2)) -endef +# IMPORTANT NOTE: make sure, the "else" part works as expected. This normally +# means, that the condition ends with "$(1),$(2))" or the reverse. It should +# 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)) endef -define gb_CondBuildRegistryTools +define gb_CondExeRegistryTools $(if $(or $(DISABLE_DYNLOADING),$(ENABLE_MACOSX_SANDBOX)),$(2),$(1)) endef @@ -27,8 +28,12 @@ define gb_CondExeUno $(if $(and $(filter DESKTOP,$(BUILD_TYPE)),$(if $(DISABLE_DYNLOADING),,$(true))),$(1),$(2)) endef -define gb_CondSalTextEncodingLibrary -$(if $(filter ANDROID,$(OS)),,$(if $(DISABLE_DYNLOADING),$(2),$(1))) +define gb_CondExeUnopkg +$(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 # vim: set noet sw=4 ts=4: diff --git a/solenv/gbuild/extensions/pre_BuildTools.mk b/solenv/gbuild/extensions/pre_BuildTools.mk index e7602c2d7089..0a83545cf748 100644 --- a/solenv/gbuild/extensions/pre_BuildTools.mk +++ b/solenv/gbuild/extensions/pre_BuildTools.mk @@ -24,7 +24,7 @@ gb_BUILD_TOOLS_executables = \ helpex \ idxdict \ javamaker \ - $(call gb_CondBuildLockfile,lockfile) \ + $(call gb_CondExeLockfile,lockfile) \ makedepend \ propex \ saxparser \ diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk index 3a7aba87a760..684ab7695f77 100644 --- a/solenv/gbuild/platform/unxgcc.mk +++ b/solenv/gbuild/platform/unxgcc.mk @@ -105,7 +105,7 @@ gb_LinkTarget__Lock := $(WORKDIR)/LinkTarget/link.lock # No newline or space before endef! define gb_LinkTarget__WantLock $(if $(strip $(and \ - $(call gb_CondBuildLockfile,$(true)), \ + $(call gb_CondExeLockfile,$(true)), \ $(filter-out Executable/lockfile,$(1)), \ $(if $(filter FUZZERS,$(BUILD_TYPE)),,$(DISABLE_DYNLOADING)), \ $(filter CppunitTest Executable,$(TARGETTYPE)) \ |