1# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t; fill-column: 100 -*-
2#
3# This file is part of the LibreOffice project.
4#
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/.
8#
9
10$(eval $(call gb_CustomTarget_CustomTarget,extras/fontconfig))
11
12$(call gb_CustomTarget_get_workdir,extras/fontconfig)/fc_local.conf: \
13    $(SRCDIR)/extras/source/truetype/symbol/fc_local.snippet \
14    $(SRCDIR)/extras/CustomTarget_fontconfig.mk \
15    | $(call gb_CustomTarget_get_workdir,extras/fontconfig)/.dir
16
17ifneq ($(filter MORE_FONTS,$(BUILD_TYPE)),)
18$(call gb_CustomTarget_get_workdir,extras/fontconfig)/fc_local.conf: \
19    $(SRCDIR)/external/more_fonts/fc_local.snippet
20endif
21
22$(call gb_CustomTarget_get_workdir,extras/fontconfig)/fc_local.conf:
23	printf '<?xml version="1.0"?>\n<!DOCTYPE fontconfig SYSTEM "/etc/fonts/conf.d/fonts.dtd">\n<fontconfig>\n' >$@
24	cat $(SRCDIR)/extras/source/truetype/symbol/fc_local.snippet >>$@
25ifneq ($(filter MORE_FONTS,$(BUILD_TYPE)),)
26	cat $(SRCDIR)/external/more_fonts/fc_local.snippet >>$@
27endif
28	printf '</fontconfig>\n' >>$@
29
30# vim: set noet sw=4 ts=4:
31