]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* bin/autoconf.as: Kill dead options.
authorAkim Demaille <akim@epita.fr>
Wed, 16 Oct 2002 06:38:50 +0000 (06:38 +0000)
committerAkim Demaille <akim@epita.fr>
Wed, 16 Oct 2002 06:38:50 +0000 (06:38 +0000)
* bin/autoupdate.in (&parse_args): Kill old options.
* bin/autoreconf.in (&parse_args): Remove dead options.
Factor some code.
(&autoreconf): Report the directories we enter *and leave*, so
that error messages can be easily located, and use GNU Make
format, so that Emacs' compile mode understands us.
* lib/Autom4te/General.pm (&update_file): Use `verbose' to report
if some file was changed instead of `print'.
* bin/autoheader.in: Suggest AC_DEFINE with 3 args when needed.
(&parse_args): Remove the dead options.
* tests/atspecific.m4 (AT_CHECK_AUTOHEADER): Adjust to the new
autoheader's quiet mode.
(AT_CHECK_AUTOUPDATE): Likewise.
* tests/tools.at (autoupdate): Adjust.
* tests/semantics.at (AC_C_BIGENDIAN): Likewise.

ChangeLog
NEWS
bin/autoconf.as
bin/autoconf.in
bin/autoheader.in
bin/autoreconf.in
bin/autoupdate.in
lib/Autom4te/General.pm
tests/atspecific.m4
tests/semantics.at
tests/tools.at

index 9e4390ce71eb54ecc0dabe6939a3daf5201811cd..840f4aedde82de6014a094b742f4e9fb8ec210d6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2002-10-16  Akim Demaille  <akim@epita.fr>
+
+       * bin/autoconf.as: Kill dead options.
+       * bin/autoupdate.in (&parse_args): Kill old options.
+       * bin/autoreconf.in (&parse_args): Remove dead options.
+       Factor some code.
+       (&autoreconf): Report the directories we enter *and leave*, so
+       that error messages can be easily located, and use GNU Make
+       format, so that Emacs' compile mode understands us.
+       * lib/Autom4te/General.pm (&update_file): Use `verbose' to report
+       if some file was changed instead of `print'.
+       * bin/autoheader.in: Suggest AC_DEFINE with 3 args when needed.
+       (&parse_args): Remove the dead options.
+       * tests/atspecific.m4 (AT_CHECK_AUTOHEADER): Adjust to the new
+       autoheader's quiet mode.
+       (AT_CHECK_AUTOUPDATE): Likewise.
+       * tests/tools.at (autoupdate): Adjust.
+       * tests/semantics.at (AC_C_BIGENDIAN): Likewise.
+
 2002-10-11  Akim Demaille  <akim@epita.fr>
 
        No longer use CPP to check for the existing of headers: use CC to
diff --git a/NEWS b/NEWS
index e197bf5e318ce6bf57cffaff404ffe56ae7010d3..6eb43217dbba7005bc189b4c1d30d5e1ebf989d5 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,13 @@
 * Major changes in Autoconf 2.54a                       -*- outline -*-
 \f
 
+** autoreconf
+
+- Is more robust to different Gettext installations.
+
+- Produces messages (when --verbose) to be understood by Emacs'
+  compile mode.
+
 ** Macros
 
 - AC_CHECK_HEADER/AC_CHECK_HEADERS
