]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* bin/autoreconf.in (autoreconf): Rewrite to use Gettext's
authorAkim Demaille <akim@epita.fr>
Fri, 3 May 2002 16:09:11 +0000 (16:09 +0000)
committerAkim Demaille <akim@epita.fr>
Fri, 3 May 2002 16:09:11 +0000 (16:09 +0000)
autopoint instead of gettextize.
($uses_alocal): Rename as...
($uses_aclocal): this.
* doc/autoconf.texi (autoreconf Invocation): Adjust.
Suggested by Bruno Haible.

ChangeLog
NEWS
bin/autoreconf.in
doc/autoconf.texi
man/autoreconf.1

index 6e41d2983d36175c90206a32a9c18e0a557812d4..9d158a8498427707bcbfe21edd667623d3ec04f1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2002-05-03  Akim Demaille  <akim@epita.fr>
+
+       * bin/autoreconf.in (autoreconf): Rewrite to use Gettext's
+       autopoint instead of gettextize.
+       ($uses_alocal): Rename as...
+       ($uses_aclocal): this.
+       * doc/autoconf.texi (autoreconf Invocation): Adjust.
+       Suggested by Bruno Haible.
+
 2002-05-03  Akim Demaille  <akim@epita.fr>
 
        * lib/m4sugar/m4sugar.m4 (m4_map_sep): New.
diff --git a/NEWS b/NEWS
index 6c44c3291d91c44c802c8973403a60826cc0ce8f..2dc03720c3124e43c8d12bad3cb71d19c57dbcf7 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,7 +2,12 @@
 
 ** Executables
 
-- autoreconf is adjusted to GNU Gettext 0.11.
+- autoreconf is adjusted to GNU Gettext 0.11.3.
+  Warning: It now relies on autopoint, available since 0.11.3.
+  This is much safer and much more satisfying than the previous
+  scheme based on gettextize.  Don't expect proper functioning
+  with older Gettexts.
+  Many thanks to Bruno Haible for autopoint!
 
 ** Macros
 
index 3cbcab69d1400edc771af6b21cd6ad7fe507c974..65b0ef5f17cc6c1e2e1ba05b1e7e75e21806927e 100644 (file)
@@ -45,10 +45,10 @@ use strict;
 # -----
 $help = "Usage: $0 [OPTION] ... [CONFIGURE-AC or DIRECTORY] ...
 
-Run `autoconf' (and `autoheader', `aclocal', `automake', `gettextize',
-and `libtoolize' where appropriate) repeatedly to remake the GNU Build
-System files in the DIRECTORIES or the directory trees driven by
-CONFIGURE-AC (defaulting to `.').
+Run `autoconf' (and `autoheader', `aclocal', `automake', `autopoint'
+(formerly `gettextize'), and `libtoolize' where appropriate)
+repeatedly to remake the GNU Build System files in the DIRECTORIES or
+the directory trees driven by CONFIGURE-AC (defaulting to `.').
 
 By default, it only remakes those files that are older than their
 predecessors.  If you install new versions of the GNU Build System,
@@ -68,7 +68,7 @@ Library directories:
   -I, --include=DIR  look for FILES in DIR (cumulative)
 
 The environment variables AUTOCONF, AUTOHEADER, AUTOMAKE, ACLOCAL,
-GETTEXTIZE, LIBTOOLIZE are honored.
+AUTOPOINT, LIBTOOLIZE are honored.
 
 Report bugs to <bug-autoconf\@gnu.org>.
 ";
@@ -89,11 +89,7 @@ my $autoheader = $ENV{'AUTOHEADER'} || '@autoheader-name@';
 my $automake   = $ENV{'AUTOMAKE'}   || 'automake';
 my $aclocal    = $ENV{'ACLOCAL'}    || 'aclocal';
 my $libtoolize = $ENV{'LIBTOOLIZE'} || 'libtoolize';
-my $gettextize = $ENV{'GETTEXTIZE'} || 'gettextize';
-
-# Does gettextize support --no-changelog and --intl?
-my $gettextize_intl_p;
-my $gettextize_no_changelog_p;
+my $autopoint  = $ENV{'AUTOPOINT'}  || 'autopoint';
 
 # --install -- as --add-missing in other tools.
 my $install = 0;
@@ -140,7 +136,7 @@ sub parse_args ()
       print STDERR "\n";
       xsystem ("$aclocal --version | sed 1q >&2");
       print STDERR "\n";
-      xsystem ("$gettextize --version | sed 1q >&2");
+      xsystem ("$autopoint --version | sed 1q >&2");
       print STDERR "\n";
       xsystem ("$libtoolize --version | sed 1q >&2");
       print STDERR "\n";
@@ -156,7 +152,6 @@ sub parse_args ()
     {
       $automake   .= ' --add-missing';
       $automake   .= ' --copy' unless $symlink;
-      $gettextize .= ' --copy' unless $symlink;
       $libtoolize .= ' --copy' unless $symlink;
     }
   # --force;
@@ -165,7 +160,7 @@ sub parse_args ()
       $autoconf   .= ' --force';
       $autoheader .= ' --force';
       $automake   .= ' --force-missing';
-      $gettextize .= ' --force';
+      $autopoint  .= ' --force';
       $libtoolize .= ' --force';
     }
   else
@@ -184,29 +179,6 @@ sub parse_args ()
 }
 
 
-# &study_gettextize
-# -----------------
-# See what options gettextize supports.
-sub study_gettextize ()
-{
-  return
-    if defined $gettextize_no_changelog_p && defined $gettextize_intl_p;
-
-  $gettextize_no_changelog_p = 0;
-  $gettextize_intl_p = 0;
-
-  my $usage = new Autom4te::XFile ("$gettextize --help |");
-  while ($_ = $usage->getline)
-    {
-      $gettextize_no_changelog_p = 1 if /--no-changelog/;
-      $gettextize_intl_p = 1         if /--intl/;
-    }
-
-  $gettextize .= " --no-changelog" if $gettextize_no_changelog_p;
-}
-
-
-
 # &autoreconf ($DIRECTORY)
 # ------------------------
 # Reconf the $DIRECTORY.
@@ -306,7 +278,7 @@ sub autoreconf ($)
 
   # We might have to rerun aclocal if Libtool or Gettext import new
   # macros.
-  my $rerun_alocal = 0;
+  my $rerun_aclocal = 0;
 
 
   # ------------------------------- #
@@ -317,8 +289,6 @@ sub autoreconf ($)
   # between two --trace, that's useless.  If there is no AC_INIT, then
   # we are not interested: it looks like a Cygnus thingy.
   my $uses_gettext;
-  # Starting at GNU Gettext 0.11, libintl is optional.
-  my $uses_libintl;
   my $uses_libtool;
   my $uses_autoheader;
   my @subdir;
@@ -332,11 +302,7 @@ sub autoreconf ($)
   while ($_ = $traces->getline)
     {
       $uses_autoconf = 1            if /AC_INIT/;
-      if (/AM_GNU_GETTEXT/)
-       {
-         $uses_gettext = 1;
-         $uses_libintl = !/external/;
-       }
+      $uses_gettext = 1             if /AM_GNU_GETTEXT/;
       $uses_libtool = 1             if /AC_PROG_LIBTOOL/;
       $uses_autoheader = 1          if /AC_CONFIG_HEADERS/;
       push @subdir, split (' ', $1) if /AC_CONFIG_SUBDIRS:(.*)/;
@@ -358,9 +324,9 @@ sub autoreconf ($)
 
 
 
-  # -------------------- #
-  # Running gettextize.  #
-  # -------------------- #
+  # ------------------- #
+  # Running autopoint.  #
+  # ------------------- #
 
   if (!$uses_gettext)
     {
@@ -368,52 +334,12 @@ sub autoreconf ($)
     }
   elsif (!$install)
     {
-      verbose "$configure_ac: not running gettextize: --install not given";
+      verbose "$configure_ac: not running autopoint: --install not given";
     }
   else
     {
-      # See if gettextize supports --intl and --no-changelog.
-      study_gettextize;
-
-      # Old and new gettext are really different :(
-      if ($gettextize_intl_p)
-       {
-         # Gettext >= 0.11.
-         if ($uses_libintl)
-           {
-             if (-d 'intl' && !$force)
-               {
-                 verbose ("$configure_ac: not running gettextize: ",
-                          "`intl' is already present");
-               }
-             else
-               {
-                 xsystem "$gettextize --intl";
-                 $rerun_alocal = 1;
-               }
-           }
-         else
-           {
-             # Always run modern gettextizes, as they update/import
-             # several files.
-             xsystem "$gettextize";
-             $rerun_alocal = 1;
-           }
-       }
-      else
-       {
-         # Gettext < 0.11.
-         if (-d 'intl' && !$force)
-           {
-             verbose ("$configure_ac: not running gettextize: ",
-                      "`intl' is already present");
-           }
-         else
-           {
-             xsystem "$gettextize --intl";
-             $rerun_alocal = 1;
-           }
-       }
+      xsystem "$autopoint";
+      $rerun_aclocal = 1;
     }
 
 
@@ -428,7 +354,7 @@ sub autoreconf ($)
   elsif ($install)
     {
       xsystem ($libtoolize);
-      $rerun_alocal = 1;
+      $rerun_aclocal = 1;
     }
   else
     {
@@ -442,7 +368,7 @@ sub autoreconf ($)
 
   # If we re-installed Libtool or Gettext, the macros might have changed.
   # Automake also needs an up-to-date aclocal.m4.
-  if ($rerun_alocal)
+  if ($rerun_aclocal)
     {
       if (!$uses_aclocal)
        {
@@ -462,7 +388,7 @@ sub autoreconf ($)
              # aclocal at first (before tracing), which, for instance,
              # can find Gettext's macros in .../share/aclocal, so we
              # may have had the right aclocal.m4 already.  Then
-             # gettextize is run, and installs locally these M4
+             # autopoint is run, and installs locally these M4
              # files.  Then autoreconf, via update_file, sees it is
              # the _same_ aclocal.m4, and doesn't change its
              # timestamp.  But later, Automake's Makefile expresses
index bf62bad376bdcfa4dcb65e5375028df3a0916bb3..f19daa7e5c6e4e43f828f3a4fdbcc2aff4ab9771 100644 (file)
@@ -1380,14 +1380,15 @@ AUTOMAKE|:::::|automake|:::::|$missing_dir
 @cindex @command{autoreconf}
 
 Installing the various components of the @sc{gnu} Build System can be
-tedious: running @command{gettextize}, @command{automake} etc. in each
-directory.  It may be needed either because some tools such as
-@command{automake} have been updated on your system, or because some of
-the sources such as @file{configure.ac} have been updated, or finally,
-simply in order to install the @sc{gnu} Build System in a fresh tree.
+tedious: running @command{autopoint} for Gettext, @command{automake} for
+@file{Makefile.in} etc. in each directory.  It may be needed either
+because some tools such as @command{automake} have been updated on your
+system, or because some of the sources such as @file{configure.ac} have
+been updated, or finally, simply in order to install the @sc{gnu} Build
+System in a fresh tree.
 
 It runs @command{autoconf}, @command{autoheader}, @command{aclocal},
-@command{automake}, @command{libtoolize}, and @command{gettextize} (when
+@command{automake}, @command{libtoolize}, and @command{autopoint} (when
 appropriate) repeatedly to update the @sc{gnu} Build System in specified
 directories, and their subdirectories (@pxref{Subdirectories}).  By
 default, it only remakes those files that are older than their sources.
index cf34acf4f83dedaca71f32c8448f8eb0e5cfad88..7fab35ea8d37b6807fbade88fa007396cc50229f 100644 (file)
@@ -1,15 +1,15 @@
 .\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.27.
-.TH AUTORECONF "1" "April 2002" "autoreconf 2.53b" "User Commands"
+.TH AUTORECONF "1" "May 2002" "autoreconf 2.53b" "User Commands"
 .SH NAME
 autoreconf \- Update generated configuration files
 .SH SYNOPSIS
 .B autoreconf
 [\fIOPTION\fR] ... [\fICONFIGURE-AC or DIRECTORY\fR] ...
 .SH DESCRIPTION
-Run `autoconf' (and `autoheader', `aclocal', `automake', `gettextize',
-and `libtoolize' where appropriate) repeatedly to remake the GNU Build
-System files in the DIRECTORIES or the directory trees driven by
-CONFIGURE-AC (defaulting to `.').
+Run `autoconf' (and `autoheader', `aclocal', `automake', `autopoint'
+(formerly `gettextize'), and `libtoolize' where appropriate)
+repeatedly to remake the GNU Build System files in the DIRECTORIES or
+the directory trees driven by CONFIGURE-AC (defaulting to `.').
 .PP
 By default, it only remakes those files that are older than their
 predecessors.  If you install new versions of the GNU Build System,
@@ -43,7 +43,7 @@ instead of copying, install symbolic links
 look for FILES in DIR (cumulative)
 .PP
 The environment variables AUTOCONF, AUTOHEADER, AUTOMAKE, ACLOCAL,
-GETTEXTIZE, LIBTOOLIZE are honored.
+AUTOPOINT, LIBTOOLIZE are honored.
 .SH AUTHOR
 Written by David J. MacKenzie and Akim Demaille.
 .PP