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
:= \
50 sr-Latn-CS
:sr-Latn-CS \
51 sr-Latn-ME
:sr-Latn-ME \
52 sr-Latn-RS
:sr-Latn-RS \
62 extras_AUTOCORR_XMLFILES
:= \
63 af-ZA
/DocumentList.xml \
64 af-ZA
/META-INF
/manifest.xml \
65 af-ZA
/SentenceExceptList.xml \
66 af-ZA
/WordExceptList.xml \
68 bg
/META-INF
/manifest.xml \
69 bg
/SentenceExceptList.xml \
70 bg
/WordExceptList.xml \
72 ca
/META-INF
/manifest.xml \
73 ca
/SentenceExceptList.xml \
74 ca
/WordExceptList.xml \
76 cs
/META-INF
/manifest.xml \
78 da
/META-INF
/manifest.xml \
79 da
/SentenceExceptList.xml \
80 da
/WordExceptList.xml \
82 de
/META-INF
/manifest.xml \
83 de
/SentenceExceptList.xml \
84 de
/WordExceptList.xml \
85 dsb
/DocumentList.xml \
86 dsb
/META-INF
/manifest.xml \
88 el
/META-INF
/manifest.xml \
89 el
/SentenceExceptList.xml \
90 el
/WordExceptList.xml \
91 en-AU
/DocumentList.xml \
92 en-AU
/META-INF
/manifest.xml \
93 en-AU
/SentenceExceptList.xml \
94 en-AU
/WordExceptList.xml \
95 en-GB
/DocumentList.xml \
96 en-GB
/META-INF
/manifest.xml \
97 en-GB
/SentenceExceptList.xml \
98 en-GB
/WordExceptList.xml \
99 en-US
/DocumentList.xml \
100 en-US
/META-INF
/manifest.xml \
101 en-US
/SentenceExceptList.xml \
102 en-US
/WordExceptList.xml \
103 en-ZA
/DocumentList.xml \
104 en-ZA
/META-INF
/manifest.xml \
105 en-ZA
/SentenceExceptList.xml \
106 en-ZA
/WordExceptList.xml \
107 es
/DocumentList.xml \
108 es
/META-INF
/manifest.xml \
109 es
/SentenceExceptList.xml \
110 es
/WordExceptList.xml \
111 fa
/DocumentList.xml \
112 fa
/META-INF
/manifest.xml \
113 fi
/DocumentList.xml \
114 fi
/META-INF
/manifest.xml \
115 fi
/SentenceExceptList.xml \
116 fi
/WordExceptList.xml \
117 fr
/DocumentList.xml \
118 fr
/META-INF
/manifest.xml \
119 fr
/SentenceExceptList.xml \
120 fr
/WordExceptList.xml \
121 ga-IE
/DocumentList.xml \
122 ga-IE
/META-INF
/manifest.xml \
123 ga-IE
/SentenceExceptList.xml \
124 ga-IE
/WordExceptList.xml \
125 hr
/DocumentList.xml \
126 hr
/META-INF
/manifest.xml \
127 hr
/SentenceExceptList.xml \
128 hr
/WordExceptList.xml \
129 hsb
/DocumentList.xml \
130 hsb
/META-INF
/manifest.xml \
131 hu
/DocumentList.xml \
132 hu
/META-INF
/manifest.xml \
133 hu
/SentenceExceptList.xml \
134 hu
/WordExceptList.xml \
135 is
/META-INF
/manifest.xml \
136 is
/SentenceExceptList.xml \
137 it
/DocumentList.xml \
138 it
/META-INF
/manifest.xml \
139 it
/SentenceExceptList.xml \
140 it
/WordExceptList.xml \
141 ja
/DocumentList.xml \
142 ja
/META-INF
/manifest.xml \
143 ja
/SentenceExceptList.xml \
144 ko
/DocumentList.xml \
145 ko
/META-INF
/manifest.xml \
146 ko
/SentenceExceptList.xml \
147 lb-LU
/DocumentList.xml \
148 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
/DocumentList.xml \
158 nl-BE
/META-INF
/manifest.xml \
159 nl-BE
/SentenceExceptList.xml \
160 nl-BE
/WordExceptList.xml \
161 nl
/DocumentList.xml \
162 nl
/META-INF
/manifest.xml \
163 nl
/SentenceExceptList.xml \
164 nl
/WordExceptList.xml \
165 pl
/DocumentList.xml \
166 pl
/META-INF
/manifest.xml \
167 pl
/SentenceExceptList.xml \
168 pl
/WordExceptList.xml \
169 pt-BR
/DocumentList.xml \
170 pt-BR
/META-INF
/manifest.xml \
171 pt-BR
/SentenceExceptList.xml \
172 pt-BR
/WordExceptList.xml \
173 pt
/DocumentList.xml \
174 pt
/META-INF
/manifest.xml \
175 pt
/SentenceExceptList.xml \
176 pt
/WordExceptList.xml \
177 ro
/DocumentList.xml \
178 ro
/META-INF
/manifest.xml \
179 ro
/SentenceExceptList.xml \
180 ro
/WordExceptList.xml \
181 ru
/DocumentList.xml \
182 ru
/META-INF
/manifest.xml \
183 ru
/SentenceExceptList.xml \
184 ru
/WordExceptList.xml \
185 sk
/DocumentList.xml \
186 sk
/META-INF
/manifest.xml \
187 sk
/SentenceExceptList.xml \
188 sk
/WordExceptList.xml \
189 sl
/DocumentList.xml \
190 sl
/META-INF
/manifest.xml \
191 sl
/SentenceExceptList.xml \
192 sl
/WordExceptList.xml \
193 sr-CS
/DocumentList.xml \
194 sr-CS
/META-INF
/manifest.xml \
195 sr-CS
/SentenceExceptList.xml \
196 sr-CS
/WordExceptList.xml \
197 sr-Latn-CS
/DocumentList.xml \
198 sr-Latn-CS
/META-INF
/manifest.xml \
199 sr-Latn-CS
/SentenceExceptList.xml \
200 sr-Latn-CS
/WordExceptList.xml \
201 sr-Latn-ME
/DocumentList.xml \
202 sr-Latn-ME
/META-INF
/manifest.xml \
203 sr-Latn-ME
/SentenceExceptList.xml \
204 sr-Latn-ME
/WordExceptList.xml \
205 sr-Latn-RS
/DocumentList.xml \
206 sr-Latn-RS
/META-INF
/manifest.xml \
207 sr-Latn-RS
/SentenceExceptList.xml \
208 sr-Latn-RS
/WordExceptList.xml \
209 sr-ME
/DocumentList.xml \
210 sr-ME
/META-INF
/manifest.xml \
211 sr-ME
/SentenceExceptList.xml \
212 sr-ME
/WordExceptList.xml \
213 sr-RS
/DocumentList.xml \
214 sr-RS
/META-INF
/manifest.xml \
215 sr-RS
/SentenceExceptList.xml \
216 sr-RS
/WordExceptList.xml \
217 sv
/DocumentList.xml \
218 sv
/META-INF
/manifest.xml \
219 sv
/SentenceExceptList.xml \
220 sv
/WordExceptList.xml \
221 tr
/DocumentList.xml \
222 tr
/META-INF
/manifest.xml \
223 tr
/SentenceExceptList.xml \
224 tr
/WordExceptList.xml \
225 vi
/DocumentList.xml \
226 vi
/META-INF
/manifest.xml \
227 vi
/WordExceptList.xml \
228 vro
/DocumentList.xml \
229 vro
/META-INF
/manifest.xml \
230 zh-CN
/DocumentList.xml \
231 zh-CN
/META-INF
/manifest.xml \
232 zh-CN
/SentenceExceptList.xml \
233 zh-TW
/DocumentList.xml \
234 zh-TW
/META-INF
/manifest.xml \
235 zh-TW
/SentenceExceptList.xml \
238 extras_AUTOCORR_MIMETYPEFILES
:= $(foreach lang
,$(extras_AUTOCORR_LANGS
),$(firstword $(subst :, ,$(lang
)))/mimetype
)
241 $(call gb_CustomTarget_get_target
,extras
/source
/autocorr
) : \
242 $(foreach lang
,$(extras_AUTOCORR_LANGS
),$(call gb_CustomTarget_get_workdir
,extras
/source
/autocorr
)/acor_
$(lastword
$(subst :, ,$(lang
))).dat
)
244 $(call gb_CustomTarget_get_workdir
,extras
/source
/autocorr
)/%/mimetype
: $(SRCDIR
)/extras
/source
/autocorr
/lang
/%/mimetype
245 $(call gb_Output_announce
,autocorr
/$*/mimetype
,$(true
),CPY
,1)
246 $(call gb_Trace_StartRange
,autocorr
/$*/mimetype
,CPY
)
248 $(call gb_Trace_EndRange
,autocorr
/$*/mimetype
,CPY
)
250 $(call gb_CustomTarget_get_workdir
,extras
/source
/autocorr
)/%.xml
: $(SRCDIR
)/extras
/source
/autocorr
/lang
/%.xml \
251 |
$(call gb_ExternalExecutable_get_dependencies
,xsltproc
)
252 $(call gb_Output_announce
,autocorr
/$*.xml
,$(true
),XSL
,1)
253 $(call gb_Trace_StartRange
,autocorr
/$*.xml
,XSL
)
254 $(call gb_ExternalExecutable_get_command
,xsltproc
) --nonet
-o
$@
$(SRCDIR
)/extras
/util
/compact.xsl
$<
255 $(call gb_Trace_EndRange
,autocorr
/$*.xml
,XSL
)
257 $(call gb_CustomTarget_get_workdir
,extras
/source
/autocorr
)/%.dat
:
258 $(call gb_Output_announce
,autocorr
/$*.dat
,$(true
),ZIP
,2)
259 $(call gb_Trace_StartRange
,autocorr
/$*.dat
,ZIP
)
260 $(call gb_Helper_abbreviate_dirs
,\
261 cd
$(EXTRAS_AUTOCORR_DIR
) && \
262 zip
-q0X
--filesync
--must-match
$@
$(EXTRAS_AUTOCORR_MIMEFILES_FILTER
) && \
263 zip
-qrX
--must-match
$@
$(EXTRAS_AUTOCORR_XMLFILES_FILTER
) \
265 $(call gb_Trace_EndRange
,autocorr
/$*.dat
,ZIP
)
267 define extras_Autocorr_make_file_deps
268 $(call gb_CustomTarget_get_workdir
,$(1))/$(2) : $(SRCDIR
)/$(1)/lang
/$(2) \
269 |
$(dir $(call gb_CustomTarget_get_workdir
,$(1))/$(2)).
dir
273 define extras_Autocorr_make_zip_deps
274 $(call gb_CustomTarget_get_workdir
,$(1))/$(2) : \
275 $(addprefix $(call gb_CustomTarget_get_workdir
,$(1))/,$(filter $(3)/%,$(extras_AUTOCORR_MIMETYPEFILES
) $(extras_AUTOCORR_XMLFILES
))) \
276 |
$(dir $(call gb_CustomTarget_get_workdir
,$(1))/$(2)).
dir
278 $(call gb_CustomTarget_get_workdir
,$(1))/$(2) : \
279 EXTRAS_AUTOCORR_MIMEFILES_FILTER
:= $(foreach file
,$(filter $(3)/%,$(extras_AUTOCORR_MIMETYPEFILES
)),$(subst $(3)/,,$(file
)))
280 $(call gb_CustomTarget_get_workdir
,$(1))/$(2) : \
281 EXTRAS_AUTOCORR_XMLFILES_FILTER
:= $(foreach file
,$(filter $(3)/%,$(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: