1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
|
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_CustomTarget_CustomTarget,extras/source/autocorr))
extras_AUTOCORR_LANGS := \
af-ZA:af-ZA \
bg:bg-BG \
ca:ca-ES \
cs:cs-CZ \
da:da-DK \
de:de \
en-AU:en-AU \
en-GB:en-GB \
en-US:en-US \
en-ZA:en-ZA \
es:es \
fa:fa-IR \
fi:fi-FI \
fr:fr \
ga-IE:ga-IE \
hr:hr-HR \
hu:hu-HU \
is:is-IS \
it:it \
ja:ja-JP \
ko:ko-KR \
lb-LU:lb-LU \
lt:lt-LT \
mn:mn-MN \
nl:nl-NL \
nl-BE:nl-BE \
pl:pl-PL \
pt:pt-PT \
pt-BR:pt-BR \
ro:ro-RO \
ru:ru-RU \
sk:sk-SK \
sl:sl-SI \
sr-CS:sr-CS \
sr-Latn-CS:sr-Latn-CS \
sr-Latn-ME:sr-Latn-ME \
sr-Latn-RS:sr-Latn-RS \
sr-ME:sr-ME \
sr-RS:sr-RS \
sv:sv-SE \
tr:tr-TR \
vi:vi-VN \
zh-CN:zh-CN \
zh-TW:zh-TW \
extras_AUTOCORR_XMLFILES := \
af-ZA/DocumentList.xml \
af-ZA/META-INF/manifest.xml \
af-ZA/SentenceExceptList.xml \
af-ZA/WordExceptList.xml \
bg/DocumentList.xml \
bg/META-INF/manifest.xml \
bg/SentenceExceptList.xml \
bg/WordExceptList.xml \
ca/BlockList.xml \
ca/DocumentList.xml \
ca/META-INF/manifest.xml \
ca/SentenceExceptList.xml \
ca/WordExceptList.xml \
cs/BlockList.xml \
cs/DocumentList.xml \
cs/META-INF/manifest.xml \
da/BlockList.xml \
da/DocumentList.xml \
da/META-INF/manifest.xml \
da/SentenceExceptList.xml \
da/WordExceptList.xml \
de/BlockList.xml \
de/DocumentList.xml \
de/META-INF/manifest.xml \
de/SentenceExceptList.xml \
de/WordExceptList.xml \
en-AU/BlockList.xml \
en-AU/DocumentList.xml \
en-AU/META-INF/manifest.xml \
en-AU/SentenceExceptList.xml \
en-AU/WordExceptList.xml \
en-GB/BlockList.xml \
en-GB/DocumentList.xml \
en-GB/META-INF/manifest.xml \
en-GB/SentenceExceptList.xml \
en-GB/WordExceptList.xml \
en-US/BlockList.xml \
en-US/DocumentList.xml \
en-US/META-INF/manifest.xml \
en-US/SentenceExceptList.xml \
en-US/WordExceptList.xml \
en-ZA/DocumentList.xml \
en-ZA/META-INF/manifest.xml \
en-ZA/SentenceExceptList.xml \
en-ZA/WordExceptList.xml \
es/BlockList.xml \
es/DocumentList.xml \
es/META-INF/manifest.xml \
es/SentenceExceptList.xml \
es/WordExceptList.xml \
fa/DocumentList.xml \
fa/META-INF/manifest.xml \
fi/BlockList.xml \
fi/DocumentList.xml \
fi/META-INF/manifest.xml \
fi/SentenceExceptList.xml \
fi/WordExceptList.xml \
fr/DocumentList.xml \
fr/META-INF/manifest.xml \
fr/SentenceExceptList.xml \
fr/WordExceptList.xml \
ga-IE/DocumentList.xml \
ga-IE/META-INF/manifest.xml \
ga-IE/SentenceExceptList.xml \
ga-IE/WordExceptList.xml \
hr/DocumentList.xml \
hr/META-INF/manifest.xml \
hr/SentenceExceptList.xml \
hr/WordExceptList.xml \
hu/BlockList.xml \
hu/DocumentList.xml \
hu/META-INF/manifest.xml \
hu/SentenceExceptList.xml \
hu/WordExceptList.xml \
is/META-INF/manifest.xml \
is/SentenceExceptList.xml \
it/BlockList.xml \
it/DocumentList.xml \
it/META-INF/manifest.xml \
it/SentenceExceptList.xml \
it/WordExceptList.xml \
ja/DocumentList.xml \
ja/META-INF/manifest.xml \
ja/SentenceExceptList.xml \
ko/DocumentList.xml \
ko/META-INF/manifest.xml \
ko/SentenceExceptList.xml \
lb-LU/DocumentList.xml \
lb-LU/META-INF/manifest.xml \
lt/BlockList.xml \
lt/DocumentList.xml \
lt/META-INF/manifest.xml \
lt/SentenceExceptList.xml \
lt/WordExceptList.xml \
mn/DocumentList.xml \
mn/META-INF/manifest.xml \
mn/SentenceExceptList.xml \
mn/WordExceptList.xml \
nl-BE/BlockList.xml \
nl-BE/DocumentList.xml \
nl-BE/META-INF/manifest.xml \
nl-BE/SentenceExceptList.xml \
nl-BE/WordExceptList.xml \
nl/BlockList.xml \
nl/DocumentList.xml \
nl/META-INF/manifest.xml \
nl/SentenceExceptList.xml \
nl/WordExceptList.xml \
pl/DocumentList.xml \
pl/META-INF/manifest.xml \
pl/SentenceExceptList.xml \
pl/WordExceptList.xml \
pt-BR/BlockList.xml \
pt-BR/DocumentList.xml \
pt-BR/META-INF/manifest.xml \
pt-BR/SentenceExceptList.xml \
pt-BR/WordExceptList.xml \
pt/BlockList.xml \
pt/DocumentList.xml \
pt/META-INF/manifest.xml \
pt/SentenceExceptList.xml \
pt/WordExceptList.xml \
ro/BlockList.xml \
ro/DocumentList.xml \
ro/META-INF/manifest.xml \
ro/SentenceExceptList.xml \
ro/WordExceptList.xml \
ru/BlockList.xml \
ru/DocumentList.xml \
ru/META-INF/manifest.xml \
ru/SentenceExceptList.xml \
ru/WordExceptList.xml \
sk/DocumentList.xml \
sk/META-INF/manifest.xml \
sk/SentenceExceptList.xml \
sk/WordExceptList.xml \
sl/DocumentList.xml \
sl/META-INF/manifest.xml \
sl/SentenceExceptList.xml \
sl/WordExceptList.xml \
sr-CS/DocumentList.xml \
sr-CS/META-INF/manifest.xml \
sr-CS/SentenceExceptList.xml \
sr-CS/WordExceptList.xml \
sr-Latn-CS/DocumentList.xml \
sr-Latn-CS/META-INF/manifest.xml \
sr-Latn-CS/SentenceExceptList.xml \
sr-Latn-CS/WordExceptList.xml \
sr-Latn-ME/DocumentList.xml \
sr-Latn-ME/META-INF/manifest.xml \
sr-Latn-ME/SentenceExceptList.xml \
sr-Latn-ME/WordExceptList.xml \
sr-Latn-RS/DocumentList.xml \
sr-Latn-RS/META-INF/manifest.xml \
sr-Latn-RS/SentenceExceptList.xml \
sr-Latn-RS/WordExceptList.xml \
sr-ME/DocumentList.xml \
sr-ME/META-INF/manifest.xml \
sr-ME/SentenceExceptList.xml \
sr-ME/WordExceptList.xml \
sr-RS/DocumentList.xml \
sr-RS/META-INF/manifest.xml \
sr-RS/SentenceExceptList.xml \
sr-RS/WordExceptList.xml \
sv/BlockList.xml \
sv/DocumentList.xml \
sv/META-INF/manifest.xml \
sv/SentenceExceptList.xml \
sv/WordExceptList.xml \
tr/DocumentList.xml \
tr/META-INF/manifest.xml \
tr/SentenceExceptList.xml \
tr/WordExceptList.xml \
vi/DocumentList.xml \
vi/META-INF/manifest.xml \
vi/WordExceptList.xml \
zh-CN/DocumentList.xml \
zh-CN/META-INF/manifest.xml \
zh-CN/SentenceExceptList.xml \
zh-TW/DocumentList.xml \
zh-TW/META-INF/manifest.xml \
zh-TW/SentenceExceptList.xml \
extras_AUTOCORR_MIMETYPEFILES := $(foreach lang,$(extras_AUTOCORR_LANGS),$(firstword $(subst :, ,$(lang)))/mimetype)
ifneq ($(sort $(foreach file,$(extras_AUTOCORR_XMLFILES),$(firstword $(subst /, ,$(file))))),$(sort $(foreach lang,$(extras_AUTOCORR_LANGS),$(firstword $(subst :, ,$(lang))))))
$(call gb_Output_error,defined autocorrection languages do not match existing directories)
endif
$(call gb_CustomTarget_get_target,extras/source/autocorr) : \
$(foreach lang,$(extras_AUTOCORR_LANGS),$(call gb_CustomTarget_get_workdir,extras/source/autocorr)/acor_$(lastword $(subst :, ,$(lang))).dat)
$(call gb_CustomTarget_get_workdir,extras/source/autocorr)/%/mimetype : $(SRCDIR)/extras/source/autocorr/lang/%/mimetype
$(call gb_Output_announce,$*/mimetype,$(true),CPY,1)
cp $< $@
$(call gb_CustomTarget_get_workdir,extras/source/autocorr)/%.xml : $(SRCDIR)/extras/source/autocorr/lang/%.xml \
| $(call gb_ExternalExecutable_get_dependencies,xsltproc)
$(call gb_Output_announce,$*.xml,$(true),XSL,1)
$(call gb_ExternalExecutable_get_command,xsltproc) --nonet -o $@ $(SRCDIR)/extras/util/compact.xsl $<
$(call gb_CustomTarget_get_workdir,extras/source/autocorr)/%.dat :
$(call gb_Output_announce,$*.dat,$(true),ZIP,2)
$(call gb_Helper_abbreviate_dirs,\
cd $(EXTRAS_AUTOCORR_DIR) && \
zip -qrX --filesync --must-match $@ $(EXTRAS_AUTOCORR_FILES) \
)
define extras_Autocorr_make_file_deps
$(call gb_CustomTarget_get_workdir,$(1))/$(2) : $(SRCDIR)/$(1)/lang/$(2) \
| $(dir $(call gb_CustomTarget_get_workdir,$(1))/$(2)).dir
endef
define extras_Autocorr_make_zip_deps
$(call gb_CustomTarget_get_workdir,$(1))/$(2) : \
$(addprefix $(call gb_CustomTarget_get_workdir,$(1))/,$(filter $(3)/%,$(extras_AUTOCORR_MIMETYPEFILES) $(extras_AUTOCORR_XMLFILES))) \
| $(dir $(call gb_CustomTarget_get_workdir,$(1))/$(2)).dir
$(call gb_CustomTarget_get_workdir,$(1))/$(2) : \
EXTRAS_AUTOCORR_FILES := $(foreach file,$(filter $(3)/%,$(extras_AUTOCORR_MIMETYPEFILES) $(extras_AUTOCORR_XMLFILES)),$(subst $(3)/,,$(file)))
$(call gb_CustomTarget_get_workdir,$(1))/$(2) : \
EXTRAS_AUTOCORR_DIR := $(call gb_CustomTarget_get_workdir,$(1))/$(3)
endef
$(eval $(foreach file,$(extras_AUTOCORR_MIMETYPEFILES) $(extras_AUTOCORR_XMLFILES),\
$(call extras_Autocorr_make_file_deps,extras/source/autocorr,$(file)) \
))
$(eval $(foreach lang,$(extras_AUTOCORR_LANGS),\
$(call extras_Autocorr_make_zip_deps,extras/source/autocorr,acor_$(lastword $(subst :, ,$(lang))).dat,$(firstword $(subst :, ,$(lang)))) \
))
# vim: set noet sw=4 ts=4:
|