index 9ef647dbefe9b4e8189f57296629860f6dccb933..b7549e079779b2e7e4bb710d335d5ec977be4a4b 100644 (file)
@@ -27,15 +27,15 @@ to the standard output if TEMPLATE-FILE is given, else into
 \`configure'.
 
 Operation modes:
-  -h, --help               print this help, then exit
-  -V, --version            print version number, then exit
-  -v, --verbose            verbosely report processing
-  -d, --debug              don't remove temporary files
+  -h, --help                  print this help, then exit
+  -V, --version               print version number, then exit
+  -v, --verbose               verbosely report processing
+  -d, --debug                 don't remove temporary files
   -B, --prepend-include=DIR   prepend directory DIR to search path
   -I, --include=DIR           append directory DIR to search path
-  -f, --force              consider all files obsolete
-  -o, --output=FILE        save output in FILE (stdout is the default)
-  -W, --warnings=CATEGORY  report the warnings falling in CATEGORY [syntax]
+  -f, --force                 consider all files obsolete
+  -o, --output=FILE           save output in FILE (stdout is the default)
+  -W, --warnings=CATEGORY     report the warnings falling in CATEGORY [syntax]
 
 Warning categories include:
   \`cross'         cross compilation issues
@@ -112,18 +112,6 @@ while test $# -gt 0 ; do
        AUTOM4TE="$AUTOM4TE $option $2"
        shift 2 ;;
 
-    # Obsolete options.
-    --localdir=* | -l?* | --autoconf-dir=* | -A?* | --macrodir=* | -m?* )
-       echo "$me: warning: $option is obsolete, use --include" >&2
-       AUTOM4TE="$AUTOM4TE --include=$optarg"
-       shift ;;
-    --localdir | -l | --autoconf-dir | -A | --macrodir | -m )
-       echo "$me: warning: $option is obsolete, use --include" >&2
-       test $# = 1 && eval "$exit_missing_arg"
-       shift
-       AUTOM4TE="$AUTOM4TE --include=$1"
-       shift ;;
-
     --trace=* | -t?* )
        traces="$traces --trace='"`echo "$optarg" | sed "s/'/'\\\\\\\\''/g"`"'"
        shift ;;
index 36c198a836a0c397cf3a4880854271f9671695c4..2acda04395c717fe0786a2979cc8a55ddbbaaa93 100644 (file)
@@ -93,15 +93,15 @@ to the standard output if TEMPLATE-FILE is given, else into
 \`configure'.
 
 Operation modes:
-  -h, --help               print this help, then exit
-  -V, --version            print version number, then exit
-  -v, --verbose            verbosely report processing
-  -d, --debug              don't remove temporary files
+  -h, --help                  print this help, then exit
+  -V, --version               print version number, then exit
+  -v, --verbose               verbosely report processing
+  -d, --debug                 don't remove temporary files
   -B, --prepend-include=DIR   prepend directory DIR to search path
   -I, --include=DIR           append directory DIR to search path
-  -f, --force              consider all files obsolete
-  -o, --output=FILE        save output in FILE (stdout is the default)
-  -W, --warnings=CATEGORY  report the warnings falling in CATEGORY [syntax]
+  -f, --force                 consider all files obsolete
+  -o, --output=FILE           save output in FILE (stdout is the default)
+  -W, --warnings=CATEGORY     report the warnings falling in CATEGORY [syntax]
 
 Warning categories include:
   \`cross'         cross compilation issues
@@ -198,18 +198,6 @@ while test $# -gt 0 ; do
        AUTOM4TE="$AUTOM4TE $option $2"
        shift 2 ;;
 
-    # Obsolete options.
-    --localdir=* | -l?* | --autoconf-dir=* | -A?* | --macrodir=* | -m?* )
-       echo "$me: warning: $option is obsolete, use --include" >&2
-       AUTOM4TE="$AUTOM4TE --include=$optarg"
-       shift ;;
-    --localdir | -l | --autoconf-dir | -A | --macrodir | -m )
-       echo "$me: warning: $option is obsolete, use --include" >&2
-       test $# = 1 && eval "$exit_missing_arg"
-       shift
-       AUTOM4TE="$AUTOM4TE --include=$1"
-       shift ;;
-
     --trace=* | -t?* )
        traces="$traces --trace='"`echo "$optarg" | sed "s/'/'\\\\\\\\''/g"`"'"
        shift ;;
index 03754f1367eda1e68aff66e6544ee031daffaccd..60099f36317d2e1f5717bce85d37684c2d46b92e 100644 (file)
@@ -104,7 +104,7 @@ sub parse_args ()
 {
   my $srcdir;
 
-  getopt ('I|include|A|autoconf-dir|m|macrodir|l|localdir=s' => \@include,
+  getopt ('I|include=s' => \@include,
          'B|prepend-include=s' => \@prepend_include,
          'W|warnings=s' => \@warning);
 
@@ -127,11 +127,11 @@ parse_args;
 
 # Preach.
 my $config_h_top = find_file ("config.h.top?",
-                             reverse(@prepend_include), @include);
+                             reverse (@prepend_include), @include);
 my $config_h_bot = find_file ("config.h.bot?",
-                             reverse(@prepend_include), @include);
+                             reverse (@prepend_include), @include);
 my $acconfig_h = find_file ("acconfig.h?",
-                           reverse(@prepend_include), @include);
+                           reverse (@prepend_include), @include);
 if ($config_h_top || $config_h_bot || $acconfig_h)
   {
     my $msg = << "END";
@@ -252,6 +252,7 @@ $out->close;
 # Check that all the symbols have a template.
 {
   my $in = new Autom4te::XFile ("$tmp/config.hin");
+  my $suggest_ac_define = 1;
   while ($_ = $in->getline)
     {
       my ($symbol) = /^\#\s*\w+\s+(\w+)/
@@ -261,6 +262,12 @@ $out->close;
   foreach (sort keys %symbol)
     {
       print STDERR "$me: missing template: $_\n";
+      if ($suggest_ac_define)
+       {
+         print STDERR "Use AC_DEFINE([$_], [], [Description])";
+         $suggest_ac_define = 0;
+       }
+
     }
   exit 1
     if keys %symbol;
index fee529adf5f6febcce00bd040070575a1049bca8..6bb33e38455515a5d08a7c628345767290055e46 100644 (file)
@@ -118,10 +118,10 @@ sub parse_args ()
 {
   my $srcdir;
 
-  getopt ('I|include|A|autoconf-dir|m|macrodir|l|localdir=s' => \@include,
-         'B|prepend-include=s'                      => \@prepend_include,
-         'i|install'                                        => \$install,
-         's|symlink'                                        => \$symlink);
+  getopt ('I|include=s'           => \@include,
+         'B|prepend-include=s'   => \@prepend_include,
+         'i|install'             => \$install,
+         's|symlink'             => \$symlink);
 
   # Even if the user specified a configure.ac, trim to get the
   # directory, and look for configure.ac again.  Because (i) the code
@@ -132,18 +132,14 @@ sub parse_args ()
 
   if ($verbose && $debug)
     {
-      xsystem ("$autoconf --version | sed 1q >&2");
-      print STDERR "\n";
-      xsystem ("$autoheader --version | sed 1q >&2");
-      print STDERR "\n";
-      xsystem ("$automake --version | sed 1q >&2");
-      print STDERR "\n";
-      xsystem ("$aclocal --version | sed 1q >&2");
-      print STDERR "\n";
-      xsystem ("$autopoint --version | sed 1q >&2");
-      print STDERR "\n";
-      xsystem ("$libtoolize --version | sed 1q >&2");
-      print STDERR "\n";
+      for my $prog ($autoconf, $autoheader,
+                   $automake, $aclocal,
+                   $autopoint,
+                   $libtoolize)
+       {
+         xsystem ("$prog --version | sed 1q >&2");
+         print STDERR "\n";
+       }
     }
 
   # Dispatch autoreconf's option to the tools.
@@ -192,7 +188,9 @@ sub autoreconf ($)
 {
   my ($directory) = @_;
 
-  verbose "working in `$directory'";
+  # The format for this message is not free: taken from Emacs, itself
+  # using GNU Make's format.
+  verbose "Entering directory `$directory'";
   chdir $directory
     or error "cannot chdir to $directory: $!";
 
@@ -506,6 +504,9 @@ sub autoreconf ($)
       xsystem ($automake);
     }
 
+  # The format is not free: taken from Emacs, itself using GNU Make's
+  # format.
+  verbose "Leaving directory `$directory'";
   chdir $cwd
     or error "cannot chdir to $cwd: $!";
 }
index 5327de23dcd795509bb901d7f2ef29ad631254f6..2cffe2ffdd63f5364b066afb18ffe0af83993144 100644 (file)
@@ -55,13 +55,13 @@ or else `configure.in', to the syntax of the current version of
 Autoconf.  The original files are backed up.
 
 Operation modes:
-  -h, --help           print this help, then exit
-  -V, --version        print version number, then exit
-  -v, --verbose        verbosely report processing
-  -d, --debug          don't remove temporary files
+  -h, --help                 print this help, then exit
+  -V, --version              print version number, then exit
+  -v, --verbose              verbosely report processing
+  -d, --debug                don't remove temporary files
   -B, --prepend-include=DIR  prepend directory DIR to search path
   -I, --include=DIR          append directory DIR to search path
-  -f, --force          consider all files obsolete
+  -f, --force                consider all files obsolete
 
 Report bugs to <bug-autoconf\@gnu.org>.
 ";
@@ -88,9 +88,9 @@ sub parse_args ()
 {
   my $srcdir;
 
-  getopt ('I|include|A|autoconf-dir|m|macrodir|l|localdir=s' => \@include,
+  getopt ('I|include=s'         => \@include,
          'B|prepend-include=s' => \@prepend_include,
-         'f|force' => \$force);
+         'f|force'             => \$force);
 
   if (! @ARGV)
     {
index 1cc57c08eee513c1457bac72b3850511df867f4c..0e0070719128b80548917bdb9fecee119876b2ed 100644 (file)
@@ -1,5 +1,5 @@
 # autoconf -- create `configure' using m4 macros
