[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
use latest gettext: 0.18
From: |
Jim Meyering |
Subject: |
use latest gettext: 0.18 |
Date: |
Wed, 26 May 2010 08:12:46 +0200 |
I've just pushed these 4 patches:
maint: don't emit an extra newline in each of two diagnostics
build: update gnulib submodule to latest
maint: update helper scripts from gnulib
build: use latest gettext: 0.18
>From 26818d74472e0d727c33f7a8346b48f372e76acf Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Tue, 25 May 2010 17:50:04 +0200
Subject: [PATCH 1/4] maint: don't emit an extra newline in each of two
diagnostics
* src/main.c (context_length_arg, grepdir): Remove a stray \n in
each of two diagnostics.
---
src/main.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main.c b/src/main.c
index 4c7c0e3..20168bb 100644
--- a/src/main.c
+++ b/src/main.c
@@ -408,7 +408,7 @@ context_length_arg (char const *str, int *out)
&& 0 <= (*out = value)
&& *out == value))
{
- error (EXIT_TROUBLE, 0, "%s: %s\n", str,
+ error (EXIT_TROUBLE, 0, "%s: %s", str,
_("invalid context length argument"));
}
}
@@ -1321,7 +1321,7 @@ grepdir (char const *dir, struct stats const *stats)
&& ancestor->stat.st_dev == stats->stat.st_dev)
{
if (!suppress_errors)
- error (0, 0, _("warning: %s: %s\n"), dir,
+ error (0, 0, _("warning: %s: %s"), dir,
_("recursive directory loop"));
return 1;
}
--
1.7.1.342.g1c280
>From 813a03992cfbb90384e1893f1239d93ec387541b Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Wed, 26 May 2010 07:20:23 +0200
Subject: [PATCH 2/4] build: update gnulib submodule to latest
---
gnulib | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gnulib b/gnulib
index 0127c68..c268320 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit 0127c682ba56fb75597693a333bec25e9d6ed4a8
+Subproject commit c2683209a653dfe553739c586911137b4ef692a7
--
1.7.1.342.g1c280
>From ffd9adf0715436c94d2a1a95070e3688e047328b Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Wed, 19 May 2010 12:34:15 +0200
Subject: [PATCH 3/4] maint: update helper scripts from gnulib
* tests/init.sh: Update from gnulib.
* bootstrap: Likewise.
---
bootstrap | 10 +++++-----
tests/init.sh | 51 ++++++++++++++++++++++++++++++++++-----------------
2 files changed, 39 insertions(+), 22 deletions(-)
diff --git a/bootstrap b/bootstrap
index 365a3d9..e55b3d2 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,6 +1,6 @@
#! /bin/sh
# Print a version string.
-scriptversion=2010-02-24.17; # UTC
+scriptversion=2010-04-30.16; # UTC
# Bootstrap this package from checked-out sources.
@@ -424,7 +424,7 @@ case ${GNULIB_SRCDIR--} in
trap cleanup_gnulib 1 2 13 15
- git clone --help|grep depth > /dev/null && shallow='--depth 2' || shallow=
+ git clone -h|grep -- --depth > /dev/null && shallow='--depth 2' || shallow=
git clone $shallow git://git.sv.gnu.org/gnulib "$gnulib_path" ||
cleanup_gnulib
@@ -437,7 +437,7 @@ case ${GNULIB_SRCDIR--} in
if test -d "$GNULIB_SRCDIR"/.git && \
git_modules_config submodule.gnulib.url >/dev/null; then
echo "$0: getting gnulib files..."
- if git submodule --help|grep reference > /dev/null; then
+ if git submodule -h|grep -- --reference > /dev/null; then
# Prefer the one-liner available in git 1.6.4 or newer.
git submodule update --init --reference "$GNULIB_SRCDIR" \
"$gnulib_path" || exit $?
@@ -819,7 +819,7 @@ if test $with_gettext = yes; then
a\
'"$XGETTEXT_OPTIONS"' $${end_of_xgettext_options+}
}
- ' po/Makevars.template >po/Makevars
+ ' po/Makevars.template >po/Makevars || exit 1
if test -d runtime-po; then
# Similarly for runtime-po/Makevars, but not quite the same.
@@ -833,7 +833,7 @@ if test $with_gettext = yes; then
a\
'"$XGETTEXT_OPTIONS_RUNTIME"' $${end_of_xgettext_options+}
}
- ' <po/Makevars.template >runtime-po/Makevars
+ ' po/Makevars.template >runtime-po/Makevars || exit 1
# Copy identical files from po to runtime-po.
(cd po && cp -p Makefile.in.in *-quot *.header *.sed *.sin ../runtime-po)
diff --git a/tests/init.sh b/tests/init.sh
index 1c0b4b4..ef0957c 100644
--- a/tests/init.sh
+++ b/tests/init.sh
@@ -63,33 +63,50 @@
# - hyphen-containing alias names
# - we prefer to use ${var#...} substitution, rather than having
# to work around lack of support for that feature.
-# The following code attempts to find a shell with support for these features
-# and re-exec's it. If not, it skips the current test.
+# The following code attempts to find a shell with support for these features.
+# If the current shell passes the test, we're done. Otherwise, test other
+# shells until we find one that passes. If one is found, re-exec it.
+# If no acceptable shell is found, skip the current test.
+#
+# Use "9" to indicate success (rather than 0), in case some shell acts
+# like Solaris 10's /bin/sh but exits successfully instead of with status 2.
gl_shell_test_script_='
test $(echo y) = y || exit 1
-test -z "$EXEEXT" && exit 0
+test -z "$EXEEXT" && exit 9
shopt -s expand_aliases
alias a-b="echo zoo"
v=abx
test ${v%x} = ab \
&& test ${v#a} = bx \
- && test $(a-b) = zoo
+ && test $(a-b) = zoo \
+ && exit 9
'
if test "x$1" = "x--no-reexec"; then
shift
else
- for re_shell_ in "${CONFIG_SHELL:-no_shell}" /bin/sh bash dash zsh pdksh fail
- do
- test "$re_shell_" = no_shell && continue
- test "$re_shell_" = fail && skip_ failed to find an adequate shell
- if "$re_shell_" -c "$gl_shell_test_script_" 2>/dev/null; then
- exec "$re_shell_" "$0" --no-reexec "$@"
- echo "$ME_: exec failed" 1>&2
- exit 127
- fi
- done
+ # 'eval'ing the above code makes Solaris 10's /bin/sh exit with $? set to 2.
+ # It does not evaluate any of the code after the "unexpected" `('. Thus,
+ # we must run it in a subshell.
+ ( eval "$gl_shell_test_script_" ) > /dev/null 2>&1
+ if test $? = 9; then
+ : # The current shell is adequate. No re-exec required.
+ else
+ # Search for a shell that meets our requirements.
+ for re_shell_ in "${CONFIG_SHELL:-no_shell}" /bin/sh bash dash zsh pdksh
fail
+ do
+ test "$re_shell_" = no_shell && continue
+ test "$re_shell_" = fail && skip_ failed to find an adequate shell
+ "$re_shell_" -c "$gl_shell_test_script_" 2>/dev/null
+ if test $? = 9; then
+ # Found an acceptable shell.
+ exec "$re_shell_" "$0" --no-reexec "$@"
+ echo "$ME_: exec failed" 1>&2
+ exit 127
+ fi
+ done
+ fi
fi
test -n "$EXEEXT" && shopt -s expand_aliases
@@ -98,7 +115,7 @@ test -n "$EXEEXT" && shopt -s expand_aliases
# This is cheap and useful for exposing code that depends on the fact that
# malloc-related functions often return memory that is mostly zeroed.
# If you have the time and cycles, use valgrind to do an even better job.
-${MALLOC_PERTURB_=87}
+: ${MALLOC_PERTURB_=87}
export MALLOC_PERTURB_
# We use a trap below for cleanup. This requires us to go through
@@ -126,9 +143,9 @@ framework_failure_() { warn_ "$ME_: set-up failure: $@";
Exit 1; }
# a partition, or to undo any other global state changes.
cleanup_() { :; }
-if ( diff --version < /dev/null 2>&1 | grep GNU ) 2>&1 > /dev/null; then
+if ( diff --version < /dev/null 2>&1 | grep GNU ) > /dev/null 2>&1; then
compare() { diff -u "$@"; }
-elif ( cmp --version < /dev/null 2>&1 | grep GNU ) 2>&1 > /dev/null; then
+elif ( cmp --version < /dev/null 2>&1 | grep GNU ) > /dev/null 2>&1; then
compare() { cmp -s "$@"; }
else
compare() { cmp "$@"; }
--
1.7.1.342.g1c280
>From 6fa0d1364bad16e09839a24a78f27a0fe0cf6b67 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Wed, 19 May 2010 12:44:33 +0200
Subject: [PATCH 4/4] build: use latest gettext: 0.18
* configure.ac: Use gettext-0.18.
* bootstrap.conf (gnulib_modules): Use gettext-h, not gettext.
since the latter drags in a depedency on gettext 0.18.
Suggested by Bruno Haible.
---
bootstrap.conf | 2 +-
configure.ac | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/bootstrap.conf b/bootstrap.conf
index a836d5c..1da6823 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -35,7 +35,7 @@ fcntl-h
fnmatch
getopt-gnu
getpagesize
-gettext
+gettext-h
git-version-gen
gitlog-to-changelog
gnu-web-doc-update
diff --git a/configure.ac b/configure.ac
index 7eaeed3..01ae0f2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -144,7 +144,7 @@ AC_FUNC_CLOSEDIR_VOID
AC_CHECK_FUNCS_ONCE(isascii iswctype setlocale wcscoll)
dnl I18N feature
-AM_GNU_GETTEXT_VERSION([0.17])
+AM_GNU_GETTEXT_VERSION([0.18])
AM_GNU_GETTEXT([external])
dnl Some installers want to be informed if we do not use our regex.
--
1.7.1.342.g1c280
- use latest gettext: 0.18,
Jim Meyering <=