Fix typo
[LibreOffice.git] / extras / CustomTarget_autotextuser.mk
blobe89e92d97a78c502c10c61e1abfd95b81f0290e0
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 $(call gb_CustomTarget_get_workdir,extras/source/autotext/user)/%/mimetype : \
23 | $$(dir $(call gb_CustomTarget_get_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 $(call gb_CustomTarget_get_workdir,extras/source/autotext/user)/%.xml : $(SRCDIR)/extras/source/autotext/%.xml \
30 | $(call gb_ExternalExecutable_get_dependencies,xsltproc) \
31 $$(dir $(call gb_CustomTarget_get_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 $(call gb_CustomTarget_get_workdir,extras/source/autotext/user)/%.bau : \
38 $$(addprefix $(call gb_CustomTarget_get_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 zip -q0X --filesync --must-match $@ mimetype && \
45 zip -qrX --must-match $@ $(call extras_AUTOTEXTUSER_XMLFILES_RELATIVE,$*) \
47 $(call gb_Trace_EndRange,autotext/user/$*.bau,ZIP)
49 # vim: set noet sw=4 ts=4: