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
/officorr
))
12 extras_TEMPLATES_OFFICORR
:= \
13 Modern_business_letter_sans_serif \
14 Modern_business_letter_serif \
17 extras_OFFICORR_XMLFILES
:= \
18 Modern_business_letter_sans_serif
/content.xml \
19 Modern_business_letter_sans_serif
/manifest.rdf \
20 Modern_business_letter_sans_serif
/META-INF
/manifest.xml \
21 Modern_business_letter_sans_serif
/meta.xml \
22 Modern_business_letter_sans_serif
/styles.xml \
23 Modern_business_letter_sans_serif
/Thumbnails
/thumbnail.png \
24 Modern_business_letter_serif
/content.xml \
25 Modern_business_letter_serif
/manifest.rdf \
26 Modern_business_letter_serif
/META-INF
/manifest.xml \
27 Modern_business_letter_serif
/meta.xml \
28 Modern_business_letter_serif
/styles.xml \
29 Modern_business_letter_serif
/Thumbnails
/thumbnail.png \
32 extras_OFFICORR_MIMETYPEFILES
:= $(foreach atexts
,$(extras_TEMPLATES_OFFICORR
),$(atexts
)/mimetype
)
35 $(call gb_CustomTarget_get_target
,extras
/source
/templates
/officorr
) : \
36 $(foreach atexts
,$(extras_TEMPLATES_OFFICORR
),$(call gb_CustomTarget_get_workdir
,extras
/source
/templates
/officorr
)/$(atexts
).ott
)
38 $(call gb_CustomTarget_get_workdir
,extras
/source
/templates
/officorr
)/%/mimetype
: $(SRCDIR
)/extras
/source
/templates
/officorr
/%/mimetype
39 $(call gb_Output_announce
,templates
/officorr
/$*/mimetype
,$(true
),CPY
,1)
42 $(call gb_CustomTarget_get_workdir
,extras
/source
/templates
/officorr
)/%.jpg
: $(SRCDIR
)/extras
/source
/templates
/officorr
/%.jpg
43 $(call gb_Output_announce
,templates
/officorr
/$*.jpg
,$(true
),CPY
,1)
46 $(call gb_CustomTarget_get_workdir
,extras
/source
/templates
/officorr
)/%.rdf
: $(SRCDIR
)/extras
/source
/templates
/officorr
/%.rdf
47 $(call gb_Output_announce
,templates
/officorr
/$*.rdf
,$(true
),CPY
,1)
50 $(call gb_CustomTarget_get_workdir
,extras
/source
/templates
/officorr
)/%.png
: $(SRCDIR
)/extras
/source
/templates
/officorr
/%.png
51 $(call gb_Output_announce
,templates
/officorr
/$*.png
,$(true
),CPY
,1)
54 $(call gb_CustomTarget_get_workdir
,extras
/source
/templates
/officorr
)/%.svg
: $(SRCDIR
)/extras
/source
/templates
/officorr
/%.svg
55 $(call gb_Output_announce
,templates
/officorr
/$*.svg
,$(true
),CPY
,1)
58 $(call gb_CustomTarget_get_workdir
,extras
/source
/templates
/officorr
)/%.svm
: $(SRCDIR
)/extras
/source
/templates
/officorr
/%.svm
59 $(call gb_Output_announce
,templates
/officorr
/$*.svm
,$(true
),CPY
,1)
62 $(call gb_CustomTarget_get_workdir
,extras
/source
/templates
/officorr
)/%.xml
: $(SRCDIR
)/extras
/source
/templates
/officorr
/%.xml \
63 |
$(call gb_ExternalExecutable_get_dependencies
,xsltproc
)
64 $(call gb_Output_announce
,templates
/officorr
/$*.xml
,$(true
),XSL
,1)
65 $(call gb_ExternalExecutable_get_command
,xsltproc
) --nonet
-o
$@
$(SRCDIR
)/extras
/util
/compact.xsl
$<
67 $(call gb_CustomTarget_get_workdir
,extras
/source
/templates
/officorr
)/%.ott
:
68 $(call gb_Output_announce
,templates
/officorr
/$*.ott
,$(true
),ZIP
,2)
69 $(call gb_Helper_abbreviate_dirs
,\
70 cd
$(EXTRAS_OFFICORR_DIR
) && \
71 zip
-q0X
--filesync
--must-match
$@
$(EXTRAS_OFFICORR_MIMEFILES_FILTER
) && \
72 zip
-qrX
--must-match
$@
$(EXTRAS_OFFICORR_XMLFILES_FILTER
) \
75 define extras_Tplofficorr_make_file_deps
76 $(call gb_CustomTarget_get_workdir
,$(1))/$(2) : $(SRCDIR
)/$(1)/$(2) \
77 |
$(dir $(call gb_CustomTarget_get_workdir
,$(1))/$(2)).
dir
81 define extras_Tplofficorr_make_zip_deps
82 $(call gb_CustomTarget_get_workdir
,$(1))/$(2) : \
83 $(addprefix $(call gb_CustomTarget_get_workdir
,$(1))/,$(filter $(3)/%,$(extras_OFFICORR_MIMETYPEFILES
) $(extras_OFFICORR_XMLFILES
))) \
84 |
$(dir $(call gb_CustomTarget_get_workdir
,$(1))/$(2)).
dir
86 $(call gb_CustomTarget_get_workdir
,$(1))/$(2) : \
87 EXTRAS_OFFICORR_MIMEFILES_FILTER
:= $(foreach file
,$(filter $(3)/%,$(extras_OFFICORR_MIMETYPEFILES
)),$(subst $(3)/,,$(file
)))
88 $(call gb_CustomTarget_get_workdir
,$(1))/$(2) : \
89 EXTRAS_OFFICORR_XMLFILES_FILTER
:= $(foreach file
,$(filter $(3)/%,$(extras_OFFICORR_XMLFILES
)),$(subst $(3)/,,$(file
)))
90 $(call gb_CustomTarget_get_workdir
,$(1))/$(2) : \
91 EXTRAS_OFFICORR_DIR
:= $(call gb_CustomTarget_get_workdir
,$(1))/$(3)
95 $(eval
$(foreach file
,$(extras_OFFICORR_MIMETYPEFILES
) $(extras_OFFICORR_XMLFILES
),\
96 $(call extras_Tplofficorr_make_file_deps
,extras
/source
/templates
/officorr
,$(file
)) \
99 $(eval
$(foreach atexts
,$(extras_TEMPLATES_OFFICORR
),\
100 $(call extras_Tplofficorr_make_zip_deps
,extras
/source
/templates
/officorr
,$(atexts
).ott
,$(atexts
)) \
103 # vim: set noet sw=4 ts=4: