lt_LT locale: Base collation on copy "iso14651_t1" [BZ #22524]
[glibc.git] / localedata / Makefile
blob1d9ba82882216c39598a9a35b4abd9f703b02391
1 # Copyright (C) 1996-2017 Free Software Foundation, Inc.
2 # This file is part of the GNU C Library.
4 # The GNU C Library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License, or (at your option) any later version.
9 # The GNU C Library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # Lesser General Public License for more details.
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with the GNU C Library; if not, see
16 # <http://www.gnu.org/licenses/>.
18 # Makefile for installing locale data source files.
20 subdir := localedata
22 include ../Makeconfig
24 # List with all available character set descriptions.
25 charmaps := $(wildcard charmaps/[A-I]*) $(wildcard charmaps/[J-Z]*)
27 # List with all available character set descriptions.
28 locales := $(wildcard locales/*)
31 subdir-dirs = tests-mbwc
32 vpath %.c tests-mbwc
33 vpath %.h tests-mbwc
36 test-srcs := collate-test xfrm-test tst-fmon tst-rpmatch tst-trans \
37 tst-ctype tst-langinfo tst-langinfo-static tst-numeric
38 test-input := de_DE.ISO-8859-1 en_US.ISO-8859-1 da_DK.ISO-8859-1 \
39 hr_HR.ISO-8859-2 sv_SE.ISO-8859-1 tr_TR.UTF-8 fr_FR.UTF-8 \
40 si_LK.UTF-8 uk_UA.UTF-8 hu_HU.UTF-8 lv_LV.UTF-8 \
41 pl_PL.UTF-8 cs_CZ.UTF-8 fr_CA.UTF-8 hr_HR.UTF-8 \
42 bs_BA.UTF-8 sr_RS.UTF-8 is_IS.UTF-8 et_EE.UTF-8 \
43 hsb_DE.UTF-8 lt_LT.UTF-8
44 test-input-data = $(addsuffix .in, $(test-input))
45 test-output := $(foreach s, .out .xout, \
46 $(addsuffix $s, $(basename $(test-input))))
47 ld-test-names := test1 test2 test3 test4 test5 test6 test7
48 ld-test-srcs := $(addprefix tests/,$(addsuffix .cm,$(ld-test-names)) \
49 $(addsuffix .def,$(ld-test-names)) \
50 $(addsuffix .ds,test5 test6) \
51 test6.c trans.def)
53 fmon-tests = n01y12 n02n40 n10y31 n11y41 n12y11 n20n32 n30y20 n41n00 \
54 y01y10 y02n22 y22n42 y30y21 y32n31 y40y00 y42n21
56 generated += $(test-input) $(test-output) sort-test.out tst-locale.out \
57 tst-leaks.mtrace mtrace-tst-leaks.out
58 generated-dirs += $(ld-test-names) tt_TT de_DE.437 \
59 $(addprefix tstfmon_,$(fmon-tests)) \
61 ifeq ($(run-built-tests),yes)
62 locale_test_suite := tst_iswalnum tst_iswalpha tst_iswcntrl \
63 tst_iswctype tst_iswdigit tst_iswgraph \
64 tst_iswlower tst_iswprint tst_iswpunct \
65 tst_iswspace tst_iswupper tst_iswxdigit tst_mblen \
66 tst_mbrlen tst_mbrtowc tst_mbsrtowcs tst_mbstowcs \
67 tst_mbtowc tst_strcoll tst_strfmon tst_strxfrm \
68 tst_swscanf tst_towctrans tst_towlower \
69 tst_towupper tst_wcrtomb tst_wcscat tst_wcschr \
70 tst_wcscmp tst_wcscoll tst_wcscpy tst_wcscspn \
71 tst_wcslen tst_wcsncat tst_wcsncmp tst_wcsncpy \
72 tst_wcspbrk tst_wcsrtombs tst_wcsspn tst_wcsstr \
73 tst_wcstod tst_wcstok tst_wcstombs tst_wcswidth \
74 tst_wcsxfrm tst_wctob tst_wctomb tst_wctrans \
75 tst_wctype tst_wcwidth
77 tests = $(locale_test_suite) tst-digits tst-setlocale bug-iconv-trans \
78 tst-leaks tst-mbswcs1 tst-mbswcs2 tst-mbswcs3 tst-mbswcs4 tst-mbswcs5 \
79 tst-mbswcs6 tst-xlocale1 tst-xlocale2 bug-usesetlocale \
80 tst-strfmon1 tst-sscanf bug-setlocale1 tst-setlocale2 tst-setlocale3 \
81 tst-wctype
82 tests-static = bug-setlocale1-static
83 tests += $(tests-static)
84 ifeq (yes,$(build-shared))
85 ifneq (no,$(PERL))
86 tests-special += $(objpfx)mtrace-tst-leaks.out
87 endif
88 endif
89 endif
91 # Files to install.
92 install-others := $(addprefix $(inst_i18ndir)/, \
93 $(addsuffix .gz, $(charmaps)) \
94 $(locales))
96 tests: $(objdir)/iconvdata/gconv-modules
98 tests-static += tst-langinfo-static
100 ifeq ($(run-built-tests),yes)
101 tests-special += $(objpfx)sort-test.out $(objpfx)tst-fmon.out \
102 $(objpfx)tst-locale.out $(objpfx)tst-rpmatch.out \
103 $(objpfx)tst-trans.out $(objpfx)tst-ctype.out \
104 $(objpfx)tst-langinfo.out $(objpfx)tst-langinfo-static.out \
105 $(objpfx)tst-numeric.out
106 # We have to generate locales
107 LOCALES := de_DE.ISO-8859-1 de_DE.UTF-8 en_US.ANSI_X3.4-1968 \
108 en_US.ISO-8859-1 en_US.UTF-8 ja_JP.EUC-JP da_DK.ISO-8859-1 \
109 hr_HR.ISO-8859-2 sv_SE.ISO-8859-1 ja_JP.SJIS fr_FR.ISO-8859-1 \
110 nb_NO.ISO-8859-1 nn_NO.ISO-8859-1 tr_TR.UTF-8 cs_CZ.UTF-8 \
111 zh_TW.EUC-TW fa_IR.UTF-8 fr_FR.UTF-8 ja_JP.UTF-8 si_LK.UTF-8 \
112 tr_TR.ISO-8859-9 en_GB.UTF-8 uk_UA.UTF-8 hu_HU.UTF-8 lv_LV.UTF-8 \
113 pl_PL.UTF-8 fr_CA.UTF-8 hr_HR.UTF-8 bs_BA.UTF-8 sr_RS.UTF-8 \
114 is_IS.UTF-8 et_EE.UTF-8 hsb_DE.UTF-8 lt_LT.UTF-8
115 include ../gen-locales.mk
116 endif
118 include ../Rules
120 # Install the charmap files in gzipped format.
121 $(inst_i18ndir)/charmaps/%.gz: charmaps/% $(+force)
122 $(make-target-directory)
123 rm -f $(@:.gz=) $@
124 $(INSTALL_DATA) $< $(@:.gz=)
125 gzip -9n $(@:.gz=)
127 # Install the locale source files in the appropriate directory.
128 $(inst_i18ndir)/locales/%: locales/% $(+force); $(do-install)
130 ifeq ($(run-built-tests),yes)
131 generated-dirs += $(LOCALES)
133 $(addsuffix .out,$(addprefix $(objpfx),$(tests))): %: \
134 $(addprefix $(objpfx),$(CTYPE_FILES))
136 $(objpfx)sort-test.out: sort-test.sh $(objpfx)collate-test $(objpfx)xfrm-test \
137 $(test-input-data) $(addprefix $(objpfx),$(CTYPE_FILES))
138 $(SHELL) $< $(common-objpfx) '$(test-program-prefix-before-env)' \
139 '$(run-program-env)' '$(test-program-prefix-after-env)' \
140 $(test-input) \
141 > $@; \
142 $(evaluate-test)
143 $(objpfx)tst-fmon.out: tst-fmon.sh $(objpfx)tst-fmon tst-fmon.data \
144 $(objpfx)sort-test.out \
145 $(addprefix $(objpfx),$(CTYPE_FILES))
146 $(SHELL) $< $(common-objpfx) '$(run-program-prefix-before-env)' \
147 '$(run-program-env)' '$(run-program-prefix-after-env)' \
148 '$(test-program-prefix)' tst-fmon.data \
149 > $@; \
150 $(evaluate-test)
151 $(objpfx)tst-numeric.out: tst-numeric.sh $(objpfx)tst-numeric tst-numeric.data \
152 $(objpfx)sort-test.out \
153 $(addprefix $(objpfx),$(CTYPE_FILES))
154 $(SHELL) $< $(common-objpfx) '$(test-program-prefix)' tst-numeric.data \
155 > $@; \
156 $(evaluate-test)
157 $(objpfx)tst-locale.out: tst-locale.sh $(common-objpfx)locale/localedef \
158 $(ld-test-srcs) $(addprefix $(objpfx),$(CTYPE_FILES))
159 $(SHELL) $< $(common-objpfx) '$(built-program-cmd-before-env)' \
160 '$(run-program-env)' '$(built-program-cmd-after-env)' > $@; \
161 $(evaluate-test)
162 $(objpfx)tst-rpmatch.out: tst-rpmatch.sh $(objpfx)tst-rpmatch \
163 $(objpfx)tst-fmon.out \
164 $(addprefix $(objpfx),$(CTYPE_FILES))
165 $(SHELL) $< $(common-objpfx) '$(test-program-cmd)' > $@; \
166 $(evaluate-test)
167 $(objpfx)tst-trans.out: tst-trans.sh $(objpfx)tst-trans \
168 $(addprefix $(objpfx),$(CTYPE_FILES))
169 $(SHELL) $< $(common-objpfx) '$(run-program-prefix-before-env)' \
170 '$(run-program-env)' '$(run-program-prefix-after-env)' \
171 '$(test-program-prefix-before-env)' \
172 '$(test-program-prefix-after-env)' > $@; \
173 $(evaluate-test)
174 $(objpfx)tst-ctype.out: tst-ctype.sh $(objpfx)tst-ctype \
175 $(objpfx)sort-test.out \
176 $(addprefix $(objpfx),$(CTYPE_FILES))
177 $(SHELL) $< $(common-objpfx) '$(test-program-cmd-before-env)' \
178 '$(run-program-env)' '$(test-program-cmd-after-env)' > $@; \
179 $(evaluate-test)
180 $(objpfx)tst-langinfo.out: tst-langinfo.sh $(objpfx)tst-langinfo \
181 $(objpfx)sort-test.out \
182 $(addprefix $(objpfx),$(CTYPE_FILES))
183 $(SHELL) $< $(common-objpfx) '$(test-program-cmd-before-env)' \
184 '$(run-program-env)' '$(test-program-cmd-after-env)' > $@; \
185 $(evaluate-test)
186 $(objpfx)tst-langinfo-static.out: tst-langinfo.sh $(objpfx)tst-langinfo-static \
187 $(objpfx)sort-test.out \
188 $(addprefix $(objpfx),$(CTYPE_FILES))
189 $(SHELL) $< $(common-objpfx) '$(test-program-cmd-before-env)' \
190 '$(run-program-env)' '$(test-program-cmd-after-env)' > $@; \
191 $(evaluate-test)
192 $(objpfx)tst-digits.out: $(objpfx)tst-locale.out
193 $(objpfx)tst-mbswcs6.out: $(addprefix $(objpfx),$(CTYPE_FILES))
194 endif
196 include SUPPORTED
198 INSTALL-SUPPORTED-LOCALES=$(addprefix install-, $(SUPPORTED-LOCALES))
200 # Sometimes the whole collection of locale files should be installed.
201 LOCALEDEF=I18NPATH=. GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \
202 $(rtld-prefix) $(common-objpfx)locale/localedef
203 install-locales: $(INSTALL-SUPPORTED-LOCALES)
205 install-locales-dir:
206 $(..)./scripts/mkinstalldirs $(inst_complocaledir)
208 # The SHIFT_JIS and SHIFT_JISX0213 character maps are not ASCII compatible,
209 # therefore we have to use --no-warnings=ascii to disable the ASCII check.
210 # See localedata/gen-locale.sh for the same logic.
211 $(INSTALL-SUPPORTED-LOCALES): install-locales-dir
212 @locale=`echo $@ | sed -e 's/^install-//'`; \
213 charset=`echo $$locale | sed -e 's,.*/,,'`; \
214 locale=`echo $$locale | sed -e 's,/[^/]*,,'`; \
215 flags="--quiet -c"; \
216 if [ "$$charset" = 'SHIFT_JIS' ] \
217 || [ "$$charset" = 'SHIFT_JISX0213' ]; then \
218 flags="$$flags --no-warnings=ascii"; \
219 fi; \
220 echo -n `echo $$locale | sed 's/\([^.\@]*\).*/\1/'`; \
221 echo -n ".$$charset"; \
222 echo -n `echo $$locale | sed 's/\([^\@]*\)\(\@.*\)*/\2/'`; \
223 echo -n '...'; \
224 input=`echo $$locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`; \
225 $(LOCALEDEF) $$flags --alias-file=../intl/locale.alias \
226 -i locales/$$input -f charmaps/$$charset \
227 $(addprefix --prefix=,$(install_root)) $$locale \
228 && echo ' done'; \
230 tst-setlocale-ENV = LC_ALL=ja_JP.EUC-JP
231 tst-wctype-ENV = LC_ALL=ja_JP.EUC-JP
233 tst-leaks-ENV = MALLOC_TRACE=$(objpfx)tst-leaks.mtrace
234 $(objpfx)mtrace-tst-leaks.out: $(objpfx)tst-leaks.out
235 $(common-objpfx)malloc/mtrace $(objpfx)tst-leaks.mtrace > $@; \
236 $(evaluate-test)
238 bug-setlocale1-ENV-only = LOCPATH=$(objpfx) LC_CTYPE=de_DE.UTF-8
239 bug-setlocale1-static-ENV-only = $(bug-setlocale1-ENV-only)
241 $(objdir)/iconvdata/gconv-modules:
242 $(MAKE) -C ../iconvdata subdir=iconvdata $@