glibc/localedata
Joseph Myers 2bf1804182 Include LOCPATH in default test environment.
Tests run using the default $(make-test-out) automatically get
GCONV_PATH and LC_ALL set, whether or not those environment variables
are actually needed for the individual test.  However, they do not get
LOCPATH set, meaning that a large number of tests have -ENV settings
just to set LOCPATH.

This patch moves LOCPATH into the default environment used for all
tests, on the principle that like GCONV_PATH any settings needed to
use files associated with the newly built library, rather than any old
installed files, are appropriate to use by default.

A further motivation is that various tests using .sh files also set
some combination of LC_ALL, GCONV_PATH and LOCPATH.  Preferably .sh
files should also use the default environment with any additions
required for the individual test.  Now, it was suggested in
<https://sourceware.org/ml/libc-alpha/2014-05/msg00715.html> that
various Makefile variables used in testing should be derived by
composing the -before-env and -after-env variables used when explicit
environment settings are required.  With such a change, it's also
natural for those variables to include the default settings (via some
intermediate makefile variable also used in make-test-out).

Because some .sh files only set variables that correspond to the
default settings, or a subset thereof, and this applies to more of the
.sh files once LOCPATH is in the default settings, doing so reduces
the size of a revised version of
<https://sourceware.org/ml/libc-alpha/2014-05/msg00596.html>: scripts
only needing the (expanded) default settings will not need to receive
the separate -before-env and -after-env variables, only the single
variable they do at present.  So moving LOCPATH into the default
settings can reduce churn caused by subsequent patches.

Tested x86_64 and x86.

	* Rules (make-test-out): Include
	LOCPATH=$(common-objpfx)localedata in default environment.
	* debug/Makefile (tst-chk1-ENV): Remove variable.
	(tst-chk2-ENV): Likewise.
	(tst-chk3-ENV): Likewise.
	(tst-chk4-ENV): Likewise.
	(tst-chk5-ENV): Likewise.
	(tst-chk6-ENV): Likewise.
	(tst-lfschk1-ENV): Likewise.
	(tst-lfschk2-ENV): Likewise.
	(tst-lfschk3-ENV): Likewise.
	(tst-lfschk4-ENV): Likewise.
	(tst-lfschk5-ENV): Likewise.
	(tst-lfschk6-ENV): Likewise.
	* iconvdata/Makefile (bug-iconv6-ENV): Likewise.
	(tst-iconv7-ENV): Likewise.
	* intl/Makefile (LOCPATH-ENV): Likewise.
	(tst-codeset-ENV): Likewise.
	(tst-gettext3-ENV): Likewise.
	(tst-gettext5-ENV): Likewise.
	* libio/Makefile (tst-widetext-ENV): Don't set LOCPATH.
	(tst-fopenloc-ENV): Likewise.
	(tst-fgetws-ENV): Remove variable.
	(tst-ungetwc1-ENV): Likewise.
	(tst-ungetwc2-ENV): Likewise.
	(bug-ungetwc2-ENV): Likewise.
	(tst-swscanf-ENV): Likewise.
	(bug-ftell-ENV): Likewise.
	(tst-fgetwc-ENV): Likewise.
	(tst-fseek-ENV): Likewise.
	(tst-ftell-partial-wide-ENV): Likewise.
	(tst-ftell-active-handler-ENV): Likewise.
	(tst-ftell-append-ENV): Likewise.
	* posix/Makefile (tst-fnmatch-ENV): Likewise.
	(tst-regexloc-ENV): Likewise.
	(bug-regex1-ENV): Likewise.
	(tst-regex-ENV): Likewise.
	(tst-regex2-ENV): Likewise.
	(bug-regex5-ENV): Likewise.
	(bug-regex6-ENV): Likewise.
	(bug-regex17-ENV): Likewise.
	(bug-regex18-ENV): Likewise.
	(bug-regex19-ENV): Likewise.
	(bug-regex20-ENV): Likewise.
	(bug-regex22-ENV): Likewise.
	(bug-regex23-ENV): Likewise.
	(bug-regex25-ENV): Likewise.
	(bug-regex26-ENV): Likewise.
	(bug-regex30-ENV): Likewise.
	(bug-regex32-ENV): Likewise.
	(bug-regex33-ENV): Likewise.
	(bug-regex34-ENV): Likewise.
	(bug-regex35-ENV): Likewise.
	(tst-rxspencer-ENV): Likewise.
	(tst-rxspencer-no-utf8-ENV): Likewise.
	* stdio-common/Makefile (tst-sprintf-ENV): Likewise.
	(tst-sscanf-ENV): Likewise.
	(tst-swprintf-ENV): Likewise.
	(tst-swscanf-ENV): Likewise.
	(test-vfprintf-ENV): Likewise.
	(scanf13-ENV): Likewise.
	(bug14-ENV): Likewise.
	(tst-grouping-ENV): Likewise.
	* stdlib/Makefile (tst-strtod-ENV): Likewise.
	(tst-strtod3-ENV): Likewise.
	(tst-strtod4-ENV): Likewise.
	(tst-strtod5-ENV): Likewise.
	(testmb2-ENV): Likewise./
	* string/Makefile (tst-strxfrm-ENV): Likewise.
	(tst-strxfrm2-ENV): Likewise.
	(bug-strcoll1-ENV): Likewise.
	(test-strcasecmp-ENV): Likewise.
	(test-strncasecmp-ENV): Likewise.
	* time/Makefile (tst-strptime-ENV): Likewise.
	(tst-ftime_l-ENV): Likewise.
	* wcsmbs/Makefile (tst-btowc-ENV): Likewise.
	(tst-mbrtowc-ENV): Likewise.
	(tst-wcrtomb-ENV): Likewise.
	(tst-mbrtowc2-ENV): Likewise.
	(tst-c16c32-1-ENV): Likewise.
	(tst-mbsnrtowcs-ENV): Likewise.

