bump product version to 6.3.0.0.beta1
[LibreOffice.git] / extras / CustomTarget_autocorr.mk
blob41868dee54bf3a229b5ad149a8726a6d073214fe
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/autocorr))
12 extras_AUTOCORR_LANGS := \
13 af-ZA:af-ZA \
14 bg:bg-BG \
15 ca:ca-ES \
16 cs:cs-CZ \
17 da:da-DK \
18 de:de \
19 dsb:dsb \
20 el:el-GR \
21 en-AU:en-AU \
22 en-GB:en-GB \
23 en-US:en-US \
24 en-ZA:en-ZA \
25 es:es \
26 fa:fa-IR \
27 fi:fi-FI \
28 fr:fr \
29 ga-IE:ga-IE \
30 hr:hr-HR \
31 hsb:hsb \
32 hu:hu-HU \
33 is:is-IS \
34 it:it \
35 ja:ja-JP \
36 ko:ko-KR \
37 lb-LU:lb-LU \
38 lt:lt-LT \
39 mn:mn-MN \
40 nl:nl-NL \
41 nl-BE:nl-BE \
42 pl:pl-PL \
43 pt:pt-PT \
44 pt-BR:pt-BR \
45 ro:ro-RO \
46 ru:ru-RU \
47 sk:sk-SK \
48 sl:sl-SI \
49 sr-CS:sr-CS \
50 sr-Latn-CS:sr-Latn-CS \
51 sr-Latn-ME:sr-Latn-ME \
52 sr-Latn-RS:sr-Latn-RS \
53 sr-ME:sr-ME \
54 sr-RS:sr-RS \
55 sv:sv-SE \
56 tr:tr-TR \
57 vi:vi-VN \
58 zh-CN:zh-CN \
59 zh-TW:zh-TW \
61 extras_AUTOCORR_XMLFILES := \
62 af-ZA/DocumentList.xml \
63 af-ZA/META-INF/manifest.xml \
64 af-ZA/SentenceExceptList.xml \
65 af-ZA/WordExceptList.xml \
66 bg/DocumentList.xml \
67 bg/META-INF/manifest.xml \
68 bg/SentenceExceptList.xml \
69 bg/WordExceptList.xml \
70 ca/DocumentList.xml \
71 ca/META-INF/manifest.xml \
72 ca/SentenceExceptList.xml \
73 ca/WordExceptList.xml \
74 cs/DocumentList.xml \
75 cs/META-INF/manifest.xml \
76 da/DocumentList.xml \
77 da/META-INF/manifest.xml \
78 da/SentenceExceptList.xml \
79 da/WordExceptList.xml \
80 de/DocumentList.xml \
81 de/META-INF/manifest.xml \
82 de/SentenceExceptList.xml \
83 de/WordExceptList.xml \
84 dsb/DocumentList.xml \
85 dsb/META-INF/manifest.xml \
86 el/DocumentList.xml \
87 el/META-INF/manifest.xml \
88 el/SentenceExceptList.xml \
89 el/WordExceptList.xml \
90 en-AU/DocumentList.xml \
91 en-AU/META-INF/manifest.xml \
92 en-AU/SentenceExceptList.xml \
93 en-AU/WordExceptList.xml \
94 en-GB/DocumentList.xml \
95 en-GB/META-INF/manifest.xml \
96 en-GB/SentenceExceptList.xml \
97 en-GB/WordExceptList.xml \
98 en-US/DocumentList.xml \
99 en-US/META-INF/manifest.xml \
100 en-US/SentenceExceptList.xml \
101 en-US/WordExceptList.xml \
102 en-ZA/DocumentList.xml \
103 en-ZA/META-INF/manifest.xml \
104 en-ZA/SentenceExceptList.xml \
105 en-ZA/WordExceptList.xml \
106 es/DocumentList.xml \
107 es/META-INF/manifest.xml \
108 es/SentenceExceptList.xml \
109 es/WordExceptList.xml \
110 fa/DocumentList.xml \
111 fa/META-INF/manifest.xml \
112 fi/DocumentList.xml \
113 fi/META-INF/manifest.xml \
114 fi/SentenceExceptList.xml \
115 fi/WordExceptList.xml \
116 fr/DocumentList.xml \
117 fr/META-INF/manifest.xml \
118 fr/SentenceExceptList.xml \
119 fr/WordExceptList.xml \
120 ga-IE/DocumentList.xml \
121 ga-IE/META-INF/manifest.xml \
122 ga-IE/SentenceExceptList.xml \
123 ga-IE/WordExceptList.xml \
124 hr/DocumentList.xml \
125 hr/META-INF/manifest.xml \
126 hr/SentenceExceptList.xml \
127 hr/WordExceptList.xml \
128 hsb/DocumentList.xml \
129 hsb/META-INF/manifest.xml \
130 hu/DocumentList.xml \
131 hu/META-INF/manifest.xml \
132 hu/SentenceExceptList.xml \
133 hu/WordExceptList.xml \
134 is/META-INF/manifest.xml \
135 is/SentenceExceptList.xml \
136 it/DocumentList.xml \
137 it/META-INF/manifest.xml \
138 it/SentenceExceptList.xml \
139 it/WordExceptList.xml \
140 ja/DocumentList.xml \
141 ja/META-INF/manifest.xml \
142 ja/SentenceExceptList.xml \
143 ko/DocumentList.xml \
144 ko/META-INF/manifest.xml \
145 ko/SentenceExceptList.xml \
146 lb-LU/DocumentList.xml \
147 lb-LU/META-INF/manifest.xml \
148 lt/DocumentList.xml \
149 lt/META-INF/manifest.xml \
150 lt/SentenceExceptList.xml \
151 lt/WordExceptList.xml \
152 mn/DocumentList.xml \
153 mn/META-INF/manifest.xml \
154 mn/SentenceExceptList.xml \
155 mn/WordExceptList.xml \
156 nl-BE/DocumentList.xml \
157 nl-BE/META-INF/manifest.xml \
158 nl-BE/SentenceExceptList.xml \
159 nl-BE/WordExceptList.xml \
160 nl/DocumentList.xml \
161 nl/META-INF/manifest.xml \
162 nl/SentenceExceptList.xml \
163 nl/WordExceptList.xml \
164 pl/DocumentList.xml \
165 pl/META-INF/manifest.xml \
166 pl/SentenceExceptList.xml \
167 pl/WordExceptList.xml \
168 pt-BR/DocumentList.xml \
169 pt-BR/META-INF/manifest.xml \
170 pt-BR/SentenceExceptList.xml \
171 pt-BR/WordExceptList.xml \
172 pt/DocumentList.xml \
173 pt/META-INF/manifest.xml \
174 pt/SentenceExceptList.xml \
175 pt/WordExceptList.xml \
176 ro/DocumentList.xml \
177 ro/META-INF/manifest.xml \
178 ro/SentenceExceptList.xml \
179 ro/WordExceptList.xml \
180 ru/DocumentList.xml \
181 ru/META-INF/manifest.xml \
182 ru/SentenceExceptList.xml \
183 ru/WordExceptList.xml \
184 sk/DocumentList.xml \
185 sk/META-INF/manifest.xml \
186 sk/SentenceExceptList.xml \
187 sk/WordExceptList.xml \
188 sl/DocumentList.xml \
189 sl/META-INF/manifest.xml \
190 sl/SentenceExceptList.xml \
191 sl/WordExceptList.xml \
192 sr-CS/DocumentList.xml \
193 sr-CS/META-INF/manifest.xml \
194 sr-CS/SentenceExceptList.xml \
195 sr-CS/WordExceptList.xml \
196 sr-Latn-CS/DocumentList.xml \
197 sr-Latn-CS/META-INF/manifest.xml \
198 sr-Latn-CS/SentenceExceptList.xml \
199 sr-Latn-CS/WordExceptList.xml \
200 sr-Latn-ME/DocumentList.xml \
201 sr-Latn-ME/META-INF/manifest.xml \
202 sr-Latn-ME/SentenceExceptList.xml \
203 sr-Latn-ME/WordExceptList.xml \
204 sr-Latn-RS/DocumentList.xml \
205 sr-Latn-RS/META-INF/manifest.xml \
206 sr-Latn-RS/SentenceExceptList.xml \
207 sr-Latn-RS/WordExceptList.xml \
208 sr-ME/DocumentList.xml \
209 sr-ME/META-INF/manifest.xml \
210 sr-ME/SentenceExceptList.xml \
211 sr-ME/WordExceptList.xml \
212 sr-RS/DocumentList.xml \
213 sr-RS/META-INF/manifest.xml \
214 sr-RS/SentenceExceptList.xml \
215 sr-RS/WordExceptList.xml \
216 sv/DocumentList.xml \
217 sv/META-INF/manifest.xml \
218 sv/SentenceExceptList.xml \
219 sv/WordExceptList.xml \
220 tr/DocumentList.xml \
221 tr/META-INF/manifest.xml \
222 tr/SentenceExceptList.xml \
223 tr/WordExceptList.xml \
224 vi/DocumentList.xml \
225 vi/META-INF/manifest.xml \
226 vi/WordExceptList.xml \
227 zh-CN/DocumentList.xml \
228 zh-CN/META-INF/manifest.xml \
229 zh-CN/SentenceExceptList.xml \
230 zh-TW/DocumentList.xml \
231 zh-TW/META-INF/manifest.xml \
232 zh-TW/SentenceExceptList.xml \
235 extras_AUTOCORR_MIMETYPEFILES := $(foreach lang,$(extras_AUTOCORR_LANGS),$(firstword $(subst :, ,$(lang)))/mimetype)
238 $(call gb_CustomTarget_get_target,extras/source/autocorr) : \
239 $(foreach lang,$(extras_AUTOCORR_LANGS),$(call gb_CustomTarget_get_workdir,extras/source/autocorr)/acor_$(lastword $(subst :, ,$(lang))).dat)
241 $(call gb_CustomTarget_get_workdir,extras/source/autocorr)/%/mimetype : $(SRCDIR)/extras/source/autocorr/lang/%/mimetype
242 $(call gb_Output_announce,autocorr/$*/mimetype,$(true),CPY,1)
243 cp $< $@
245 $(call gb_CustomTarget_get_workdir,extras/source/autocorr)/%.xml : $(SRCDIR)/extras/source/autocorr/lang/%.xml \
246 | $(call gb_ExternalExecutable_get_dependencies,xsltproc)
247 $(call gb_Output_announce,autocorr/$*.xml,$(true),XSL,1)
248 $(call gb_ExternalExecutable_get_command,xsltproc) --nonet -o $@ $(SRCDIR)/extras/util/compact.xsl $<
250 $(call gb_CustomTarget_get_workdir,extras/source/autocorr)/%.dat :
251 $(call gb_Output_announce,autocorr/$*.dat,$(true),ZIP,2)
252 $(call gb_Helper_abbreviate_dirs,\
253 cd $(EXTRAS_AUTOCORR_DIR) && \
254 zip -q0X --filesync --must-match $@ $(EXTRAS_AUTOCORR_MIMEFILES_FILTER) && \
255 zip -qrX --must-match $@ $(EXTRAS_AUTOCORR_XMLFILES_FILTER) \
258 define extras_Autocorr_make_file_deps
259 $(call gb_CustomTarget_get_workdir,$(1))/$(2) : $(SRCDIR)/$(1)/lang/$(2) \
260 | $(dir $(call gb_CustomTarget_get_workdir,$(1))/$(2)).dir
262 endef
264 define extras_Autocorr_make_zip_deps
265 $(call gb_CustomTarget_get_workdir,$(1))/$(2) : \
266 $(addprefix $(call gb_CustomTarget_get_workdir,$(1))/,$(filter $(3)/%,$(extras_AUTOCORR_MIMETYPEFILES) $(extras_AUTOCORR_XMLFILES))) \
267 | $(dir $(call gb_CustomTarget_get_workdir,$(1))/$(2)).dir
269 $(call gb_CustomTarget_get_workdir,$(1))/$(2) : \
270 EXTRAS_AUTOCORR_MIMEFILES_FILTER := $(foreach file,$(filter $(3)/%,$(extras_AUTOCORR_MIMETYPEFILES)),$(subst $(3)/,,$(file)))
271 $(call gb_CustomTarget_get_workdir,$(1))/$(2) : \
272 EXTRAS_AUTOCORR_XMLFILES_FILTER := $(foreach file,$(filter $(3)/%,$(extras_AUTOCORR_XMLFILES)),$(subst $(3)/,,$(file)))
273 $(call gb_CustomTarget_get_workdir,$(1))/$(2) : \
274 EXTRAS_AUTOCORR_DIR := $(call gb_CustomTarget_get_workdir,$(1))/$(3)
276 endef
278 $(eval $(foreach file,$(extras_AUTOCORR_MIMETYPEFILES) $(extras_AUTOCORR_XMLFILES),\
279 $(call extras_Autocorr_make_file_deps,extras/source/autocorr,$(file)) \
282 $(eval $(foreach lang,$(extras_AUTOCORR_LANGS),\
283 $(call extras_Autocorr_make_zip_deps,extras/source/autocorr,acor_$(lastword $(subst :, ,$(lang))).dat,$(firstword $(subst :, ,$(lang)))) \
286 # vim: set noet sw=4 ts=4: