allow pretty names in --enable-macosx-code/package-signing
[LibreOffice.git] / extras / CustomTarget_tplpersonal.mk
blobb7d59b627b3a8429e45087b4a43f9f2b40330c8e
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/templates/personal))
12 extras_PERSONAL_XMLFILES := \
13 CV/content.xml \
14 CV/manifest.rdf \
15 CV/META-INF/manifest.xml \
16 CV/meta.xml \
17 CV/styles.xml \
18 CV/Thumbnails/thumbnail.png \
19 Resume1page/content.xml \
20 Resume1page/manifest.rdf \
21 Resume1page/META-INF/manifest.xml \
22 Resume1page/meta.xml \
23 Resume1page/styles.xml \
24 Resume1page/Thumbnails/thumbnail.png \
26 # param: style-base (e.g. Modern)
27 extras_PERSONAL_XMLFILES_RELATIVE = $(subst $(1)/,,$(filter $(1)/%,$(extras_PERSONAL_XMLFILES)))
29 .SECONDEXPANSION:
30 # secondexpansion since the patterns not just cover a filename portion, but also include a
31 # directory portion withdifferent number of elements
32 # copy regular files (mimetype, *.jpg, *.png, *.rdf, *.svg, *.svm, …)
33 $(call gb_CustomTarget_get_workdir,extras/source/templates/personal)/% : $(SRCDIR)/extras/source/templates/personal/% \
34 | $$(dir $(call gb_CustomTarget_get_workdir,extras/source/templates/personal)/$$*).dir
35 $(call gb_Output_announce,templates/personal/$*,$(true),CPY,1)
36 $(call gb_Trace_StartRange,templates/personal/$*,CPY)
37 cp $< $@
38 $(call gb_Trace_EndRange,templates/personal/$*,CPY)
40 $(call gb_CustomTarget_get_workdir,extras/source/templates/personal)/%.xml : $(SRCDIR)/extras/source/templates/personal/%.xml \
41 | $(call gb_ExternalExecutable_get_dependencies,xsltproc) \
42 $$(dir $(call gb_CustomTarget_get_workdir,extras/source/templates/personal)/$$*.xml).dir
43 $(call gb_Output_announce,templates/personal/$*.xml,$(true),XSL,1)
44 $(call gb_Trace_StartRange,templates/personal/$*.xml,XSL)
45 $(call gb_ExternalExecutable_get_command,xsltproc) --nonet -o $@ $(SRCDIR)/extras/util/compact.xsl $<
46 $(call gb_Trace_EndRange,templates/personal/$*.xml,XSL)
48 $(call gb_CustomTarget_get_workdir,extras/source/templates/personal)/%.ott : \
49 $$(addprefix $(call gb_CustomTarget_get_workdir,extras/source/templates/personal)/$$*/,\
50 mimetype $$(call extras_PERSONAL_XMLFILES_RELATIVE,$$*))
51 $(call gb_Output_announce,templates/personal/$*.ott,$(true),ZIP,2)
52 $(call gb_Trace_StartRange,templates/personal/$*.ott,ZIP)
53 $(call gb_Helper_abbreviate_dirs,\
54 cd $(dir $<) && \
55 zip -q0X --filesync --must-match $@ mimetype && \
56 zip -qrX --must-match $@ $(call extras_PERSONAL_XMLFILES_RELATIVE,$*) \
58 $(call gb_Trace_EndRange,templates/personal/$*.ott,ZIP)
60 # vim: set noet sw=4 ts=4: