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
/offimisc
))
12 extras_TEMPLATES_OFFIMISC
:= \
13 Businesscard-with-logo \
16 extras_OFFIMISC_XMLFILES
:= \
17 Businesscard-with-logo
/content.xml \
18 Businesscard-with-logo
/manifest.rdf \
19 Businesscard-with-logo
/META-INF
/manifest.xml \
20 Businesscard-with-logo
/meta.xml \
21 Businesscard-with-logo
/Pictures
/10000201000001F4000000A0108F3F06.png \
22 Businesscard-with-logo
/settings.xml \
23 Businesscard-with-logo
/styles.xml \
24 Businesscard-with-logo
/Thumbnails
/thumbnail.png \
27 extras_OFFIMISC_MIMETYPEFILES
:= $(foreach atexts
,$(extras_TEMPLATES_OFFIMISC
),$(atexts
)/mimetype
)
30 $(call gb_CustomTarget_get_target
,extras
/source
/templates
/offimisc
) : \
31 $(foreach atexts
,$(extras_TEMPLATES_OFFIMISC
),$(call gb_CustomTarget_get_workdir
,extras
/source
/templates
/offimisc
)/$(atexts
).ott
)
33 $(call gb_CustomTarget_get_workdir
,extras
/source
/templates
/offimisc
)/%/mimetype
: $(SRCDIR
)/extras
/source
/templates
/offimisc
/%/mimetype
34 $(call gb_Output_announce
,templates
/offimisc
/$*/mimetype
,$(true
),CPY
,1)
37 $(call gb_CustomTarget_get_workdir
,extras
/source
/templates
/offimisc
)/%.jpg
: $(SRCDIR
)/extras
/source
/templates
/offimisc
/%.jpg
38 $(call gb_Output_announce
,templates
/offimisc
/$*.jpg
,$(true
),CPY
,1)
41 $(call gb_CustomTarget_get_workdir
,extras
/source
/templates
/offimisc
)/%.png
: $(SRCDIR
)/extras
/source
/templates
/offimisc
/%.png
42 $(call gb_Output_announce
,templates
/offimisc
/$*.png
,$(true
),CPY
,1)
45 $(call gb_CustomTarget_get_workdir
,extras
/source
/templates
/offimisc
)/%.rdf
: $(SRCDIR
)/extras
/source
/templates
/offimisc
/%.rdf
46 $(call gb_Output_announce
,templates
/offimisc
/$*.rdf
,$(true
),CPY
,1)
49 $(call gb_CustomTarget_get_workdir
,extras
/source
/templates
/offimisc
)/%.svg
: $(SRCDIR
)/extras
/source
/templates
/offimisc
/%.svg
50 $(call gb_Output_announce
,templates
/offimisc
/$*.svg
,$(true
),CPY
,1)
53 $(call gb_CustomTarget_get_workdir
,extras
/source
/templates
/offimisc
)/%.svm
: $(SRCDIR
)/extras
/source
/templates
/offimisc
/%.svm
54 $(call gb_Output_announce
,templates
/offimisc
/$*.svm
,$(true
),CPY
,1)
57 $(call gb_CustomTarget_get_workdir
,extras
/source
/templates
/offimisc
)/%.xml
: $(SRCDIR
)/extras
/source
/templates
/offimisc
/%.xml \
58 |
$(call gb_ExternalExecutable_get_dependencies
,xsltproc
)
59 $(call gb_Output_announce
,templates
/offimisc
/$*.xml
,$(true
),XSL
,1)
60 $(call gb_ExternalExecutable_get_command
,xsltproc
) --nonet
-o
$@
$(SRCDIR
)/extras
/util
/compact.xsl
$<
62 $(call gb_CustomTarget_get_workdir
,extras
/source
/templates
/offimisc
)/%.ott
:
63 $(call gb_Output_announce
,templates
/offimisc
/$*.ott
,$(true
),ZIP
,2)
64 $(call gb_Helper_abbreviate_dirs
,\
65 cd
$(EXTRAS_OFFIMISC_DIR
) && \
66 zip
-q0X
--filesync
--must-match
$@
$(EXTRAS_OFFIMISC_MIMEFILES_FILTER
) && \
67 zip
-qrX
--must-match
$@
$(EXTRAS_OFFIMISC_XMLFILES_FILTER
) \
70 define extras_Tploffimisc_make_file_deps
71 $(call gb_CustomTarget_get_workdir
,$(1))/$(2) : $(SRCDIR
)/$(1)/$(2) \
72 |
$(dir $(call gb_CustomTarget_get_workdir
,$(1))/$(2)).
dir
76 define extras_Tploffimisc_make_zip_deps
77 $(call gb_CustomTarget_get_workdir
,$(1))/$(2) : \
78 $(addprefix $(call gb_CustomTarget_get_workdir
,$(1))/,$(filter $(3)/%,$(extras_OFFIMISC_MIMETYPEFILES
) $(extras_OFFIMISC_XMLFILES
))) \
79 |
$(dir $(call gb_CustomTarget_get_workdir
,$(1))/$(2)).
dir
81 $(call gb_CustomTarget_get_workdir
,$(1))/$(2) : \
82 EXTRAS_OFFIMISC_MIMEFILES_FILTER
:= $(foreach file
,$(filter $(3)/%,$(extras_OFFIMISC_MIMETYPEFILES
)),$(subst $(3)/,,$(file
)))
83 $(call gb_CustomTarget_get_workdir
,$(1))/$(2) : \
84 EXTRAS_OFFIMISC_XMLFILES_FILTER
:= $(foreach file
,$(filter $(3)/%,$(extras_OFFIMISC_XMLFILES
)),$(subst $(3)/,,$(file
)))
85 $(call gb_CustomTarget_get_workdir
,$(1))/$(2) : \
86 EXTRAS_OFFIMISC_DIR
:= $(call gb_CustomTarget_get_workdir
,$(1))/$(3)
90 $(eval
$(foreach file
,$(extras_OFFIMISC_MIMETYPEFILES
) $(extras_OFFIMISC_XMLFILES
),\
91 $(call extras_Tploffimisc_make_file_deps
,extras
/source
/templates
/offimisc
,$(file
)) \
94 $(eval
$(foreach atexts
,$(extras_TEMPLATES_OFFIMISC
),\
95 $(call extras_Tploffimisc_make_zip_deps
,extras
/source
/templates
/offimisc
,$(atexts
).ott
,$(atexts
)) \
98 # vim: set noet sw=4 ts=4: