[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gettext] gnulib configure.ac and autopoint?
From: |
Daiki Ueno |
Subject: |
Re: [bug-gettext] gnulib configure.ac and autopoint? |
Date: |
Mon, 07 Jan 2013 08:14:31 +0900 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) |
Paul Eggert <address@hidden> writes:
> We should alter gnulib-tool to not indent that line,
> in the short term. In the longer term autopoint should be fixed
> to work even if the AM_GNU_GETTEXT_VERSION line is indented,
> so I'll CC: this message to bug-gnu-gettext.
>
> By the way, I'm puzzled that this problem was discovered just now.
> Isn't there a similar problem with autopoint 0.18.1?
>
> Anyway, here's the patch I installed into gnulib.
Installed the following fix into gettext as well.
>From a071c8a3cdff4f6487390ceeb720cc9ae66e1474 Mon Sep 17 00:00:00 2001
From: Daiki Ueno <address@hidden>
Date: Mon, 7 Jan 2013 08:09:09 +0900
Subject: [PATCH] Make autopoint AM_GNU_GETTEXT_VERSION handling more robust.
---
gettext-tools/misc/ChangeLog | 7 +++++++
gettext-tools/misc/autopoint.in | 12 +++++++++---
2 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/gettext-tools/misc/ChangeLog b/gettext-tools/misc/ChangeLog
index c943598..6351ace 100644
--- a/gettext-tools/misc/ChangeLog
+++ b/gettext-tools/misc/ChangeLog
@@ -1,3 +1,10 @@
+2013-01-07 Daiki Ueno <address@hidden>
+
+ * autopoint.in: Extract version number from configure.ac in a more
+ robust way.
+ Reported by Tom G. Christensen in
+ <http://lists.gnu.org/archive/html/bug-gnulib/2013-01/msg00053.html>.
+
2012-12-25 Daiki Ueno <address@hidden>
* autopoint.in: Update for 0.18.2.
diff --git a/gettext-tools/misc/autopoint.in b/gettext-tools/misc/autopoint.in
index dd7e203..717b0db 100644
--- a/gettext-tools/misc/autopoint.in
+++ b/gettext-tools/misc/autopoint.in
@@ -267,9 +267,15 @@ fi
# Check whether the -V option and the version number in configure.in match.
# At least one of the two must be given. If both are given, they must agree.
-sed_extract_AM_GNU_GETTEXT_VERSION_argument='s/^AM_GNU_GETTEXT_VERSION(\([^()]*\)).*$/\1/'
-sed_remove_outer_brackets='s/^\[\(.*\)\]$/\1/'
-xver=`cat "$configure_in" | grep '^AM_GNU_GETTEXT_VERSION(' | sed -n -e
"$sed_extract_AM_GNU_GETTEXT_VERSION_argument"p | sed -e
"$sed_remove_outer_brackets" | sed -e 1q`
+sed_extract_AM_GNU_GETTEXT_VERSION_argument='
+s,#.*$,,; s,^dnl .*$,,; s, dnl .*$,,;
+/AM_GNU_GETTEXT_VERSION/ {
+ s,^.*AM_GNU_GETTEXT_VERSION(\([^()]*\)).*$,xver=\1,
+ s,^xver=\[\(.*\)\]$,xver=\1,
+ p
+}
+d'
+eval `sed "$sed_extract_AM_GNU_GETTEXT_VERSION_argument" "$configure_in"`
if test -z "$xver" && test -f intl/VERSION; then
xver=`cat intl/VERSION | LC_ALL=C sed -n -e
's/^.*gettext-\([-+_.0-9A-Za-z]*\).*$/\1/p'`
fi
--
1.7.10.4