diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-09-02 08:15:01 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-09-02 12:12:29 +0200 |
commit | 5aa8e7ef07229d48cb719a5f3f01c9a7fa445554 (patch) | |
tree | f07539093ab42a5d5b398b33db5d44ded978f7db /solenv/gbuild | |
parent | b392d0a25e229f305497ab5f9f084b71b24cc387 (diff) |
Fix setting SAL_NON_APPLICATION_FONT_USE
...after a342b72f4218cd617aa6fb413fcf5fbb182c316f "gbuild: set
SAL_NON_APPLICATION_FONT_USE in gb_CppunitTest_use_more_fonts" had caused e.g.
CppunitTest_vcl_pdfexport to be executed with merely
SAL_NON_APPLICATION_FONT_USE=deny rather than the stronger
SAL_NON_APPLICATION_FONT_USE=abort that vcl/CppunitTest_vcl_pdfexport.mk asked
for.
So introduce a dedicated gb_CppunitTest_set_non_application_font_use that
accumulates the requested modes and then selects the strongest requested one
("allow" over "abort" over "deny"). That also means we can go back to model
"allow" with an unset SAL_NON_APPLICATION_FONT_USE env var.
Change-Id: I32ba0a94c1965f0e3336e676b17f4f5efb85efce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139251
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'solenv/gbuild')
-rw-r--r-- | solenv/gbuild/CppunitTest.mk | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk index fbfc3f30aacb..b16e3d0e5417 100644 --- a/solenv/gbuild/CppunitTest.mk +++ b/solenv/gbuild/CppunitTest.mk @@ -132,6 +132,9 @@ else $(if $(gb_CppunitTest__vcl_no_svp), \ $(filter-out SAL_USE_VCLPLUGIN=svp,$(gb_TEST_ENV_VARS)),$(gb_TEST_ENV_VARS)) \ $(EXTRA_ENV_VARS) \ + $(if $(filter allow,$(NON_APPLICATION_FONT_USE)),, \ + $(if $(filter abort,$(NON_APPLICATION_FONT_USE)),SAL_NON_APPLICATION_FONT_USE=abort, \ + $(if $(filter deny,$(NON_APPLICATION_FONT_USE)),SAL_NON_APPLICATION_FONT_USE=deny))) \ $(if $(filter gdb,$(gb_CppunitTest_GDBTRACE)),,$(gb_CppunitTest_CPPTESTPRECOMMAND)) \ $(if $(G_SLICE),G_SLICE=$(G_SLICE)) \ $(if $(GLIBCXX_FORCE_NEW),GLIBCXX_FORCE_NEW=$(GLIBCXX_FORCE_NEW)) \ @@ -198,6 +201,7 @@ $(call gb_CppunitTest_get_target,$(1)) : UNO_SERVICES := $(call gb_CppunitTest_get_target,$(1)) : UNO_TYPES := $(call gb_CppunitTest_get_target,$(1)) : HEADLESS := --headless $(call gb_CppunitTest_get_target,$(1)) : EXTRA_ENV_VARS := +$(call gb_CppunitTest_get_target,$(1)) : NON_APPLICATION_FONT_USE := $$(eval $$(call gb_Module_register_target,$(call gb_CppunitTest_get_target,$(1)),$(call gb_CppunitTest_get_clean_target,$(1)))) $(call gb_Helper_make_userfriendly_targets,$(1),CppunitTest) @@ -383,11 +387,17 @@ $(call gb_CppunitTest_get_target,$(1)) : $(call gb_Executable_get_target,$(2)) endef +# One of allow, deny, abort: +define gb_CppunitTest_set_non_application_font_use +$(call gb_CppunitTest_get_target,$(1)) : NON_APPLICATION_FONT_USE += $(2) + +endef + define gb_CppunitTest_use_more_fonts ifneq ($(filter MORE_FONTS,$(BUILD_TYPE)),) $(call gb_CppunitTest_get_target,$(1)) : \ $(foreach font,$(gb_Package_MODULE_ooo_fonts),$(call gb_Package_get_target,$(font))) -$(call gb_CppunitTest_get_target,$(1)) : EXTRA_ENV_VARS := SAL_NON_APPLICATION_FONT_USE=deny +$(call gb_CppunitTest_set_non_application_font_use,$(1),deny) endif endef |