-# Copyright 2001 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -431,7 +431,7 @@ sub update_file ($$)
   if (-f "$to" && compare ("$from", "$to") == 0)
     {
       # File didn't change, so don't update its mod time.
-      print STDERR "$me: `$to' is unchanged\n";
+      verbose "`$to' is unchanged";
       unlink ($from)
        or error "cannot not remove $from: $!";
       return
@@ -444,13 +444,13 @@ sub update_file ($$)
        or error "cannot not backup $to: $!";
       move ("$from", "$to")
        or error "cannot not rename $from as $to: $!";
-      print STDERR "$me: `$to' is updated\n";
+      verbose "`$to' is updated";
     }
   else
     {
       move ("$from", "$to")
        or error "cannot not rename $from as $to: $!";
-      print STDERR "$me: `$to' is created\n";
+      verbose "`$to' is created";
     }
 }
 
index 1bc7158fca64ad1ea1f326d9b2820a2b235456ac..be5bd2d972d52574bd8c182f9a5566003b75cf48 100644 (file)
@@ -171,14 +171,11 @@ m4_define([AT_CHECK_AUTOCONF],
           [$2], [$3], [$4])])
 
 
-# AT_CHECK_AUTOHEADER(ARGS, [EXIT-STATUS = 0],
-#                     STDOUT, [STDERR = `autoheader: `config.hin' is created'])
-# -----------------------------------------------------------------------------
+# AT_CHECK_AUTOHEADER(ARGS, [EXIT-STATUS = 0], STDOUT, STDERR)
+# ------------------------------------------------------------
 m4_define([AT_CHECK_AUTOHEADER],
-[AT_CHECK([autoheader $1], [$2],
-          [$3],
-          m4_default([$4], [[autoheader: `config.hin' is created
-]]))])
+[AT_CHECK([autoheader $1], [$2], [$3], [$4])
+])
 
 
 # AT_CHECK_CONFIGURE(END-COMMAND,
@@ -237,9 +234,8 @@ m4_define([AT_CHECK_DEFINES],
 # AT_CHECK_AUTOUPDATE
 # -------------------
 m4_define([AT_CHECK_AUTOUPDATE],
-[AT_CHECK([autoupdate], 0,
-          [], [autoupdate: `configure.ac' is updated
-])])
+[AT_CHECK([autoupdate $1], [$2], [$3], [$4])
+])
 
 
 # _AT_CHECK_AC_MACRO(AC-BODY, PRE-TESTS)
index 0a328c94442ad6e33fa7913fc2e00bb33a15ca59..c21f927f075c0b5c273dabc7c93087280a0c9735 100644 (file)
@@ -364,8 +364,7 @@ _AT_CHECK_AC_MACRO(
 
 # Make sure AC_C_BIGENDIAN with no argument will define WORDS_BIGENDIAN
 AT_CONFIGURE_AC([AC_C_BIGENDIAN])
-AT_CHECK_AUTOHEADER([], [], [], [autoheader: `config.hin' is updated
-])
+AT_CHECK_AUTOHEADER
 AT_CHECK([grep WORDS_BIGENDIAN config.hin], [], [ignore])
 
 AT_CLEANUP(at-endian)
index c875458dfdd575bea68e09a41561c526219aca45..b854d9771e9e38c58552584f448a45df0ac17225 100644 (file)
@@ -503,9 +503,7 @@ AC_OUTPUT
 AT_CHECK_AUTOUPDATE
 AT_CHECK([cat configure.ac], 0, [expout])
 # Checking that `autoupdate' is idempotent
-AT_CHECK([autoupdate], 0, [],
-         [autoupdate: `configure.ac' is unchanged
-])
+AT_CHECK_AUTOUPDATE
 AT_CHECK([cat configure.ac], 0, [expout])
 
 AT_CLEANUP(configure.ac~)