tdf#137838 SW: Add ability to create a hyperlink to a drawing object
[LibreOffice.git] / extras / CustomTarget_tplpresnt.mk
blobfae528536b28bd1039550a563ab08d32e8eb9ed2
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/presnt))
12 extras_TEMPLATES_PRESENTATIONS := \
13 Alizarin \
14 Beehive \
15 Blue_Curve \
16 Blueprint_Plans \
17 BrightBlue \
18 Classy_Red \
19 DNA \
20 Focus \
21 Forestbird \
22 Impress \
23 Inspiration \
24 Lights \
25 LushGreen \
26 Metropolis \
27 Midnightblue \
28 Nature_Illustration \
29 Pencil \
30 Piano \
31 Portfolio \
32 Progress \
33 Sunset \
34 Vintage \
35 Vivid \
38 extras_PRESENTATIONS_XMLFILES := \
39 Alizarin/content.xml \
40 Alizarin/META-INF/manifest.xml \
41 Alizarin/meta.xml \
42 Alizarin/styles.xml \
43 Alizarin/Thumbnails/thumbnail.png \
44 Beehive/content.xml \
45 Beehive/META-INF/manifest.xml \
46 Beehive/meta.xml \
47 Beehive/styles.xml \
48 Beehive/Thumbnails/thumbnail.png \
49 Blue_Curve/content.xml \
50 Blue_Curve/META-INF/manifest.xml \
51 Blue_Curve/meta.xml \
52 Blue_Curve/styles.xml \
53 Blue_Curve/Thumbnails/thumbnail.png \
54 Blueprint_Plans/content.xml \
55 Blueprint_Plans/META-INF/manifest.xml \
56 Blueprint_Plans/meta.xml \
57 Blueprint_Plans/Pictures/10000000000000580000001F99D2A38C014B254B.png \
58 Blueprint_Plans/Pictures/100000000000033C0000026D847ACE982C6E20B6.png \
59 Blueprint_Plans/Pictures/10000000000004220000031A5C2E04AB7C51FB60.png \
60 Blueprint_Plans/Pictures/1000020100000500000002D03918081590A75FCF.png \
61 Blueprint_Plans/Pictures/1000020100000500000002D0F25E20EA381A5EBD.png \
62 Blueprint_Plans/styles.xml \
63 Blueprint_Plans/Thumbnails/thumbnail.png \
64 BrightBlue/content.xml \
65 BrightBlue/META-INF/manifest.xml \
66 BrightBlue/meta.xml \
67 BrightBlue/styles.xml \
68 BrightBlue/Thumbnails/thumbnail.png \
69 Classy_Red/content.xml \
70 Classy_Red/META-INF/manifest.xml \
71 Classy_Red/meta.xml \
72 Classy_Red/Object1/content.xml \
73 Classy_Red/Object1/meta.xml \
74 Classy_Red/Object1/styles.xml \
75 Classy_Red/Pictures/10000000000002F000000022299043CB8313294B.png \
76 Classy_Red/Pictures/10000000000002F00000003DEB79E9C260D95118.png \
77 Classy_Red/Pictures/TablePreview1.svm \
78 Classy_Red/styles.xml \
79 Classy_Red/Thumbnails/thumbnail.png \
80 DNA/content.xml \
81 DNA/META-INF/manifest.xml \
82 DNA/meta.xml \
83 DNA/styles.xml \
84 DNA/Thumbnails/thumbnail.png \
85 Focus/content.xml \
86 Focus/META-INF/manifest.xml \
87 Focus/meta.xml \
88 Focus/styles.xml \
89 Focus/Thumbnails/thumbnail.png \
90 Forestbird/content.xml \
91 Forestbird/META-INF/manifest.xml \
92 Forestbird/meta.xml \
93 Forestbird/styles.xml \
94 Forestbird/Thumbnails/thumbnail.png \
95 Impress/content.xml \
96 Impress/META-INF/manifest.xml \
97 Impress/meta.xml \
98 Impress/styles.xml \
99 Impress/Thumbnails/thumbnail.png \
100 Inspiration/content.xml \
101 Inspiration/META-INF/manifest.xml \
102 Inspiration/meta.xml \
103 Inspiration/styles.xml \
104 Inspiration/Thumbnails/thumbnail.png \
105 Lights/content.xml \
106 Lights/META-INF/manifest.xml \
107 Lights/meta.xml \
108 Lights/styles.xml \
109 Lights/Thumbnails/thumbnail.png \
110 LushGreen/content.xml \
111 LushGreen/META-INF/manifest.xml \
112 LushGreen/meta.xml \
113 LushGreen/styles.xml \
114 LushGreen/Thumbnails/thumbnail.png \
115 Metropolis/content.xml \
116 Metropolis/META-INF/manifest.xml \
117 Metropolis/meta.xml \
118 Metropolis/Pictures/10000201000003AF000002126A94207C4902B60B.png \
119 Metropolis/Pictures/100021B200008D2E00004F60B312A649B9EEC188.svg \
120 Metropolis/styles.xml \
121 Metropolis/Thumbnails/thumbnail.png \
122 Midnightblue/content.xml \
123 Midnightblue/META-INF/manifest.xml \
124 Midnightblue/meta.xml \
125 Midnightblue/styles.xml \
126 Midnightblue/Thumbnails/thumbnail.png \
127 Nature_Illustration/content.xml \
128 Nature_Illustration/META-INF/manifest.xml \
129 Nature_Illustration/meta.xml \
130 Nature_Illustration/Pictures/10000000000004210000031931EA92AB7FB2FD6C.jpg \
131 Nature_Illustration/Pictures/100000000000042100000319892187DC121460D8.jpg \
132 Nature_Illustration/styles.xml \
133 Nature_Illustration/Thumbnails/thumbnail.png \
134 Pencil/content.xml \
135 Pencil/META-INF/manifest.xml \
136 Pencil/meta.xml \
137 Pencil/Pictures/1000020100000088000000870A26C51C993940C3.png \
138 Pencil/Pictures/100002010000037D0000001C2F14EFE8274AD9FC.png \
139 Pencil/Pictures/1000020100000402000000A2F7F509AE74DE6C69.png \
140 Pencil/styles.xml \
141 Pencil/Thumbnails/thumbnail.png \
142 Piano/content.xml \
143 Piano/META-INF/manifest.xml \
144 Piano/meta.xml \
145 Piano/Pictures/100000000000035400000120266623530F1969D0.png \
146 Piano/Pictures/100002010000033A0000006EDD62437E1CC42053.png \
147 Piano/styles.xml \
148 Piano/Thumbnails/thumbnail.png \
149 Portfolio/content.xml \
150 Portfolio/META-INF/manifest.xml \
151 Portfolio/meta.xml \
152 Portfolio/styles.xml \
153 Portfolio/Thumbnails/thumbnail.png \
154 Progress/content.xml \
155 Progress/META-INF/manifest.xml \
156 Progress/meta.xml \
157 Progress/styles.xml \
158 Progress/Thumbnails/thumbnail.png \
159 Sunset/content.xml \
160 Sunset/META-INF/manifest.xml \
161 Sunset/meta.xml \
162 Sunset/styles.xml \
163 Sunset/Thumbnails/thumbnail.png \
164 Vintage/content.xml \
165 Vintage/META-INF/manifest.xml \
166 Vintage/meta.xml \
167 Vintage/Pictures/10000000000000580000001F99D2A38C014B254B.png \
168 Vintage/Pictures/10000201000004B000000337490AE22881331C9B.png \
169 Vintage/Pictures/10000201000004B00000033776CA70A4BFE2196B.png \
170 Vintage/Pictures/10000201000004B0000003379D1127938561C230.png \
171 Vintage/Pictures/10000201000004B000000337D99A2303560BD59C.png \
172 Vintage/styles.xml \
173 Vintage/Thumbnails/thumbnail.png \
174 Vivid/content.xml \
175 Vivid/META-INF/manifest.xml \
176 Vivid/meta.xml \
177 Vivid/styles.xml \
178 Vivid/Thumbnails/thumbnail.png \
181 extras_PRESENTATIONS_MIMETYPEFILES := $(foreach atexts,$(extras_TEMPLATES_PRESENTATIONS),$(atexts)/mimetype)
184 $(call gb_CustomTarget_get_target,extras/source/templates/presnt) : \
185 $(foreach atexts,$(extras_TEMPLATES_PRESENTATIONS),$(call gb_CustomTarget_get_workdir,extras/source/templates/presnt)/$(atexts).otp)
187 $(call gb_CustomTarget_get_workdir,extras/source/templates/presnt)/%/mimetype : $(SRCDIR)/extras/source/templates/presnt/%/mimetype
188 $(call gb_Output_announce,templates/presnt/$*/mimetype,$(true),CPY,1)
189 $(call gb_Trace_StartRange,templates/presnt/$*/mimetype,CPY)
190 cp $< $@
191 $(call gb_Trace_EndRange,templates/presnt/$*/mimetype,CPY)
193 $(call gb_CustomTarget_get_workdir,extras/source/templates/presnt)/%.jpg : $(SRCDIR)/extras/source/templates/presnt/%.jpg
194 $(call gb_Output_announce,templates/presnt/$*.jpg,$(true),CPY,1)
195 $(call gb_Trace_StartRange,templates/presnt/$*.jpg,CPY)
196 cp $< $@
197 $(call gb_Trace_EndRange,templates/presnt/$*.jpg,CPY)
199 $(call gb_CustomTarget_get_workdir,extras/source/templates/presnt)/%.svg : $(SRCDIR)/extras/source/templates/presnt/%.svg
200 $(call gb_Output_announce,templates/presnt/$*.svg,$(true),CPY,1)
201 $(call gb_Trace_StartRange,templates/presnt/$*.svg,CPY)
202 cp $< $@
203 $(call gb_Trace_EndRange,templates/presnt/$*.svg,CPY)
205 $(call gb_CustomTarget_get_workdir,extras/source/templates/presnt)/%.png : $(SRCDIR)/extras/source/templates/presnt/%.png
206 $(call gb_Output_announce,templates/presnt/$*.png,$(true),CPY,1)
207 $(call gb_Trace_StartRange,templates/presnt/$*.png,CPY)
208 cp $< $@
209 $(call gb_Trace_EndRange,templates/presnt/$*.png,CPY)
211 $(call gb_CustomTarget_get_workdir,extras/source/templates/presnt)/%.svm : $(SRCDIR)/extras/source/templates/presnt/%.svm
212 $(call gb_Output_announce,templates/presnt/$*.svm,$(true),CPY,1)
213 $(call gb_Trace_StartRange,templates/presnt/$*.svm,CPY)
214 cp $< $@
215 $(call gb_Trace_EndRange,templates/presnt/$*.svm,CPY)
217 $(call gb_CustomTarget_get_workdir,extras/source/templates/presnt)/%.xml : $(SRCDIR)/extras/source/templates/presnt/%.xml \
218 | $(call gb_ExternalExecutable_get_dependencies,xsltproc)
219 $(call gb_Output_announce,templates/presnt/$*.xml,$(true),XSL,1)
220 $(call gb_Trace_StartRange,templates/presnt/$*.xml,XSL)
221 $(call gb_ExternalExecutable_get_command,xsltproc) --nonet -o $@ $(SRCDIR)/extras/util/compact.xsl $<
222 $(call gb_Trace_EndRange,templates/presnt/$*.xml,XSL)
224 $(call gb_CustomTarget_get_workdir,extras/source/templates/presnt)/%.otp :
225 $(call gb_Output_announce,templates/presnt/$*.otp,$(true),ZIP,2)
226 $(call gb_Trace_StartRange,templates/presnt/$*.otp,ZIP)
227 $(call gb_Helper_abbreviate_dirs,\
228 cd $(EXTRAS_PRESENTATIONS_DIR) && \
229 zip -q0X --filesync --must-match $@ $(EXTRAS_PRESENTATIONS_MIMEFILES_FILTER) && \
230 zip -qrX --must-match $@ $(EXTRAS_PRESENTATIONS_XMLFILES_FILTER) \
232 $(call gb_Trace_EndRange,templates/presnt/$*.otp,ZIP)
234 define extras_Tplpresnt_make_file_deps
235 $(call gb_CustomTarget_get_workdir,$(1))/$(2) : $(SRCDIR)/$(1)/$(2) \
236 | $(dir $(call gb_CustomTarget_get_workdir,$(1))/$(2)).dir
238 endef
240 define extras_Tplpresnt_make_zip_deps
241 $(call gb_CustomTarget_get_workdir,$(1))/$(2) : \
242 $(addprefix $(call gb_CustomTarget_get_workdir,$(1))/,$(filter $(3)/%,$(extras_PRESENTATIONS_MIMETYPEFILES) $(extras_PRESENTATIONS_XMLFILES))) \
243 | $(dir $(call gb_CustomTarget_get_workdir,$(1))/$(2)).dir
245 $(call gb_CustomTarget_get_workdir,$(1))/$(2) : \
246 EXTRAS_PRESENTATIONS_MIMEFILES_FILTER := $(foreach file,$(filter $(3)/%,$(extras_PRESENTATIONS_MIMETYPEFILES)),$(subst $(3)/,,$(file)))
247 $(call gb_CustomTarget_get_workdir,$(1))/$(2) : \
248 EXTRAS_PRESENTATIONS_XMLFILES_FILTER := $(foreach file,$(filter $(3)/%,$(extras_PRESENTATIONS_XMLFILES)),$(subst $(3)/,,$(file)))
249 $(call gb_CustomTarget_get_workdir,$(1))/$(2) : \
250 EXTRAS_PRESENTATIONS_DIR := $(call gb_CustomTarget_get_workdir,$(1))/$(3)
252 endef
254 $(eval $(foreach file,$(extras_PRESENTATIONS_MIMETYPEFILES) $(extras_PRESENTATIONS_XMLFILES),\
255 $(call extras_Tplpresnt_make_file_deps,extras/source/templates/presnt,$(file)) \
258 $(eval $(foreach atexts,$(extras_TEMPLATES_PRESENTATIONS),\
259 $(call extras_Tplpresnt_make_zip_deps,extras/source/templates/presnt,$(atexts).otp,$(atexts)) \
262 # vim: set noet sw=4 ts=4: