poppler: Upgrade 24.05.0
[LibreOffice.git] / solenv / gbuild / TestHelpers.mk
blob2ce814ecdd3095b07975e69e2690be6c93873feb
1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t; fill-column: 100 -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 # This makes sure that more_fonts, opensymbol and fontconfig is installed
11 define gb_TestHelpers_use_more_fonts
13 ifneq ($(MAKECMDGOALS),clean)
14 ifneq (,$$(filter MORE_FONTS,$$(BUILD_TYPE)))
15 ifeq (,$$(filter more_fonts,$$(gb_Module_ALLMODULES)))
17 # the gbuildtojson / gbuild self-test runs tests "out of scope", but itself depends
18 # on more fonts, so we must ignore the font tests for these tests.
19 ifeq (,$$(gb_IGNORE_MORE_FONTS))
21 # we are in single module mode -> fail test on missing fonts from filelists!
22 # include Module_more_font.mk fails with strange error messages,
23 # so we can't check if the more_fonts filelists are up-to-date, so just assume it.
25 $(1): \
26 $$(foreach font,$$(gb_Package_MODULE_ooo_fonts), \
27 $$(if $$(wildcard $$(call gb_Package_get_target,$$(font))), \
28 $$(foreach file,$$(shell cat $$(call gb_Package_get_target,$$(font))), \
29 $$(if $$(wildcard $$(file)),,$$(error Missing font -> run make more_fonts extras))), \
30 $$(error Missing font filelist -> run make more_fonts extras)))
31 endif
32 else
33 # we're in global run mode (full knowledge) -> depend directly on the delivered fonts!
35 $(1): \
36 $$(foreach package,$$(subst ExternalPackage_,,$$(filter ExternalPackage_%,$$(call gb_Module_get_classnames,more_fonts))), \
37 $$(call gb_Package_get_files,$$(package))) \
38 $$(call gb_Package_get_files,extras_font) \
39 $$(if $$(filter Package_extras_fontconfig,$$(call gb_Module_get_classnames,extras)), \
40 $$(call gb_Package_get_files,extras_fontconfig))
41 endif
42 endif
43 endif
45 endef
47 # vim: set noet sw=4 ts=4: