From 6a9041fe69074840027d7db0e235644c499d05c4 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 13 May 2002 10:05:51 +0000 Subject: [PATCH] Use a more robust syntax for describing the gettext version in configure.in. --- doc/ChangeLog | 5 +++++ doc/autopoint.texi | 4 ++-- doc/gettext.texi | 16 ++++++++++++++-- misc/ChangeLog | 5 +++++ misc/autopoint.in | 4 ++-- misc/gettextize.in | 4 ++-- 6 files changed, 30 insertions(+), 8 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index f62db2fbd..39879f8f1 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,8 @@ +2002-05-11 Bruno Haible + + * autopoint.texi: Recommend AM_GNU_GETTEXT_VERSION(..) syntax. + * gettext.texi (AM_GNU_GETTEXT_VERSION): New subsection. + 2002-05-08 Bruno Haible * matrix.texi: Update. diff --git a/doc/autopoint.texi b/doc/autopoint.texi index 7c726a19d..a2827edb1 100644 --- a/doc/autopoint.texi +++ b/doc/autopoint.texi @@ -5,8 +5,8 @@ autopoint [@var{option}]... @end example The @code{autopoint} program copies standard gettext infrastructure files -into a source package. It extracts from an assignment of the form -@code{GETTEXT_VERSION=@var{version}}, found in the package's +into a source package. It extracts from a macro call of the form +@code{AM_GNU_GETTEXT_VERSION(@var{version})}, found in the package's @file{configure.in} or @file{configure.ac} file, the gettext version used by the package, and copies the infrastructure files belonging to this version into the package. diff --git a/doc/gettext.texi b/doc/gettext.texi index c0e4d379b..085a5e761 100644 --- a/doc/gettext.texi +++ b/doc/gettext.texi @@ -287,6 +287,7 @@ Files You Must Create or Alter Autoconf macros for use in @file{configure.in} * AM_GNU_GETTEXT:: AM_GNU_GETTEXT in @file{gettext.m4} +* AM_GNU_GETTEXT_VERSION:: AM_GNU_GETTEXT_VERSION in @file{gettext.m4} * AM_ICONV:: AM_ICONV in @file{iconv.m4} Integrating with CVS @@ -6242,10 +6243,11 @@ The primary macro is, of course, @code{AM_GNU_GETTEXT}. @menu * AM_GNU_GETTEXT:: AM_GNU_GETTEXT in @file{gettext.m4} +* AM_GNU_GETTEXT_VERSION:: AM_GNU_GETTEXT_VERSION in @file{gettext.m4} * AM_ICONV:: AM_ICONV in @file{iconv.m4} @end menu -@node AM_GNU_GETTEXT, AM_ICONV, autoconf macros, autoconf macros +@node AM_GNU_GETTEXT, AM_GNU_GETTEXT_VERSION, autoconf macros, autoconf macros @subsection AM_GNU_GETTEXT in @file{gettext.m4} @amindex AM_GNU_GETTEXT @@ -6325,7 +6327,17 @@ linker options needed to use iconv and appends them to the @code{LIBINTL} and @code{LTLIBINTL} variables. @end itemize -@node AM_ICONV, , AM_GNU_GETTEXT, autoconf macros +@node AM_GNU_GETTEXT_VERSION, AM_ICONV, AM_GNU_GETTEXT, autoconf macros +@subsection AM_GNU_GETTEXT_VERSION in @file{gettext.m4} + +@amindex AM_GNU_GETTEXT_VERSION +The @code{AM_GNU_GETTEXT_VERSION} macro declares the version number of +the GNU gettext infrastructure that is used by the package. + +The use of this macro is optional; only the @code{autopoint} program makes +use of it (@pxref{CVS Issues}). + +@node AM_ICONV, , AM_GNU_GETTEXT_VERSION, autoconf macros @subsection AM_ICONV in @file{iconv.m4} @amindex AM_ICONV diff --git a/misc/ChangeLog b/misc/ChangeLog index 219829be0..a1a987346 100644 --- a/misc/ChangeLog +++ b/misc/ChangeLog @@ -1,3 +1,8 @@ +2002-05-11 Bruno Haible + + * autopoint.in: Recognize AM_GNU_GETTEXT_VERSION(..) syntax. + * gettextize.in: Likewise. + 2002-05-03 Bruno Haible * autopoint.in: Unset all other environment variables which influence diff --git a/misc/autopoint.in b/misc/autopoint.in index a3d5aef4a..c889d3bae 100644 --- a/misc/autopoint.in +++ b/misc/autopoint.in @@ -138,7 +138,7 @@ 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. -xver=`cat "$configure_in" | grep '^GETTEXT_VERSION=' | sed -e 's/^GETTEXT_VERSION=\([-+_.0-9A-Za-z]*\).*/\1/' | sed -e 1q` +xver=`cat "$configure_in" | grep '^AM_GNU_GETTEXT_VERSION(' | sed -e 's/^AM_GNU_GETTEXT_VERSION(\([^()]*\))/\1/p' | sed -e 's/^\[\(.*\)\]$/\1/' | sed -e 1q` if test -z "$xver" && test -f intl/VERSION; then xver=`cat intl/VERSION | sed -n -e 's/^.*gettext-\(-+_.0-9A-Za-z]*\).*$/\1/p'` fi @@ -152,7 +152,7 @@ if test -n "$xver"; then fi else if test -z "$ver"; then - func_fatal_error "Missing version: please specify in $configure_in through a line 'GETTEXT_VERSION=x.yy.zz' the gettext version the package is using" + func_fatal_error "Missing version: please specify in $configure_in through a line 'AM_GNU_GETTEXT_VERSION(x.yy.zz)' the gettext version the package is using" fi fi diff --git a/misc/gettextize.in b/misc/gettextize.in index 81a24b280..c4b206f8e 100644 --- a/misc/gettextize.in +++ b/misc/gettextize.in @@ -867,8 +867,8 @@ sed -e 's%sed -e "/POTFILES =/r po/POTFILES" po/Makefile\.in > po/Makefile *;* * func_modify_configure_in "(AC_OUTPUT): Remove command that created po/Makefile." sed -e '/^\(dnl \|\)AC_LINK_FILES(\$nls_cv_header_libgt, \$nls_cv_header_intl)$/d' < "$srcdir/$configure_in" > "$srcdir/$configure_in.tmp" func_modify_configure_in "(AC_LINK_FILES): Remove invocation." -sed -e 's/^GETTEXT_VERSION=\([-+_.0-9A-Za-z]*\)/GETTEXT_VERSION='"$version"'/' < "$srcdir/$configure_in" > "$srcdir/$configure_in.tmp" -func_modify_configure_in "(GETTEXT_VERSION): Bump to $version." +sed -e 's/^AM_GNU_GETTEXT_VERSION([^()]*)/AM_GNU_GETTEXT_VERSION('"$version"'/' < "$srcdir/$configure_in" > "$srcdir/$configure_in.tmp" +func_modify_configure_in "(AM_GNU_GETTEXT_VERSION): Bump to $version." $do_changelog && func_ChangeLog_finish # Recommend replacement for deprecated Makefile variables. -- 2.47.2