localedata/ChangeLog:
	* Makefile (TEST_MBWC_ENV): Remove variable.
	(tst_iswalnum-ENV): Likewise.
	(tst_iswalpha-ENV): Likewise.
	(tst_iswcntrl-ENV): Likewise.
	(tst_iswctype-ENV): Likewise.
	(tst_iswdigit-ENV): Likewise.
	(tst_iswgraph-ENV): Likewise.
	(tst_iswlower-ENV): Likewise.
	(tst_iswprint-ENV): Likewise.
	(tst_iswpunct-ENV): Likewise.
	(tst_iswspace-ENV): Likewise.
	(tst_iswupper-ENV): Likewise.
	(tst_iswxdigit-ENV): Likewise.
	(tst_mblen-ENV): Likewise.
	(tst_mbrlen-ENV): Likewise.
	(tst_mbrtowc-ENV): Likewise.
	(tst_mbsrtowcs-ENV): Likewise.
	(tst_mbstowcs-ENV): Likewise.
	(tst_mbtowc-ENV): Likewise.
	(tst_strcoll-ENV): Likewise.
	(tst_strfmon-ENV): Likewise.
	(tst_strxfrm-ENV): Likewise.
	(tst_swscanf-ENV): Likewise.
	(tst_towctrans-ENV): Likewise.
	(tst_towlower-ENV): Likewise.
	(tst_towupper-ENV): Likewise.
	(tst_wcrtomb-ENV): Likewise.
	(tst_wcscat-ENV): Likewise.
	(tst_wcschr-ENV): Likewise.
	(tst_wcscmp-ENV): Likewise.
	(tst_wcscoll-ENV): Likewise.
	(tst_wcscpy-ENV): Likewise.
	(tst_wcscspn-ENV): Likewise.
	(tst_wcslen-ENV): Likewise.
	(tst_wcsncat-ENV): Likewise.
	(tst_wcsncmp-ENV): Likewise.
	(tst_wcsncpy-ENV): Likewise.
	(tst_wcspbrk-ENV): Likewise.
	(tst_wcsrtombs-ENV): Likewise.
	(tst_wcsspn-ENV): Likewise.
	(tst_wcsstr-ENV): Likewise.
	(tst_wcstod-ENV): Likewise.
	(tst_wcstok-ENV): Likewise.
	(tst_wcstombs-ENV): Likewise.
	(tst_wcswidth-ENV): Likewise.
	(tst_wcsxfrm-ENV): Likewise.
	(tst_wctob-ENV): Likewise.
	(tst_wctomb-ENV): Likewise.
	(tst_wctrans-ENV): Likewise.
	(tst_wctype-ENV): Likewise.
	(tst_wcwidth-ENV): Likewise.
	(tst-digits-ENV): Likewise.
	(tst-mbswcs6-ENV): Likewise.
	(tst-xlocale1-ENV): Likewise.
	(tst-xlocale2-ENV): Likewise.
	(tst-strfmon1-ENV): Likewise.
	(tst-strptime-ENV): Likewise.
	(tst-setlocale-ENV): Don't set LOCPATH.
	(bug-iconv-trans-ENV): Remove variable.
	(tst-sscanf-ENV): Likewise.
	(tst-leaks-ENV): Don't set LOCPATH.
	(bug-setlocale1-ENV): Remove variable.
	(bug-setlocale1-static-ENV): Likewise.
	(tst-setlocale2-ENV): Likewise.
