|
|
d0ef839 |
2012-08-17 Jeff Law <law@redhat.com>
|
|
|
d0ef839 |
|
|
|
d0ef839 |
* intl/Makefile (codeset_mo): New variable.
|
|
|
d0ef839 |
($(codeset_mo)): New target.
|
|
|
d0ef839 |
(tst-codeset.out): Depend on that. Remove explicit rule.
|
|
|
d0ef839 |
(tst-gettext3.out, tst-gettext5.out): Likewise.
|
|
|
d0ef839 |
(LOCPATH-ENV, tst-codeset-ENV): New variables.
|
|
|
d0ef839 |
(tst-gettext3-ENV, tst-gettext5-ENV): Likewise.
|
|
|
d0ef839 |
* intl/tst-codeset.sh: Remove.
|
|
|
d0ef839 |
* intl/tst-gettext3.sh: Likewise.
|
|
|
d0ef839 |
* intl/tst-gettext5.sh: Likewise.
|
|
|
d0ef839 |
|
|
|
d0ef839 |
diff --git a/intl/Makefile b/intl/Makefile
|
|
|
d0ef839 |
index e95f519..d63ffe4 100644
|
|
|
d0ef839 |
--- a/intl/Makefile
|
|
|
d0ef839 |
+++ b/intl/Makefile
|
|
|
d0ef839 |
@@ -61,6 +61,16 @@ ifneq (no,$(PERL))
|
|
|
d0ef839 |
tests: $(objpfx)mtrace-tst-gettext
|
|
|
d0ef839 |
endif
|
|
|
d0ef839 |
endif
|
|
|
d0ef839 |
+
|
|
|
d0ef839 |
+# Multiple tests use this data. Create it once to avoid racing and
|
|
|
d0ef839 |
+# spurious test failures.
|
|
|
d0ef839 |
+codeset_mo = $(objpfx)domaindir/de_DE/LC_MESSAGES/codeset.mo
|
|
|
d0ef839 |
+
|
|
|
d0ef839 |
+$(codeset_mo):
|
|
|
d0ef839 |
+ $(make-target-directory)
|
|
|
d0ef839 |
+ msgfmt -o $@T tstcodeset.po
|
|
|
d0ef839 |
+ mv -f $@T $@
|
|
|
d0ef839 |
+
|
|
|
d0ef839 |
$(objpfx)mtrace-tst-gettext: $(objpfx)tst-gettext.out
|
|
|
d0ef839 |
$(common-objpfx)malloc/mtrace $(objpfx)tst-gettext.mtrace > $@
|
|
|
d0ef839 |
$(objpfx)tst-gettext.out: tst-gettext.sh $(objpfx)tst-gettext
|
|
|
d0ef839 |
@@ -70,16 +80,14 @@ $(objpfx)tst-translit.out: tst-translit.sh $(objpfx)tst-translit
|
|
|
d0ef839 |
$(SHELL) -e $< $(common-objpfx) $(common-objpfx)intl/
|
|
|
d0ef839 |
$(objpfx)tst-gettext2.out: tst-gettext2.sh $(objpfx)tst-gettext2
|
|
|
d0ef839 |
$(SHELL) -e $< $(common-objpfx) $(common-objpfx)intl/
|
|
|
d0ef839 |
-$(objpfx)tst-codeset.out: tst-codeset.sh $(objpfx)tst-codeset
|
|
|
d0ef839 |
- $(SHELL) -e $< $(common-objpfx) $(common-objpfx)intl/
|
|
|
d0ef839 |
-$(objpfx)tst-gettext3.out: tst-gettext3.sh $(objpfx)tst-gettext3
|
|
|
d0ef839 |
- $(SHELL) -e $< $(common-objpfx) $(common-objpfx)intl/
|
|
|
d0ef839 |
$(objpfx)tst-gettext4.out: tst-gettext4.sh $(objpfx)tst-gettext4
|
|
|
d0ef839 |
$(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' $(common-objpfx)intl/
|
|
|
d0ef839 |
-$(objpfx)tst-gettext5.out: tst-gettext5.sh $(objpfx)tst-gettext5
|
|
|
d0ef839 |
- $(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' $(common-objpfx)intl/
|
|
|
d0ef839 |
$(objpfx)tst-gettext6.out: tst-gettext6.sh $(objpfx)tst-gettext6
|
|
|
d0ef839 |
$(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' $(common-objpfx)intl/
|
|
|
d0ef839 |
+
|
|
|
d0ef839 |
+$(objpfx)tst-codeset.out: $(codeset_mo)
|
|
|
d0ef839 |
+$(objpfx)tst-gettext3.out: $(codeset_mo)
|
|
|
d0ef839 |
+$(objpfx)tst-gettext5.out: $(codeset_mo)
|
|
|
d0ef839 |
endif
|
|
|
d0ef839 |
endif
|
|
|
d0ef839 |
|
|
|
d0ef839 |
@@ -96,6 +104,11 @@ CFLAGS-tst-gettext4.c = -DOBJPFX=\"$(objpfx)\"
|
|
|
d0ef839 |
CFLAGS-tst-gettext5.c = -DOBJPFX=\"$(objpfx)\"
|
|
|
d0ef839 |
CFLAGS-tst-gettext6.c = -DOBJPFX=\"$(objpfx)\"
|
|
|
d0ef839 |
|
|
|
d0ef839 |
+LOCPATH-ENV = LOCPATH=$(common-objpfx)localedata
|
|
|
d0ef839 |
+tst-codeset-ENV = $(LOCPATH-ENV)
|
|
|
d0ef839 |
+tst-gettext3-ENV = $(LOCPATH-ENV)
|
|
|
d0ef839 |
+tst-gettext5-ENV = $(LOCPATH-ENV)
|
|
|
d0ef839 |
+
|
|
|
d0ef839 |
ifeq ($(have-thread-library),yes)
|
|
|
d0ef839 |
ifeq (yes,$(build-shared))
|
|
|
d0ef839 |
$(addprefix $(objpfx),$(multithread-test-srcs)): $(shared-thread-library)
|
|
|
d0ef839 |
diff --git a/intl/tst-codeset.sh b/intl/tst-codeset.sh
|
|
|
d0ef839 |
deleted file mode 100644
|
|
|
d0ef839 |
index 1584490..0000000
|
|
|
d0ef839 |
--- a/intl/tst-codeset.sh
|
|
|
d0ef839 |
+++ /dev/null
|
|
|
d0ef839 |
@@ -1,42 +0,0 @@
|
|
|
d0ef839 |
-#! /bin/sh
|
|
|
d0ef839 |
-# Test of bind_textdomain_codeset.
|
|
|
d0ef839 |
-# Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
|
|
|
d0ef839 |
-# This file is part of the GNU C Library.
|
|
|
d0ef839 |
-#
|
|
|
d0ef839 |
-
|
|
|
d0ef839 |
-# The GNU C Library is free software; you can redistribute it and/or
|
|
|
d0ef839 |
-# modify it under the terms of the GNU Lesser General Public
|
|
|
d0ef839 |
-# License as published by the Free Software Foundation; either
|
|
|
d0ef839 |
-# version 2.1 of the License, or (at your option) any later version.
|
|
|
d0ef839 |
-
|
|
|
d0ef839 |
-# The GNU C Library is distributed in the hope that it will be useful,
|
|
|
d0ef839 |
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
d0ef839 |
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
d0ef839 |
-# Lesser General Public License for more details.
|
|
|
d0ef839 |
-
|
|
|
d0ef839 |
-# You should have received a copy of the GNU Lesser General Public
|
|
|
d0ef839 |
-# License along with the GNU C Library; if not, see
|
|
|
d0ef839 |
-# <http://www.gnu.org/licenses/>.
|
|
|
d0ef839 |
-
|
|
|
d0ef839 |
-common_objpfx=$1
|
|
|
d0ef839 |
-objpfx=$2
|
|
|
d0ef839 |
-
|
|
|
d0ef839 |
-LC_ALL=C
|
|
|
d0ef839 |
-export LC_ALL
|
|
|
d0ef839 |
-
|
|
|
d0ef839 |
-# Generate the test data.
|
|
|
d0ef839 |
-msgfmt -o ${objpfx}codeset.mo.$$ tstcodeset.po || exit
|
|
|
d0ef839 |
-# Create the domain directories.
|
|
|
d0ef839 |
-mkdir -p ${objpfx}domaindir/de_DE/LC_MESSAGES
|
|
|
d0ef839 |
-# Populate them.
|
|
|
d0ef839 |
-mv -f ${objpfx}codeset.mo.$$ ${objpfx}domaindir/de_DE/LC_MESSAGES/codeset.mo
|
|
|
d0ef839 |
-
|
|
|
d0ef839 |
-GCONV_PATH=${common_objpfx}iconvdata
|
|
|
d0ef839 |
-export GCONV_PATH
|
|
|
d0ef839 |
-LOCPATH=${common_objpfx}localedata
|
|
|
d0ef839 |
-export LOCPATH
|
|
|
d0ef839 |
-
|
|
|
d0ef839 |
-${common_objpfx}elf/ld.so --library-path $common_objpfx \
|
|
|
d0ef839 |
-${objpfx}tst-codeset > ${objpfx}tst-codeset.out
|
|
|
d0ef839 |
-
|
|
|
d0ef839 |
-exit $?
|
|
|
d0ef839 |
diff --git a/intl/tst-gettext3.sh b/intl/tst-gettext3.sh
|
|
|
d0ef839 |
deleted file mode 100644
|
|
|
d0ef839 |
index 032379c..0000000
|
|
|
d0ef839 |
--- a/intl/tst-gettext3.sh
|
|
|
d0ef839 |
+++ /dev/null
|
|
|
d0ef839 |
@@ -1,43 +0,0 @@
|
|
|
d0ef839 |
-#! /bin/sh
|
|
|
d0ef839 |
-# Test that the gettext() results come out in the correct encoding for
|
|
|
d0ef839 |
-# locales that differ only in their encoding.
|
|
|
d0ef839 |
-# Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
|
|
|
d0ef839 |
-# This file is part of the GNU C Library.
|
|
|
d0ef839 |
-#
|
|
|
d0ef839 |
-
|
|
|
d0ef839 |
-# The GNU C Library is free software; you can redistribute it and/or
|
|
|
d0ef839 |
-# modify it under the terms of the GNU Lesser General Public
|
|
|
d0ef839 |
-# License as published by the Free Software Foundation; either
|
|
|
d0ef839 |
-# version 2.1 of the License, or (at your option) any later version.
|
|
|
d0ef839 |
-
|
|
|
d0ef839 |
-# The GNU C Library is distributed in the hope that it will be useful,
|
|
|
d0ef839 |
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
d0ef839 |
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
d0ef839 |
-# Lesser General Public License for more details.
|
|
|
d0ef839 |
-
|
|
|
d0ef839 |
-# You should have received a copy of the GNU Lesser General Public
|
|
|
d0ef839 |
-# License along with the GNU C Library; if not, see
|
|
|
d0ef839 |
-# <http://www.gnu.org/licenses/>.
|
|
|
d0ef839 |
-
|
|
|
d0ef839 |
-common_objpfx=$1
|
|
|
d0ef839 |
-objpfx=$2
|
|
|
d0ef839 |
-
|
|
|
d0ef839 |
-LC_ALL=C
|
|
|
d0ef839 |
-export LC_ALL
|
|
|
d0ef839 |
-
|
|
|
d0ef839 |
-# Generate the test data.
|
|
|
d0ef839 |
-msgfmt -o ${objpfx}codeset.mo.$$ tstcodeset.po || exit
|
|
|
d0ef839 |
-# Create the domain directories.
|
|
|
d0ef839 |
-mkdir -p ${objpfx}domaindir/de_DE/LC_MESSAGES
|
|
|
d0ef839 |
-# Populate them.
|
|
|
d0ef839 |
-mv -f ${objpfx}codeset.mo.$$ ${objpfx}domaindir/de_DE/LC_MESSAGES/codeset.mo
|
|
|
d0ef839 |
-
|
|
|
d0ef839 |
-GCONV_PATH=${common_objpfx}iconvdata
|
|
|
d0ef839 |
-export GCONV_PATH
|
|
|
d0ef839 |
-LOCPATH=${common_objpfx}localedata
|
|
|
d0ef839 |
-export LOCPATH
|
|
|
d0ef839 |
-
|
|
|
d0ef839 |
-${common_objpfx}elf/ld.so --library-path $common_objpfx \
|
|
|
d0ef839 |
-${objpfx}tst-gettext3 > ${objpfx}tst-gettext3.out
|
|
|
d0ef839 |
-
|
|
|
d0ef839 |
-exit $?
|
|
|
d0ef839 |
diff --git a/intl/tst-gettext5.sh b/intl/tst-gettext5.sh
|
|
|
d0ef839 |
deleted file mode 100755
|
|
|
d0ef839 |
index a563b43..0000000
|
|
|
d0ef839 |
--- a/intl/tst-gettext5.sh
|
|
|
d0ef839 |
+++ /dev/null
|
|
|
d0ef839 |
@@ -1,42 +0,0 @@
|
|
|
d0ef839 |
-#! /bin/sh
|
|
|
d0ef839 |
-# Test that gettext() in multithreaded applications works correctly if
|
|
|
d0ef839 |
-# different threads operate in different locales referring to the same
|
|
|
d0ef839 |
-# catalog file but with different encodings.
|
|
|
d0ef839 |
-# Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
|
|
|
d0ef839 |
-# This file is part of the GNU C Library.
|
|
|
d0ef839 |
-#
|
|
|
d0ef839 |
-
|
|
|
d0ef839 |
-# The GNU C Library is free software; you can redistribute it and/or
|
|
|
d0ef839 |
-# modify it under the terms of the GNU Lesser General Public
|
|
|
d0ef839 |
-# License as published by the Free Software Foundation; either
|
|
|
d0ef839 |
-# version 2.1 of the License, or (at your option) any later version.
|
|
|
d0ef839 |
-
|
|
|
d0ef839 |
-# The GNU C Library is distributed in the hope that it will be useful,
|
|
|
d0ef839 |
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
d0ef839 |
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
d0ef839 |
-# Lesser General Public License for more details.
|
|
|
d0ef839 |
-
|
|
|
d0ef839 |
-# You should have received a copy of the GNU Lesser General Public
|
|
|
d0ef839 |
-# License along with the GNU C Library; if not, see
|
|
|
d0ef839 |
-# <http://www.gnu.org/licenses/>.
|
|
|
d0ef839 |
-
|
|
|
d0ef839 |
-common_objpfx=$1
|
|
|
d0ef839 |
-run_program_prefix=$2
|
|
|
d0ef839 |
-objpfx=$3
|
|
|
d0ef839 |
-
|
|
|
d0ef839 |
-LC_ALL=C
|
|
|
d0ef839 |
-export LC_ALL
|
|
|
d0ef839 |
-
|
|
|
d0ef839 |
-# Create the domain directories.
|
|
|
d0ef839 |
-mkdir -p ${objpfx}domaindir/de_DE/LC_MESSAGES
|
|
|
d0ef839 |
-# Populate them.
|
|
|
d0ef839 |
-msgfmt -o ${objpfx}domaindir/de_DE/LC_MESSAGES/codeset.mo tstcodeset.po
|
|
|
d0ef839 |
-
|
|
|
d0ef839 |
-GCONV_PATH=${common_objpfx}iconvdata
|
|
|
d0ef839 |
-export GCONV_PATH
|
|
|
d0ef839 |
-LOCPATH=${common_objpfx}localedata
|
|
|
d0ef839 |
-export LOCPATH
|
|
|
d0ef839 |
-
|
|
|
d0ef839 |
-${run_program_prefix} ${objpfx}tst-gettext5 > ${objpfx}tst-gettext5.out
|
|
|
d0ef839 |
-
|
|
|
d0ef839 |
-exit $?
|