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
:= \
15 CV
/META-INF
/manifest.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
)))
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
)
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
,\
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: