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_TPLOFFIMISC_MIMETYPEFILES
:= $(foreach atexts
,$(extras_TEMPLATES_OFFIMISC
),$(atexts
)/mimetype
)
30 ifneq ($(sort $(foreach file
,$(extras_OFFIMISC_XMLFILES
),$(wordlist
1, 1, $(subst /, ,$(file
))))),$(sort $(extras_TEMPLATES_OFFIMISC
)))
31 $(call gb_Output_error
,defined template text do not match existing directories
)
34 $(call gb_CustomTarget_get_target
,extras
/source
/templates
/offimisc
) : \
35 $(foreach atexts
,$(extras_TEMPLATES_OFFIMISC
),$(call gb_CustomTarget_get_workdir
,extras
/source
/templates
/offimisc
)/$(atexts
).ott
)
37 $(call gb_CustomTarget_get_workdir
,extras
/source
/templates
/offimisc
)/%/mimetype
: $(SRCDIR
)/extras
/source
/templates
/offimisc
/%/mimetype
38 $(call gb_Output_announce
,$*/mimetype
,$(true
),CPY
,1)
41 $(call gb_CustomTarget_get_workdir
,extras
/source
/templates
/offimisc
)/%.jpg
: $(SRCDIR
)/extras
/source
/templates
/offimisc
/%.jpg
42 $(call gb_Output_announce
,$*.jpg
,$(true
),CPY
,1)
45 $(call gb_CustomTarget_get_workdir
,extras
/source
/templates
/offimisc
)/%.png
: $(SRCDIR
)/extras
/source
/templates
/offimisc
/%.png
46 $(call gb_Output_announce
,$*.png
,$(true
),CPY
,1)
49 $(call gb_CustomTarget_get_workdir
,extras
/source
/templates
/offimisc
)/%.rdf
: $(SRCDIR
)/extras
/source
/templates
/offimisc
/%.rdf
50 $(call gb_Output_announce
,$*.rdf
,$(true
),CPY
,1)
53 $(call gb_CustomTarget_get_workdir
,extras
/source
/templates
/offimisc
)/%.svg
: $(SRCDIR
)/extras
/source
/templates
/offimisc
/%.svg
54 $(call gb_Output_announce
,$*.svg
,$(true
),CPY
,1)
57 $(call gb_CustomTarget_get_workdir
,extras
/source
/templates
/offimisc
)/%.svm
: $(SRCDIR
)/extras
/source
/templates
/offimisc
/%.svm
58 $(call gb_Output_announce
,$*.svm
,$(true
),CPY
,1)
61 $(call gb_CustomTarget_get_workdir
,extras
/source
/templates
/offimisc
)/%.xml
: $(SRCDIR
)/extras
/source
/templates
/offimisc
/%.xml \
62 |
$(call gb_ExternalExecutable_get_dependencies
,xsltproc
)
63 $(call gb_Output_announce
,$*.xml
,$(true
),XSL
,1)
64 $(call gb_ExternalExecutable_get_command
,xsltproc
) --nonet
-o
$@
$(SRCDIR
)/extras
/util
/compact.xsl
$<
66 $(call gb_CustomTarget_get_workdir
,extras
/source
/templates
/offimisc
)/%.ott
:
67 $(call gb_Output_announce
,$*.ott
,$(true
),ZIP
,2)
68 $(call gb_Helper_abbreviate_dirs
,\
69 cd
$(EXTRAS_OFFIMISC_DIR
) && \
70 zip
-qrX
--filesync
--must-match
$@
$(EXTRAS_OFFIMISC_FILES
) \
73 define extras_Tploffimisc_make_file_deps
74 $(call gb_CustomTarget_get_workdir
,$(1))/$(2) : $(SRCDIR
)/$(1)/$(2) \
75 |
$(dir $(call gb_CustomTarget_get_workdir
,$(1))/$(2)).
dir
79 define extras_Tploffimisc_make_zip_deps
80 $(call gb_CustomTarget_get_workdir
,$(1))/$(2) : \
81 $(addprefix $(call gb_CustomTarget_get_workdir
,$(1))/,$(filter $(3)/%,$(extras_TPLOFFIMISC_MIMETYPEFILES
) $(extras_OFFIMISC_XMLFILES
))) \
82 |
$(dir $(call gb_CustomTarget_get_workdir
,$(1))/$(2)).
dir
84 $(call gb_CustomTarget_get_workdir
,$(1))/$(2) : \
85 EXTRAS_OFFIMISC_FILES
:= $(foreach file
,$(filter $(3)/%,$(extras_TPLOFFIMISC_MIMETYPEFILES
) $(extras_OFFIMISC_XMLFILES
)),$(subst $(3)/,,$(file
)))
86 $(call gb_CustomTarget_get_workdir
,$(1))/$(2) : \
87 EXTRAS_OFFIMISC_DIR
:= $(call gb_CustomTarget_get_workdir
,$(1))/$(3)
91 $(eval
$(foreach file
,$(extras_TPLOFFIMISC_MIMETYPEFILES
) $(extras_OFFIMISC_XMLFILES
),\
92 $(call extras_Tploffimisc_make_zip_deps
,extras
/source
/templates
/offimisc
,$(file
)) \
95 $(eval
$(foreach atexts
,$(extras_TEMPLATES_OFFIMISC
),\
96 $(call extras_Tploffimisc_make_zip_deps
,extras
/source
/templates
/offimisc
,$(atexts
).ott
,$(atexts
)) \
99 # vim: set noet sw=4 ts=4: