1# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
2#
3# This file is part of the LibreOffice project.
4#
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/.
8#
9
10$(eval $(call gb_CustomTarget_CustomTarget,extras/source/templates/presnt))
11
12extras_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 \
36
37
38extras_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/Pictures/10000201000004220000009801B6D855787A5E1C.png \
48	Beehive/Pictures/1000020100000422000000A2433FA0A2295FE575.png \
49	Beehive/Pictures/1000020100000422000000B279DFBB4971C54D33.png \
50	Beehive/styles.xml \
51	Beehive/Thumbnails/thumbnail.png \
52	Blue_Curve/content.xml \
53	Blue_Curve/META-INF/manifest.xml \
54	Blue_Curve/meta.xml \
55	Blue_Curve/Pictures/1000000000000421000000B8A3E59788A01B5109.jpg \
56	Blue_Curve/styles.xml \
57	Blue_Curve/Thumbnails/thumbnail.png \
58	Blueprint_Plans/content.xml \
59	Blueprint_Plans/META-INF/manifest.xml \
60	Blueprint_Plans/meta.xml \
61	Blueprint_Plans/Pictures/10000000000000580000001F99D2A38C014B254B.png \
62	Blueprint_Plans/Pictures/100000000000033C0000026D847ACE982C6E20B6.png \
63	Blueprint_Plans/Pictures/10000000000004220000031A5C2E04AB7C51FB60.png \
64	Blueprint_Plans/styles.xml \
65	Blueprint_Plans/Thumbnails/thumbnail.png \
66	BrightBlue/content.xml \
67	BrightBlue/META-INF/manifest.xml \
68	BrightBlue/meta.xml \
69	BrightBlue/Pictures/1000020100000520000000CCF41AC5B79CBB20DE.png \
70	BrightBlue/Pictures/100010580000879200001508D21A14F0A9096EB5.svg \
71	BrightBlue/styles.xml \
72	BrightBlue/Thumbnails/thumbnail.png \
73	Classy_Red/content.xml \
74	Classy_Red/META-INF/manifest.xml \
75	Classy_Red/meta.xml \
76	Classy_Red/Object1/content.xml \
77	Classy_Red/Object1/meta.xml \
78	Classy_Red/Object1/styles.xml \
79	Classy_Red/Pictures/10000000000002F000000022299043CB8313294B.png \
80	Classy_Red/Pictures/10000000000002F00000003DEB79E9C260D95118.png \
81	Classy_Red/Pictures/TablePreview1.svm \
82	Classy_Red/styles.xml \
83	Classy_Red/Thumbnails/thumbnail.png \
84	DNA/content.xml \
85	DNA/META-INF/manifest.xml \
86	DNA/meta.xml \
87	DNA/Pictures/100000000000055600000300C32362E53F69C13D.png \
88	DNA/styles.xml \
89	DNA/Thumbnails/thumbnail.png \
90	Focus/content.xml \
91	Focus/META-INF/manifest.xml \
92	Focus/meta.xml \
93	Focus/Pictures/2000000C0000634100004A4C3651558E9C43717A.svm \
94	Focus/Pictures/2000000E0000634100004A4C2A08177FA3DF9654.svm \
95	Focus/Pictures/2000000E0000634100004A4C8B8C0B6EC20B2683.svm \
96	Focus/Pictures/2000000E0000634100004A4CCD2247D4D39A5527.svm \
97	Focus/styles.xml \
98	Focus/Thumbnails/thumbnail.png \
99	Forestbird/content.xml \
100	Forestbird/META-INF/manifest.xml \
101	Forestbird/meta.xml \
102	Forestbird/Pictures/10000000000003FB000002FE917E6CB003A83232.png \
103	Forestbird/Pictures/10000000000003FD000002FE4C4CDF0F4A7ED9F9.png \
104	Forestbird/Pictures/10000000000003FD000002FE92464623A3FB3F6D.png \
105	Forestbird/Pictures/10000201000003FC000002FE87524FDDC56B0E9E.png \
106	Forestbird/styles.xml \
107	Forestbird/Thumbnails/thumbnail.png \
108	Impress/content.xml \
109	Impress/META-INF/manifest.xml \
110	Impress/meta.xml \
111	Impress/styles.xml \
112	Impress/Thumbnails/thumbnail.png \
113	Inspiration/content.xml \
114	Inspiration/META-INF/manifest.xml \
115	Inspiration/meta.xml \
116	Inspiration/Pictures/1000000000000CEC000009B16D3849F3A43CBBBC.png \
117	Inspiration/styles.xml \
118	Inspiration/Thumbnails/thumbnail.png \
119	Lights/content.xml \
120	Lights/META-INF/manifest.xml \
121	Lights/meta.xml \
122	Lights/Pictures/100000000000042100000319935403CE7B0BE43B.jpg \
123	Lights/Pictures/1000000000000423000000634B59AC09AB41D853.jpg \
124	Lights/styles.xml \
125	Lights/Thumbnails/thumbnail.png \
126	LushGreen/content.xml \
127	LushGreen/META-INF/manifest.xml \
128	LushGreen/meta.xml \
129	LushGreen/Pictures/1000020100000640000004AD17A4D9F0A443E0A2.png \
130	LushGreen/Pictures/1000020100000640000004AD5A95F4B7B86B2ED1.png \
131	LushGreen/Pictures/1000020100000640000004AD88FC52DBCACCDD82.png \
132	LushGreen/Pictures/1000020100000640000004ADF67714D670705C1E.png \
133	LushGreen/styles.xml \
134	LushGreen/Thumbnails/thumbnail.png \
135	Metropolis/content.xml \
136	Metropolis/META-INF/manifest.xml \
137	Metropolis/meta.xml \
138	Metropolis/Pictures/10000201000003AF000002126A94207C4902B60B.png \
139	Metropolis/Pictures/100021B200008D2E00004F60B312A649B9EEC188.svg \
140	Metropolis/styles.xml \
141	Metropolis/Thumbnails/thumbnail.png \
142	Midnightblue/content.xml \
143	Midnightblue/META-INF/manifest.xml \
144	Midnightblue/meta.xml \
145	Midnightblue/Pictures/1000000000000020000000204B249CA79A42C6D7.png \
146	Midnightblue/styles.xml \
147	Midnightblue/Thumbnails/thumbnail.png \
148	Nature_Illustration/content.xml \
149	Nature_Illustration/META-INF/manifest.xml \
150	Nature_Illustration/meta.xml \
151	Nature_Illustration/Pictures/10000000000004210000031931EA92AB7FB2FD6C.jpg \
152	Nature_Illustration/Pictures/100000000000042100000319892187DC121460D8.jpg \
153	Nature_Illustration/styles.xml \
154	Nature_Illustration/Thumbnails/thumbnail.png \
155	Pencil/content.xml \
156	Pencil/META-INF/manifest.xml \
157	Pencil/meta.xml \
158	Pencil/Pictures/1000020100000088000000870A26C51C993940C3.png \
159	Pencil/Pictures/100002010000037D0000001C2F14EFE8274AD9FC.png \
160	Pencil/Pictures/1000020100000402000000A2F7F509AE74DE6C69.png \
161	Pencil/styles.xml \
162	Pencil/Thumbnails/thumbnail.png \
163	Piano/content.xml \
164	Piano/META-INF/manifest.xml \
165	Piano/meta.xml \
166	Piano/Pictures/100000000000035400000120266623530F1969D0.png \
167	Piano/Pictures/100002010000033A0000006EDD62437E1CC42053.png \
168	Piano/styles.xml \
169	Piano/Thumbnails/thumbnail.png \
170	Portfolio/content.xml \
171	Portfolio/META-INF/manifest.xml \
172	Portfolio/meta.xml \
173	Portfolio/Pictures/1000020100000CEB000009B00D8BDC51D4D18334.png \
174	Portfolio/Pictures/1000020100000CEB000009B0698EB1ACA470D143.png \
175	Portfolio/Pictures/1000020100000CEB000009B0C3D535B3CBDAE49B.png \
176	Portfolio/styles.xml \
177	Portfolio/Thumbnails/thumbnail.png \
178	Progress/content.xml \
179	Progress/META-INF/manifest.xml \
180	Progress/meta.xml \
181	Progress/styles.xml \
182	Progress/Thumbnails/thumbnail.png \
183	Sunset/content.xml \
184	Sunset/META-INF/manifest.xml \
185	Sunset/meta.xml \
186	Sunset/Pictures/10000201000003AF000002126EB1F3F571D17DD0.png \
187	Sunset/Pictures/1000416600008D2E00004F6045D45030E4D3EC44.svg \
188	Sunset/styles.xml \
189	Sunset/Thumbnails/thumbnail.png \
190	Vintage/content.xml \
191	Vintage/META-INF/manifest.xml \
192	Vintage/meta.xml \
193	Vintage/Pictures/10000000000000580000001F99D2A38C014B254B.png \
194	Vintage/Pictures/10000201000004B000000337490AE22881331C9B.png \
195	Vintage/Pictures/10000201000004B00000033776CA70A4BFE2196B.png \
196	Vintage/Pictures/10000201000004B0000003379D1127938561C230.png \
197	Vintage/Pictures/10000201000004B000000337D99A2303560BD59C.png \
198	Vintage/styles.xml \
199	Vintage/Thumbnails/thumbnail.png \
200	Vivid/content.xml \
201	Vivid/META-INF/manifest.xml \
202	Vivid/meta.xml \
203	Vivid/Pictures/1000000000000020000000204B249CA79A42C6D7.png \
204	Vivid/Pictures/10000000000004F900000322783ADE15FCCE3CBA.png \
205	Vivid/Pictures/10000000000004F900000322B6E66A5FF68F74A7.png \
206	Vivid/Pictures/10000000000005550000035C66CD1AA3E88406D5.png \
207	Vivid/styles.xml \
208	Vivid/Thumbnails/thumbnail.png \
209
210
211extras_PRESENTATIONS_MIMETYPEFILES := $(foreach atexts,$(extras_TEMPLATES_PRESENTATIONS),$(atexts)/mimetype)
212
213
214$(call gb_CustomTarget_get_target,extras/source/templates/presnt) : \
215	$(foreach atexts,$(extras_TEMPLATES_PRESENTATIONS),$(call gb_CustomTarget_get_workdir,extras/source/templates/presnt)/$(atexts).otp)
216
217$(call gb_CustomTarget_get_workdir,extras/source/templates/presnt)/%/mimetype : $(SRCDIR)/extras/source/templates/presnt/%/mimetype
218	$(call gb_Output_announce,templates/presnt/$*/mimetype,$(true),CPY,1)
219	cp $< $@
220
221$(call gb_CustomTarget_get_workdir,extras/source/templates/presnt)/%.jpg : $(SRCDIR)/extras/source/templates/presnt/%.jpg
222	$(call gb_Output_announce,templates/presnt/$*.jpg,$(true),CPY,1)
223	cp $< $@
224
225$(call gb_CustomTarget_get_workdir,extras/source/templates/presnt)/%.svg : $(SRCDIR)/extras/source/templates/presnt/%.svg
226	$(call gb_Output_announce,templates/presnt/$*.svg,$(true),CPY,1)
227	cp $< $@
228
229$(call gb_CustomTarget_get_workdir,extras/source/templates/presnt)/%.png : $(SRCDIR)/extras/source/templates/presnt/%.png
230	$(call gb_Output_announce,templates/presnt/$*.png,$(true),CPY,1)
231	cp $< $@
232
233$(call gb_CustomTarget_get_workdir,extras/source/templates/presnt)/%.svm : $(SRCDIR)/extras/source/templates/presnt/%.svm
234	$(call gb_Output_announce,templates/presnt/$*.svm,$(true),CPY,1)
235	cp $< $@
236
237$(call gb_CustomTarget_get_workdir,extras/source/templates/presnt)/%.xml : $(SRCDIR)/extras/source/templates/presnt/%.xml \
238		| $(call gb_ExternalExecutable_get_dependencies,xsltproc)
239	$(call gb_Output_announce,templates/presnt/$*.xml,$(true),XSL,1)
240	$(call gb_ExternalExecutable_get_command,xsltproc) --nonet -o $@ $(SRCDIR)/extras/util/compact.xsl $<
241
242$(call gb_CustomTarget_get_workdir,extras/source/templates/presnt)/%.otp :
243	$(call gb_Output_announce,templates/presnt/$*.otp,$(true),ZIP,2)
244	$(call gb_Helper_abbreviate_dirs,\
245		cd $(EXTRAS_PRESENTATIONS_DIR) && \
246		zip -q0X --filesync --must-match $@ $(EXTRAS_PRESENTATIONS_MIMEFILES_FILTER) && \
247		zip -qrX --must-match $@ $(EXTRAS_PRESENTATIONS_XMLFILES_FILTER) \
248	)
249
250define extras_Tplpresnt_make_file_deps
251$(call gb_CustomTarget_get_workdir,$(1))/$(2) : $(SRCDIR)/$(1)/$(2) \
252	| $(dir $(call gb_CustomTarget_get_workdir,$(1))/$(2)).dir
253
254endef
255
256define extras_Tplpresnt_make_zip_deps
257$(call gb_CustomTarget_get_workdir,$(1))/$(2) : \
258	$(addprefix $(call gb_CustomTarget_get_workdir,$(1))/,$(filter $(3)/%,$(extras_PRESENTATIONS_MIMETYPEFILES) $(extras_PRESENTATIONS_XMLFILES))) \
259	| $(dir $(call gb_CustomTarget_get_workdir,$(1))/$(2)).dir
260
261$(call gb_CustomTarget_get_workdir,$(1))/$(2) : \
262	EXTRAS_PRESENTATIONS_MIMEFILES_FILTER := $(foreach file,$(filter $(3)/%,$(extras_PRESENTATIONS_MIMETYPEFILES)),$(subst $(3)/,,$(file)))
263$(call gb_CustomTarget_get_workdir,$(1))/$(2) : \
264	EXTRAS_PRESENTATIONS_XMLFILES_FILTER := $(foreach file,$(filter $(3)/%,$(extras_PRESENTATIONS_XMLFILES)),$(subst $(3)/,,$(file)))
265$(call gb_CustomTarget_get_workdir,$(1))/$(2) : \
266	EXTRAS_PRESENTATIONS_DIR := $(call gb_CustomTarget_get_workdir,$(1))/$(3)
267
268endef
269
270$(eval $(foreach file,$(extras_PRESENTATIONS_MIMETYPEFILES) $(extras_PRESENTATIONS_XMLFILES),\
271	$(call extras_Tplpresnt_make_file_deps,extras/source/templates/presnt,$(file)) \
272))
273
274$(eval $(foreach atexts,$(extras_TEMPLATES_PRESENTATIONS),\
275	$(call extras_Tplpresnt_make_zip_deps,extras/source/templates/presnt,$(atexts).otp,$(atexts)) \
276))
277
278# vim: set noet sw=4 ts=4:
279