2014-06-04 23:37:25 +00:00
..
charmaps Update BIG5-HKSCS charmap to HKSCS-2008 2013-06-11 17:02:59 +02:00
locales Add lang_name to various locales. 2013-12-26 19:35:18 -05:00
tests Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tests-mbwc Remove unused variable. 2013-11-18 13:12:29 +01:00
tst-fmon-locales
ChangeLog Include LOCPATH in default test environment. 2014-06-04 23:37:25 +00:00
Depend
Makefile Include LOCPATH in default test environment. 2014-06-04 23:37:25 +00:00
README Change sources.redhat.com references to sourceware.org. 2012-12-06 15:32:46 +00:00
SUPPORTED New locale for the_NP. 2013-11-15 15:57:56 -05:00
bug-iconv-trans.c
bug-setlocale1-static.c Support run bug-setlocale1 directly 2013-01-10 14:15:49 -08:00
bug-setlocale1.c Support run bug-setlocale1 directly 2013-01-10 14:15:49 -08:00
bug-usesetlocale.c
collate-test.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
cs_CZ.in
da_DK.in
de_DE.in
dump-ctype.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
en_US.in
fr_FR.in
gen-locale.sh Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
gen-unicode-ctype.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
hr_HR.in
show-ucs-data.c
si_LK.in
sort-test.sh Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
sv_SE.in
th_TH.in
tr_TR.in
tst-ctype-de_DE.ISO-8859-1.in
tst-ctype.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-ctype.sh Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-digits.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-fmon.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-fmon.data Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-fmon.sh Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-langinfo-static.c fix nl_langinfo with static linking (BZ #16915) 2014-05-20 18:43:14 +02:00
tst-langinfo.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-langinfo.sh fix nl_langinfo with static linking (BZ #16915) 2014-05-20 18:43:14 +02:00
tst-leaks.c
tst-locale.sh Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-mbswcs.sh Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-mbswcs1.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-mbswcs2.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-mbswcs3.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-mbswcs4.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-mbswcs5.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-mbswcs6.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-numeric.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-numeric.data Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-numeric.sh Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-rpmatch.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-rpmatch.sh Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-setlocale.c
tst-setlocale2.c Optimize access to isXYZ and toXYZ tables 2011-10-15 16:27:08 -04:00
tst-sscanf.c
tst-strfmon1.c
tst-trans.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-trans.sh Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-wctype.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-wctype.input
tst-wctype.sh Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-xlocale1.c
tst-xlocale2.c
xfrm-test.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00

README

		       POSIX locale descriptions
				  and
		    POSIX character set descriptions

Ulrich Drepper			Time-stamp: <2004/11/27 13:06:54 drepper>
drepper@redhat.com


This directory contains the data needed to build the locale data files
to use the internationalization features of the GNU libc.

POSIX.2 describes the `localedef' utility which is part of the GNU libc.
You need this program to "compile" the locale description in a form
suitable for fast access by the GNU libc functions.  Any compilation is
based on a given character set.

Once you run `make install' for the GNU libc the data files are
automatically installed in the right place, ready for use by the
`localedef' program.

To compile the locale data files you simply have to decide which locale
(based on the location and the language) and which character set you
use.  E.g., French speaking Canadians would use the locale `fr_CA' and
the character set `ISO_8859-1,1987'.  Calling `localedef' to get the
desired data should happen like this:

	localedef -i fr_CA -f ISO-8859-1 fr_CA

This will place the 6 output files in the appropriate directory where
the GNU libc functions can find them.  Please note that you need
permission to write to this directory ($(prefix)/share/locale, where
$(prefix) is the value you specified while configuring GNU libc).  If
you do not have the necessary permissions, you can write the files into an
arbitrary directory by giving a path including a '/' character instead
of `fr_CA'.  E.g., to put the new files in a subdirectory of the
current directory simply use

	localedef -i fr_CA -f ISO-8859-1 ./fr_CA

How to use these data files is described in the GNU libc manual,
especially in the section describing the `setlocale' function.

All problems should be reported using

  http://sourceware.org/bugzilla/


One more note: the `POSIX' locale definition is not meant to be used
as an input file for `localedef'.  It is rather there to show the
values with are built in the libc binaries as default values when no
legal locale is found or the "C" or "POSIX" locale is selected.


		       The collation test suite
		       ########################

This package also contains a (beginning of a) test suite for the
collation functions in the GNU libc.  The files are provided sorted.
The test program shuffles the lines and sort them afterwards.

Some of the files are provided in 8bit form, i.e., not only ASCII
characters.  So the tools you use to process the files should be 8bit
clean.

To run the test program the appropriate locale information must be
installed.  Therefore the localedef program is used to generate this
data used the locale and charmap description files contained here.
Since we cannot run the localedef program in case of cross-compilation
no tests at all are performed.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Local Variables:
 mode:text
 eval:(load-library "time-stamp")
 eval:(make-local-variable 'write-file-hooks)
 eval:(add-hook 'write-file-hooks 'time-stamp)
 eval:(setq time-stamp-format '(time-stamp-yyyy/mm/dd time-stamp-hh:mm:ss user-login-name))
End: