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
:= \
47 sr-Latn-CS
:sr-Latn-CS \
48 sr-Latn-ME
:sr-Latn-ME \
49 sr-Latn-RS
:sr-Latn-RS \
58 extras_AUTOCORR_XMLFILES
:= \
59 af-ZA
/DocumentList.xml \
60 af-ZA
/META-INF
/manifest.xml \
61 af-ZA
/SentenceExceptList.xml \
62 af-ZA
/WordExceptList.xml \
64 bg
/META-INF
/manifest.xml \
65 bg
/SentenceExceptList.xml \
66 bg
/WordExceptList.xml \
69 ca
/META-INF
/manifest.xml \
70 ca
/SentenceExceptList.xml \
71 ca
/WordExceptList.xml \
74 cs
/META-INF
/manifest.xml \
77 da
/META-INF
/manifest.xml \
78 da
/SentenceExceptList.xml \
79 da
/WordExceptList.xml \
82 de
/META-INF
/manifest.xml \
83 de
/SentenceExceptList.xml \
84 de
/WordExceptList.xml \
86 en-AU
/DocumentList.xml \
87 en-AU
/META-INF
/manifest.xml \
88 en-AU
/SentenceExceptList.xml \
89 en-AU
/WordExceptList.xml \
91 en-GB
/DocumentList.xml \
92 en-GB
/META-INF
/manifest.xml \
93 en-GB
/SentenceExceptList.xml \
94 en-GB
/WordExceptList.xml \
96 en-US
/DocumentList.xml \
97 en-US
/META-INF
/manifest.xml \
98 en-US
/SentenceExceptList.xml \
99 en-US
/WordExceptList.xml \
100 en-ZA
/DocumentList.xml \
101 en-ZA
/META-INF
/manifest.xml \
102 en-ZA
/SentenceExceptList.xml \
103 en-ZA
/WordExceptList.xml \
105 es
/DocumentList.xml \
106 es
/META-INF
/manifest.xml \
107 es
/SentenceExceptList.xml \
108 es
/WordExceptList.xml \
109 fa
/DocumentList.xml \
110 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 \
129 hu
/DocumentList.xml \
130 hu
/META-INF
/manifest.xml \
131 hu
/SentenceExceptList.xml \
132 hu
/WordExceptList.xml \
133 is
/META-INF
/manifest.xml \
134 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 \
149 lt
/DocumentList.xml \
150 lt
/META-INF
/manifest.xml \
151 lt
/SentenceExceptList.xml \
152 lt
/WordExceptList.xml \
153 mn
/DocumentList.xml \
154 mn
/META-INF
/manifest.xml \
155 mn
/SentenceExceptList.xml \
156 mn
/WordExceptList.xml \
157 nl-BE
/BlockList.xml \
158 nl-BE
/DocumentList.xml \
159 nl-BE
/META-INF
/manifest.xml \
160 nl-BE
/SentenceExceptList.xml \
161 nl-BE
/WordExceptList.xml \
163 nl
/DocumentList.xml \
164 nl
/META-INF
/manifest.xml \
165 nl
/SentenceExceptList.xml \
166 nl
/WordExceptList.xml \
167 pl
/DocumentList.xml \
168 pl
/META-INF
/manifest.xml \
169 pl
/SentenceExceptList.xml \
170 pl
/WordExceptList.xml \
171 pt-BR
/BlockList.xml \
172 pt-BR
/DocumentList.xml \
173 pt-BR
/META-INF
/manifest.xml \
174 pt-BR
/SentenceExceptList.xml \
175 pt-BR
/WordExceptList.xml \
177 pt
/DocumentList.xml \
178 pt
/META-INF
/manifest.xml \
179 pt
/SentenceExceptList.xml \
180 pt
/WordExceptList.xml \
182 ro
/DocumentList.xml \
183 ro
/META-INF
/manifest.xml \
184 ro
/SentenceExceptList.xml \
185 ro
/WordExceptList.xml \
187 ru
/DocumentList.xml \
188 ru
/META-INF
/manifest.xml \
189 ru
/SentenceExceptList.xml \
190 ru
/WordExceptList.xml \
191 sk
/DocumentList.xml \
192 sk
/META-INF
/manifest.xml \
193 sk
/SentenceExceptList.xml \
194 sk
/WordExceptList.xml \
195 sl
/DocumentList.xml \
196 sl
/META-INF
/manifest.xml \
197 sl
/SentenceExceptList.xml \
198 sl
/WordExceptList.xml \
199 sr-CS
/DocumentList.xml \
200 sr-CS
/META-INF
/manifest.xml \
201 sr-CS
/SentenceExceptList.xml \
202 sr-CS
/WordExceptList.xml \
203 sr-Latn-CS
/DocumentList.xml \
204 sr-Latn-CS
/META-INF
/manifest.xml \
205 sr-Latn-CS
/SentenceExceptList.xml \
206 sr-Latn-CS
/WordExceptList.xml \
207 sr-Latn-ME
/DocumentList.xml \
208 sr-Latn-ME
/META-INF
/manifest.xml \
209 sr-Latn-ME
/SentenceExceptList.xml \
210 sr-Latn-ME
/WordExceptList.xml \
211 sr-Latn-RS
/DocumentList.xml \
212 sr-Latn-RS
/META-INF
/manifest.xml \
213 sr-Latn-RS
/SentenceExceptList.xml \
214 sr-Latn-RS
/WordExceptList.xml \
215 sr-ME
/DocumentList.xml \
216 sr-ME
/META-INF
/manifest.xml \
217 sr-ME
/SentenceExceptList.xml \
218 sr-ME
/WordExceptList.xml \
219 sr-RS
/DocumentList.xml \
220 sr-RS
/META-INF
/manifest.xml \
221 sr-RS
/SentenceExceptList.xml \
222 sr-RS
/WordExceptList.xml \
224 sv
/DocumentList.xml \
225 sv
/META-INF
/manifest.xml \
226 sv
/SentenceExceptList.xml \
227 sv
/WordExceptList.xml \
228 tr
/DocumentList.xml \
229 tr
/META-INF
/manifest.xml \
230 tr
/SentenceExceptList.xml \
231 tr
/WordExceptList.xml \
232 vi
/DocumentList.xml \
233 vi
/META-INF
/manifest.xml \
234 vi
/WordExceptList.xml \
235 zh-CN
/DocumentList.xml \
236 zh-CN
/META-INF
/manifest.xml \
237 zh-CN
/SentenceExceptList.xml \
238 zh-TW
/DocumentList.xml \
239 zh-TW
/META-INF
/manifest.xml \
240 zh-TW
/SentenceExceptList.xml \
243 extras_AUTOCORR_MIMETYPEFILES
:= $(foreach lang
,$(extras_AUTOCORR_LANGS
),$(firstword $(subst :, ,$(lang
)))/mimetype
)
246 ifneq ($(sort $(foreach file
,$(extras_AUTOCORR_XMLFILES
),$(firstword $(subst /, ,$(file
))))),$(sort $(foreach lang
,$(extras_AUTOCORR_LANGS
),$(firstword $(subst :, ,$(lang
))))))
247 $(call gb_Output_error
,defined autocorrection languages do not match existing directories
)
250 $(call gb_CustomTarget_get_target
,extras
/source
/autocorr
) : \
251 $(foreach lang
,$(extras_AUTOCORR_LANGS
),$(call gb_CustomTarget_get_workdir
,extras
/source
/autocorr
)/acor_
$(lastword
$(subst :, ,$(lang
))).dat
)
253 $(call gb_CustomTarget_get_workdir
,extras
/source
/autocorr
)/%/mimetype
: $(SRCDIR
)/extras
/source
/autocorr
/lang
/%/mimetype
254 $(call gb_Output_announce
,$*/mimetype
,$(true
),CPY
,1)
257 $(call gb_CustomTarget_get_workdir
,extras
/source
/autocorr
)/%.xml
: $(SRCDIR
)/extras
/source
/autocorr
/lang
/%.xml \
258 |
$(call gb_ExternalExecutable_get_dependencies
,xsltproc
)
259 $(call gb_Output_announce
,$*.xml
,$(true
),XSL
,1)
260 $(call gb_ExternalExecutable_get_command
,xsltproc
) -o
$@
$(SRCDIR
)/extras
/util
/compact.xsl
$<
262 $(call gb_CustomTarget_get_workdir
,extras
/source
/autocorr
)/%.dat
:
263 $(call gb_Output_announce
,$*.dat
,$(true
),ZIP
,2)
264 $(call gb_Helper_abbreviate_dirs
,\
265 cd
$(EXTRAS_AUTOCORR_DIR
) && \
266 zip
-qrX
--filesync
--must-match
$@
$(EXTRAS_AUTOCORR_FILES
) \
269 define extras_Autocorr_make_file_deps
270 $(call gb_CustomTarget_get_workdir
,$(1))/$(2) : $(SRCDIR
)/$(1)/lang
/$(2) \
271 |
$(dir $(call gb_CustomTarget_get_workdir
,$(1))/$(2)).
dir
275 define extras_Autocorr_make_zip_deps
276 $(call gb_CustomTarget_get_workdir
,$(1))/$(2) : \
277 $(addprefix $(call gb_CustomTarget_get_workdir
,$(1))/,$(filter $(3)/%,$(extras_AUTOCORR_MIMETYPEFILES
) $(extras_AUTOCORR_XMLFILES
))) \
278 |
$(dir $(call gb_CustomTarget_get_workdir
,$(1))/$(2)).
dir
280 $(call gb_CustomTarget_get_workdir
,$(1))/$(2) : \
281 EXTRAS_AUTOCORR_FILES
:= $(foreach file
,$(filter $(3)/%,$(extras_AUTOCORR_MIMETYPEFILES
) $(extras_AUTOCORR_XMLFILES
)),$(subst $(3)/,,$(file
)))
282 $(call gb_CustomTarget_get_workdir
,$(1))/$(2) : \
283 EXTRAS_AUTOCORR_DIR
:= $(call gb_CustomTarget_get_workdir
,$(1))/$(3)
287 $(eval
$(foreach file
,$(extras_AUTOCORR_MIMETYPEFILES
) $(extras_AUTOCORR_XMLFILES
),\
288 $(call extras_Autocorr_make_file_deps
,extras
/source
/autocorr
,$(file
)) \
291 $(eval
$(foreach lang
,$(extras_AUTOCORR_LANGS
),\
292 $(call extras_Autocorr_make_zip_deps
,extras
/source
/autocorr
,acor_
$(lastword
$(subst :, ,$(lang
))).dat
,$(firstword $(subst :, ,$(lang
)))) \
295 # vim: set noet sw=4 ts=4: