]> git.ipfire.org Git - thirdparty/glibc.git/blame - localedata/Makefile
LoongArch: Undef __NR_fstat and __NR_newfstatat.
[thirdparty/glibc.git] / localedata / Makefile
CommitLineData
dff8da6b 1# Copyright (C) 1996-2024 Free Software Foundation, Inc.
dfe8c445 2# Copyright The GNU Toolchain Authors.
f5f52655
UD
3# This file is part of the GNU C Library.
4
5# The GNU C Library is free software; you can redistribute it and/or
41bdb6e2
AJ
6# modify it under the terms of the GNU Lesser General Public
7# License as published by the Free Software Foundation; either
8# version 2.1 of the License, or (at your option) any later version.
f5f52655
UD
9
10# The GNU C Library is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
41bdb6e2 13# Lesser General Public License for more details.
f5f52655 14
41bdb6e2 15# You should have received a copy of the GNU Lesser General Public
59ba27a6 16# License along with the GNU C Library; if not, see
5a82c748 17# <https://www.gnu.org/licenses/>.
f5f52655
UD
18
19# Makefile for installing locale data source files.
20
21subdir := localedata
22
a5f891ac 23include ../Makeconfig
f5f52655
UD
24
25# List with all available character set descriptions.
9d65ea3a 26charmaps := $(wildcard charmaps/[A-I]*) $(wildcard charmaps/[J-Z]*)
f5f52655
UD
27
28# List with all available character set descriptions.
9d65ea3a 29locales := $(wildcard locales/*)
f5f52655 30
5b905722
AJ
31subdir-dirs = tests-mbwc
32vpath %.c tests-mbwc
33vpath %.h tests-mbwc
34
a09b2aac
CD
35test-srcs := \
36 collate-test \
37 tst-ctype \
38 tst-fmon \
39 tst-langinfo-newlocale \
40 tst-langinfo-newlocale-static \
41 tst-langinfo-setlocale \
42 tst-langinfo-setlocale-static \
43 tst-numeric \
44 tst-rpmatch \
45 tst-trans \
46 xfrm-test \
47 # test-srcs
15973854
MF
48# List of test input files (list sorted alphabetically):
49test-input := \
a09b2aac
CD
50 C.UTF-8 \
51 am_ET.UTF-8 \
52 az_AZ.UTF-8 \
53 be_BY.UTF-8 \
54 ber_DZ.UTF-8 \
55 ber_MA.UTF-8 \
56 bg_BG.UTF-8 \
57 br_FR.UTF-8 \
58 bs_BA.UTF-8 \
59 ckb_IQ.UTF-8 \
60 cmn_TW.UTF-8 \
61 crh_UA.UTF-8 \
62 cs_CZ.UTF-8 \
63 csb_PL.UTF-8 \
64 cv_RU.UTF-8 \
65 cy_GB.UTF-8 \
66 da_DK.ISO-8859-1 \
67 de_DE.ISO-8859-1 \
68 dsb_DE.UTF-8 \
69 dz_BT.UTF-8 \
70 en_US.ISO-8859-1 \
71 en_US.UTF-8 \
72 eo.UTF-8 \
73 es_ES.UTF-8 \
74 et_EE.UTF-8 \
75 fa_IR.UTF-8 \
76 fi_FI.UTF-8 \
77 fil_PH.UTF-8 \
78 fr_CA.UTF-8 \
79 fr_FR.UTF-8 \
80 fur_IT.UTF-8 \
81 gez_ER.UTF-8@abegede \
82 ha_NG.UTF-8 \
83 hr_HR.ISO-8859-2 \
84 hr_HR.UTF-8 \
85 hsb_DE.UTF-8 \
86 hu_HU.UTF-8 \
87 ig_NG.UTF-8 \
88 ik_CA.UTF-8 \
89 is_IS.UTF-8 \
90 kk_KZ.UTF-8 \
91 ku_TR.UTF-8 \
92 ky_KG.UTF-8 \
93 ln_CD.UTF-8 \
94 lt_LT.UTF-8 \
3ea79f50 95 ltg_LV.UTF-8 \
a09b2aac 96 lv_LV.UTF-8 \
79fe4a0f 97 mdf_RU.UTF-8 \
a09b2aac
CD
98 mi_NZ.UTF-8 \
99 ml_IN.UTF-8 \
100 mn_MN.UTF-8 \
101 mr_IN.UTF-8 \
102 mt_MT.UTF-8 \
103 nan_TW.UTF-8@latin \
104 nb_NO.UTF-8 \
105 om_KE.UTF-8 \
106 or_IN.UTF-8 \
107 os_RU.UTF-8 \
108 pl_PL.UTF-8 \
109 ps_AF.UTF-8 \
110 rif_MA.UTF-8 \
111 ro_RO.UTF-8 \
112 ru_RU.UTF-8 \
113 sah_RU.UTF-8 \
114 sc_IT.UTF-8 \
115 se_NO.UTF-8 \
116 si_LK.UTF-8 \
117 sq_AL.UTF-8 \
118 sr_RS.UTF-8 \
119 sv_SE.ISO-8859-1 \
120 sv_SE.UTF-8 \
121 syr.UTF-8 \
122 szl_PL.UTF-8 \
123 tg_TJ.UTF-8 \
124 th_TH.UTF-8 \
125 tk_TM.UTF-8 \
126 tr_TR.UTF-8 \
127 tt_RU.UTF-8 \
128 tt_RU.UTF-8@iqtelif \
129 ug_CN.UTF-8 \
130 uk_UA.UTF-8 \
131 uz_UZ.UTF-8 \
132 vi_VN.UTF-8 \
133 yi_US.UTF-8 \
134 yo_NG.UTF-8 \
135 zh_CN.UTF-8 \
136 # test-input
15973854 137
56fa555a 138test-input-data = $(addsuffix .in, $(test-input))
da2d1bc5
UD
139test-output := $(foreach s, .out .xout, \
140 $(addsuffix $s, $(basename $(test-input))))
69c69fe1 141ld-test-names := test1 test2 test3 test4 test5 test6 test7
0a614877 142ld-test-srcs := $(addprefix tests/,$(addsuffix .cm,$(ld-test-names)) \
afa0569f 143 $(addsuffix .def,$(ld-test-names)) \
cf2964e2
UD
144 $(addsuffix .ds,test5 test6) \
145 test6.c trans.def)
880f421f 146
a09b2aac
CD
147fmon-tests = \
148 n01y12 \
149 n02n40 \
150 n10y31 \
151 n11y41 \
152 n12y11 \
153 n20n32 \
154 n30y20 \
155 n41n00 \
156 y01y10 \
157 y02n22 \
158 y22n42 \
159 y30y21 \
160 y32n31 \
161 y40y00 \
162 y42n21 \
163 # fmon-tests
8956ac9e 164
a09b2aac
CD
165generated += \
166 $(test-input) \
167 $(test-output) \
168 mtrace-tst-leaks.out \
169 sort-test.out \
170 tst-leaks.mtrace \
171 tst-locale.out \
172 # generated
173generated-dirs += \
174 $(addprefix tstfmon_,$(fmon-tests)) \
175 $(ld-test-names) \
176 de_DE.437 \
177 tt_TT \
178 # generated-dirs
414fd335 179
03ac099f 180ifeq ($(run-built-tests),yes)
a09b2aac
CD
181locale_test_suite := \
182 tst_iswalnum \
183 tst_iswalpha \
184 tst_iswcntrl \
185 tst_iswctype \
186 tst_iswdigit \
187 tst_iswgraph \
188 tst_iswlower \
189 tst_iswprint \
190 tst_iswpunct \
191 tst_iswspace \
192 tst_iswupper \
193 tst_iswxdigit \
194 tst_mblen \
195 tst_mbrlen \
196 tst_mbrtowc \
197 tst_mbsrtowcs \
198 tst_mbstowcs \
199 tst_mbtowc \
200 tst_strcoll \
201 tst_strfmon \
202 tst_strxfrm \
203 tst_swscanf \
204 tst_towctrans \
205 tst_towlower \
206 tst_towupper \
207 tst_wcrtomb \
208 tst_wcscat \
209 tst_wcschr \
210 tst_wcscmp \
211 tst_wcscoll \
212 tst_wcscpy \
213 tst_wcscspn \
214 tst_wcslen \
215 tst_wcsncat \
216 tst_wcsncmp \
217 tst_wcsncpy \
218 tst_wcspbrk \
219 tst_wcsrtombs \
220 tst_wcsspn \
221 tst_wcsstr \
222 tst_wcstod \
223 tst_wcstok \
224 tst_wcstombs \
225 tst_wcswidth \
226 tst_wcsxfrm \
227 tst_wctob \
228 tst_wctomb \
229 tst_wctrans \
230 tst_wctype \
231 tst_wcwidth \
232 # locale_test_suite
2e23c3cc 233
7e0ad15c
CD
234tests = \
235 $(locale_test_suite) \
236 bug-iconv-trans \
237 bug-setlocale1 \
238 bug-usesetlocale \
239 tst-c-utf8-consistency \
240 tst-digits \
dfe8c445 241 tst-iconv-emojis-trans \
7e0ad15c
CD
242 tst-iconv-math-trans \
243 tst-leaks \
684fbab7 244 tst-locale-loadlocale \
7e0ad15c
CD
245 tst-mbswcs1 \
246 tst-mbswcs2 \
247 tst-mbswcs3 \
248 tst-mbswcs4 \
249 tst-mbswcs5 \
250 tst-mbswcs6 \
251 tst-setlocale \
252 tst-setlocale2 \
253 tst-setlocale3 \
254 tst-sscanf \
255 tst-strfmon1 \
256 tst-wctype \
257 tst-xlocale1 \
258 tst-xlocale2 \
259 # tests
260
c34521ce
L
261tests-static = bug-setlocale1-static
262tests += $(tests-static)
7bcad280
UD
263ifeq (yes,$(build-shared))
264ifneq (no,$(PERL))
0b20a9e8 265tests-special += $(objpfx)mtrace-tst-leaks.out
7bcad280
UD
266endif
267endif
0e16ecfa 268endif
df6c63eb 269tests-container = \
a09b2aac
CD
270 tst-localedef-hardlinks \
271 # tests-container
0e16ecfa 272
f5f52655 273# Files to install.
97476447
DD
274ifeq ($(INSTALL_UNCOMPRESSED),yes)
275# This option is for testing inside the testroot container, as the
276# container does not include a working gunzip program.
277install-others := $(addprefix $(inst_i18ndir)/, \
278 $(charmaps) \
279 $(locales))
280else
d77cd295
UD
281install-others := $(addprefix $(inst_i18ndir)/, \
282 $(addsuffix .gz, $(charmaps)) \
283 $(locales))
97476447 284endif
f5f52655 285
06a1b794 286tests: $(objdir)/iconvdata/gconv-modules
23433315 287
a09b2aac
CD
288tests-static += \
289 tst-langinfo-newlocale-static \
290 tst-langinfo-setlocale-static \
291 # tests-static
85bb81c9
WN
292
293ifeq ($(run-built-tests),yes)
a09b2aac
CD
294tests-special += \
295 $(objpfx)sort-test.out \
296 $(objpfx)tst-ctype.out \
297 $(objpfx)tst-fmon.out \
298 $(objpfx)tst-langinfo-newlocale-static.out \
299 $(objpfx)tst-langinfo-newlocale.out \
300 $(objpfx)tst-langinfo-setlocale-static.out \
301 $(objpfx)tst-langinfo-setlocale.out \
302 $(objpfx)tst-locale.out \
303 $(objpfx)tst-numeric.out \
304 $(objpfx)tst-rpmatch.out \
305 $(objpfx)tst-trans.out \
306 # tests-special
15973854
MF
307# We have to generate locales (list sorted alphabetically)
308LOCALES := \
a09b2aac
CD
309 C.UTF-8 \
310 am_ET.UTF-8 \
311 az_AZ.UTF-8 \
312 be_BY.UTF-8 \
313 ber_DZ.UTF-8 \
314 ber_MA.UTF-8 \
315 bg_BG.UTF-8 \
316 br_FR.UTF-8 \
317 bs_BA.UTF-8 \
318 ckb_IQ.UTF-8 \
319 cmn_TW.UTF-8 \
320 crh_UA.UTF-8 \
321 cs_CZ.UTF-8 \
322 csb_PL.UTF-8 \
323 cv_RU.UTF-8 \
324 cy_GB.UTF-8 \
325 da_DK.ISO-8859-1 \
326 de_DE.ISO-8859-1 \
327 de_DE.UTF-8 \
328 dsb_DE.UTF-8 \
329 dz_BT.UTF-8 \
330 en_GB.UTF-8 \
684fbab7 331 en_US \
a09b2aac
CD
332 en_US.ANSI_X3.4-1968 \
333 en_US.ISO-8859-1\
334 en_US.UTF-8 \
335 eo.UTF-8 \
336 es_ES.UTF-8 \
337 et_EE.UTF-8 \
338 fa_IR.UTF-8 \
339 fi_FI.UTF-8 \
340 fil_PH.UTF-8 \
341 fr_CA.UTF-8 \
342 fr_FR.ISO-8859-1 \
343 fr_FR.UTF-8 \
344 fur_IT.UTF-8 \
345 gez_ER.UTF-8@abegede \
346 ha_NG.UTF-8 \
347 hr_HR.ISO-8859-2 \
348 hr_HR.UTF-8 \
349 hsb_DE.UTF-8 \
350 hu_HU.UTF-8 \
351 ig_NG.UTF-8 \
352 ik_CA.UTF-8 \
353 is_IS.UTF-8 \
354 ja_JP.EUC-JP \
355 ja_JP.SJIS \
356 ja_JP.UTF-8 \
357 kk_KZ.UTF-8 \
358 ku_TR.UTF-8 \
359 ky_KG.UTF-8 \
360 ln_CD.UTF-8 \
361 lt_LT.UTF-8 \
3ea79f50 362 ltg_LV.UTF-8 \
a09b2aac 363 lv_LV.UTF-8 \
79fe4a0f 364 mdf_RU.UTF-8 \
a09b2aac
CD
365 mi_NZ.UTF-8 \
366 ml_IN.UTF-8 \
367 mn_MN.UTF-8 \
368 mr_IN.UTF-8 \
369 mt_MT.UTF-8 \
370 nan_TW.UTF-8@latin \
371 nb_NO.ISO-8859-1 \
372 nb_NO.UTF-8 \
373 nl_NL.UTF-8 \
374 nn_NO.ISO-8859-1 \
375 om_KE.UTF-8 \
376 or_IN.UTF-8 \
377 os_RU.UTF-8 \
378 pl_PL.UTF-8 \
379 ps_AF.UTF-8 \
380 rif_MA.UTF-8 \
381 ro_RO.UTF-8 \
382 ru_RU.UTF-8 \
383 sah_RU.UTF-8 \
384 sc_IT.UTF-8 \
385 se_NO.UTF-8 \
386 si_LK.UTF-8 \
387 sq_AL.UTF-8 \
388 sr_RS.UTF-8 \
389 sv_SE.ISO-8859-1 \
390 sv_SE.UTF-8 \
391 syr.UTF-8 \
392 szl_PL.UTF-8 \
393 tg_TJ.UTF-8 \
394 th_TH.UTF-8 \
395 tk_TM.UTF-8 \
396 tr_TR.ISO-8859-9 \
397 tr_TR.UTF-8 \
398 tt_RU.UTF-8 \
399 tt_RU.UTF-8@iqtelif \
400 ug_CN.UTF-8 \
401 uk_UA.UTF-8 \
402 uz_UZ.UTF-8 \
403 vi_VN.UTF-8 \
404 yi_US.UTF-8 \
405 yo_NG.UTF-8 \
406 zh_CN.UTF-8 \
407 zh_TW.EUC-TW \
408 # LOCALES
15973854 409
9f53d7ad 410include ../gen-locales.mk
513aaa0d 411
dfe8c445
CLM
412$(objpfx)tst-iconv-emojis-trans.out: $(gen-locales)
413
513aaa0d 414$(objpfx)tst-iconv-math-trans.out: $(gen-locales)
684fbab7
CD
415# tst-locale-loadlocale: Needs an en_US-named locale for the test.
416$(objpfx)tst-locale-loadlocale.out: $(gen-locales)
6f99f280
JM
417endif
418
f5f52655
UD
419include ../Rules
420
97476447
DD
421ifeq ($(INSTALL_UNCOMPRESSED),yes)
422# Install the charmap files as-is. This option is for testing inside
423# the testroot container, as the container does not include a working
424# gunzip program.
425$(inst_i18ndir)/charmaps/%: charmaps/% $(+force)
426 $(make-target-directory)
427 rm -f $@
428 $(INSTALL_DATA) $< $@
429else
d77cd295
UD
430# Install the charmap files in gzipped format.
431$(inst_i18ndir)/charmaps/%.gz: charmaps/% $(+force)
432 $(make-target-directory)
433 rm -f $(@:.gz=) $@
434 $(INSTALL_DATA) $< $(@:.gz=)
962edb7e 435 gzip -9n $(@:.gz=)
97476447 436endif
d77cd295
UD
437
438# Install the locale source files in the appropriate directory.
73237de3 439$(inst_i18ndir)/locales/%: locales/% $(+force); $(do-install)
f5f52655 440
03ac099f 441ifeq ($(run-built-tests),yes)
40c4c9b5
UD
442generated-dirs += $(LOCALES)
443
9f2bedd0 444$(addsuffix .out,$(addprefix $(objpfx),$(tests))): %: \
5e087c71
UD
445 $(addprefix $(objpfx),$(CTYPE_FILES))
446
ca41028b
UD
447$(objpfx)sort-test.out: sort-test.sh $(objpfx)collate-test $(objpfx)xfrm-test \
448 $(test-input-data) $(addprefix $(objpfx),$(CTYPE_FILES))
8540f6d2
JM
449 $(SHELL) $< $(common-objpfx) '$(test-program-prefix-before-env)' \
450 '$(run-program-env)' '$(test-program-prefix-after-env)' \
451 $(test-input) \
f0881698
JM
452 > $@; \
453 $(evaluate-test)
ca41028b
UD
454$(objpfx)tst-fmon.out: tst-fmon.sh $(objpfx)tst-fmon tst-fmon.data \
455 $(objpfx)sort-test.out \
456 $(addprefix $(objpfx),$(CTYPE_FILES))
8540f6d2
JM
457 $(SHELL) $< $(common-objpfx) '$(run-program-prefix-before-env)' \
458 '$(run-program-env)' '$(run-program-prefix-after-env)' \
459 '$(test-program-prefix)' tst-fmon.data \
f0881698
JM
460 > $@; \
461 $(evaluate-test)
76352f64
UD
462$(objpfx)tst-numeric.out: tst-numeric.sh $(objpfx)tst-numeric tst-numeric.data \
463 $(objpfx)sort-test.out \
464 $(addprefix $(objpfx),$(CTYPE_FILES))
740b3dbe 465 $(SHELL) $< $(common-objpfx) '$(test-program-prefix)' tst-numeric.data \
f0881698
JM
466 > $@; \
467 $(evaluate-test)
ca41028b
UD
468$(objpfx)tst-locale.out: tst-locale.sh $(common-objpfx)locale/localedef \
469 $(ld-test-srcs) $(addprefix $(objpfx),$(CTYPE_FILES))
8540f6d2
JM
470 $(SHELL) $< $(common-objpfx) '$(built-program-cmd-before-env)' \
471 '$(run-program-env)' '$(built-program-cmd-after-env)' > $@; \
f0881698 472 $(evaluate-test)
ca41028b
UD
473$(objpfx)tst-rpmatch.out: tst-rpmatch.sh $(objpfx)tst-rpmatch \
474 $(objpfx)tst-fmon.out \
475 $(addprefix $(objpfx),$(CTYPE_FILES))
f0881698
JM
476 $(SHELL) $< $(common-objpfx) '$(test-program-cmd)' > $@; \
477 $(evaluate-test)
ca41028b
UD
478$(objpfx)tst-trans.out: tst-trans.sh $(objpfx)tst-trans \
479 $(addprefix $(objpfx),$(CTYPE_FILES))
8540f6d2
JM
480 $(SHELL) $< $(common-objpfx) '$(run-program-prefix-before-env)' \
481 '$(run-program-env)' '$(run-program-prefix-after-env)' \
482 '$(test-program-prefix-before-env)' \
8f8052c2 483 '$(test-program-prefix-after-env)'; \
f0881698 484 $(evaluate-test)
ca41028b
UD
485$(objpfx)tst-ctype.out: tst-ctype.sh $(objpfx)tst-ctype \
486 $(objpfx)sort-test.out \
487 $(addprefix $(objpfx),$(CTYPE_FILES))
8540f6d2 488 $(SHELL) $< $(common-objpfx) '$(test-program-cmd-before-env)' \
8f8052c2 489 '$(run-program-env)' '$(test-program-cmd-after-env)'; \
f0881698 490 $(evaluate-test)
34fdb893
CD
491$(objpfx)tst-langinfo-newlocale.out: tst-langinfo.sh \
492 $(objpfx)tst-langinfo-newlocale \
f79d99cb
UD
493 $(objpfx)sort-test.out \
494 $(addprefix $(objpfx),$(CTYPE_FILES))
8540f6d2
JM
495 $(SHELL) $< $(common-objpfx) '$(test-program-cmd-before-env)' \
496 '$(run-program-env)' '$(test-program-cmd-after-env)' > $@; \
ae75a883 497 $(evaluate-test)
34fdb893
CD
498$(objpfx)tst-langinfo-newlocale-static.out: tst-langinfo.sh \
499 $(objpfx)tst-langinfo-newlocale-static \
ae75a883
AJ
500 $(objpfx)sort-test.out \
501 $(addprefix $(objpfx),$(CTYPE_FILES))
8540f6d2
JM
502 $(SHELL) $< $(common-objpfx) '$(test-program-cmd-before-env)' \
503 '$(run-program-env)' '$(test-program-cmd-after-env)' > $@; \
f0881698 504 $(evaluate-test)
34fdb893
CD
505# Static use of newlocale is known not to work. See Bug 23164.
506test-xfail-tst-langinfo-newlocale-static = yes
507
508$(objpfx)tst-langinfo-setlocale.out: tst-langinfo.sh \
509 $(objpfx)tst-langinfo-setlocale \
510 $(objpfx)sort-test.out \
511 $(addprefix $(objpfx),$(CTYPE_FILES))
512 $(SHELL) $< $(common-objpfx) '$(test-program-cmd-before-env)' \
513 '$(run-program-env)' '$(test-program-cmd-after-env)' > $@; \
514 $(evaluate-test)
515$(objpfx)tst-langinfo-setlocale-static.out: tst-langinfo.sh \
516 $(objpfx)tst-langinfo-setlocale-static \
517 $(objpfx)sort-test.out \
518 $(addprefix $(objpfx),$(CTYPE_FILES))
519 $(SHELL) $< $(common-objpfx) '$(test-program-cmd-before-env)' \
520 '$(run-program-env)' '$(test-program-cmd-after-env)' > $@; \
521 $(evaluate-test)
522
69c69fe1 523$(objpfx)tst-digits.out: $(objpfx)tst-locale.out
db2d05f9 524$(objpfx)tst-mbswcs6.out: $(addprefix $(objpfx),$(CTYPE_FILES))
df455ccb 525endif
92610fbe 526
f7364247
UD
527include SUPPORTED
528
08a5ee14
CD
529INSTALL-SUPPORTED-LOCALE-ARCHIVE=$(addprefix install-archive-, $(SUPPORTED-LOCALES))
530INSTALL-SUPPORTED-LOCALE-FILES=$(addprefix install-files-, $(SUPPORTED-LOCALES))
f7364247 531
92610fbe 532# Sometimes the whole collection of locale files should be installed.
246a9a19 533LOCALEDEF=I18NPATH=. GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \
85d89278 534$(rtld-prefix) $(common-objpfx)locale/localedef
08a5ee14
CD
535install-locales: install-locale-archive
536
537# Create and install the locale-archive file.
538install-locale-archive: $(INSTALL-SUPPORTED-LOCALE-ARCHIVE)
539# Create and install the locales individually (no archive).
540install-locale-files: $(INSTALL-SUPPORTED-LOCALE-FILES)
f7364247
UD
541
542install-locales-dir:
90fe682d 543 $(..)./scripts/mkinstalldirs $(inst_complocaledir)
f7364247 544
02eec681
CD
545# The SHIFT_JIS and SHIFT_JISX0213 character maps are not ASCII compatible,
546# therefore we have to use --no-warnings=ascii to disable the ASCII check.
547# See localedata/gen-locale.sh for the same logic.
08a5ee14
CD
548define build-one-locale
549 locale=`echo $@ | sed -e 's/^install-[a-z]*-//'`; \
f7364247
UD
550 charset=`echo $$locale | sed -e 's,.*/,,'`; \
551 locale=`echo $$locale | sed -e 's,/[^/]*,,'`; \
02eec681
CD
552 if [ "$$charset" = 'SHIFT_JIS' ] \
553 || [ "$$charset" = 'SHIFT_JISX0213' ]; then \
554 flags="$$flags --no-warnings=ascii"; \
555 fi; \
f7364247
UD
556 echo -n `echo $$locale | sed 's/\([^.\@]*\).*/\1/'`; \
557 echo -n ".$$charset"; \
558 echo -n `echo $$locale | sed 's/\([^\@]*\)\(\@.*\)*/\2/'`; \
559 echo -n '...'; \
560 input=`echo $$locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`; \
02eec681
CD
561 $(LOCALEDEF) $$flags --alias-file=../intl/locale.alias \
562 -i locales/$$input -f charmaps/$$charset \
6c307927 563 $(addprefix --prefix=,$(install_root)) $$locale \
08a5ee14
CD
564 && echo ' done';
565endef
566
567$(INSTALL-SUPPORTED-LOCALE-ARCHIVE): install-locales-dir
1c7a3456 568 @flags=""; \
08a5ee14
CD
569 $(build-one-locale)
570
571$(INSTALL-SUPPORTED-LOCALE-FILES): install-locales-dir
1c7a3456 572 @flags="--no-archive --no-hard-links"; \
08a5ee14 573 $(build-one-locale)
5b905722 574
2bf18041 575tst-setlocale-ENV = LC_ALL=ja_JP.EUC-JP
2976feab 576tst-wctype-ENV = LC_ALL=ja_JP.EUC-JP
2bf18041 577
2d2d9f2b
SP
578tst-leaks-ENV = MALLOC_TRACE=$(objpfx)tst-leaks.mtrace \
579 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
0b20a9e8 580$(objpfx)mtrace-tst-leaks.out: $(objpfx)tst-leaks.out
f0881698
JM
581 $(common-objpfx)malloc/mtrace $(objpfx)tst-leaks.mtrace > $@; \
582 $(evaluate-test)
23433315 583
9162c01d
RM
584bug-setlocale1-ENV-only = LOCPATH=$(objpfx) LC_CTYPE=de_DE.UTF-8
585bug-setlocale1-static-ENV-only = $(bug-setlocale1-ENV-only)
cc9e536d 586
06a1b794 587$(objdir)/iconvdata/gconv-modules:
23433315 588 $(MAKE) -C ../iconvdata subdir=iconvdata $@