poppler: Upgrade 24.05.0
[LibreOffice.git] / extras / CustomTarget_autotextuser.mk
blobf81fb07250ad2fb6d0fc4a10c4b964ca2d652f3e
1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
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 $(eval $(call gb_CustomTarget_CustomTarget,extras/source/autotext/user))
12 extras_AUTOTEXTUSER_XMLFILES := \
13 mytexts/BlockList.xml \
14 mytexts/META-INF/manifest.xml \
16 # param: autotext-base (e.g. mytexts)
17 extras_AUTOTEXTUSER_XMLFILES_RELATIVE = $(subst $(1)/,,$(filter $(1)/%,$(extras_AUTOTEXTUSER_XMLFILES)))
19 .SECONDEXPANSION:
20 # secondexpansion since the patterns not just cover a filename portion, but also include a
21 # directory portion withdifferent number of elements
22 $(gb_CustomTarget_workdir)/extras/source/autotext/user/%/mimetype : \
23 | $$(dir $(gb_CustomTarget_workdir)/extras/source/autotext/user/$$*/mimetype).dir
24 $(call gb_Output_announce,autotext/user/$*/mimetype,$(true),TCH,1)
25 $(call gb_Trace_StartRange,autotext/user/$*/mimetype,TCH)
26 touch $@
27 $(call gb_Trace_EndRange,autotext/user/$*/mimetype,TCH)
29 $(gb_CustomTarget_workdir)/extras/source/autotext/user/%.xml : $(SRCDIR)/extras/source/autotext/%.xml \
30 | $(call gb_ExternalExecutable_get_dependencies,xsltproc) \
31 $$(dir $(gb_CustomTarget_workdir)/extras/source/autotext/user/$$*.xml).dir
32 $(call gb_Output_announce,autotext/user/$*.xml,$(true),XSL,1)
33 $(call gb_Trace_StartRange,autotext/user/$*.xml,XSL)
34 $(call gb_ExternalExecutable_get_command,xsltproc) --nonet -o $@ $(SRCDIR)/extras/util/compact.xsl $<
35 $(call gb_Trace_EndRange,autotext/user/$*.xml,XSL)
37 $(gb_CustomTarget_workdir)/extras/source/autotext/user/%.bau : \
38 $$(addprefix $(gb_CustomTarget_workdir)/extras/source/autotext/user/$$*/,\
39 mimetype $$(call extras_AUTOTEXTUSER_XMLFILES_RELATIVE,$$*))
40 $(call gb_Output_announce,autotext/user/$*.bau,$(true),ZIP,2)
41 $(call gb_Trace_StartRange,autotext/user/$*.bau,ZIP)
42 $(call gb_Helper_abbreviate_dirs,\
43 cd $(dir $<) && \
44 $(call gb_Helper_wsl_path,\
45 $(WSL) zip -q0X --filesync --must-match $@ mimetype && \
46 $(WSL) zip -qrX --must-match $@ $(call extras_AUTOTEXTUSER_XMLFILES_RELATIVE,$*)) \
48 $(call gb_Trace_EndRange,autotext/user/$*.bau,ZIP)
50 # vim: set noet sw=4 ts=4: