]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* bin/autom4te.in (&parse_args): Strip `.' from `@include'.
authorAkim Demaille <akim@epita.fr>
Fri, 31 Aug 2001 13:34:30 +0000 (13:34 +0000)
committerAkim Demaille <akim@epita.fr>
Fri, 31 Aug 2001 13:34:30 +0000 (13:34 +0000)
* bin/autoupdate.in: Use --include, -I, and --force, -f, too.
Use directly autom4te, not autoconf.
* tests/autoupdate: $top_srcdir/lib is needed too for melt files.

ChangeLog
NEWS
bin/autom4te.in
bin/autoupdate.in
doc/autoconf.texi
tests/autoheader
tests/autoupdate

index dc3ea64d436e75a76cebe11c0d98531fa1cb4181..f3c3ed62d291f36e20ade0e6a969d4458fbc2ce4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2001-08-31  Akim Demaille  <akim@epita.fr>
+
+       * bin/autom4te.in (&parse_args): Strip `.' from `@include'.
+       * bin/autoupdate.in: Use --include, -I, and --force, -f, too.
+       Use directly autom4te, not autoconf.
+       * tests/autoupdate: $top_srcdir/lib is needed too for melt files.
+
 2001-08-31  Akim Demaille  <akim@epita.fr>
 
        * tests/semantics.at (AC_C_BIGENDIAN): Missing eol.
diff --git a/NEWS b/NEWS
index d7d1c62770424265a4782277ff373ba47442ce9d..440293a3169e6be0ec0719d0c4d77e399cefebfc 100644 (file)
--- a/NEWS
+++ b/NEWS
 ** autom4te
   New executable, used by the Autoconf suite to cache and speed up
   some processing.
-** Standardization of the executables options
+** Standardization of the executables interface
 - --force, -f
   Supported by autom4te, autoconf and autoheader.
 - --include, -I
-  Replaces --autoconf-dir and --localdir in autoconf and autoheader.
+  Replaces --autoconf-dir and --localdir in autoconf, autoheader and
+  autoupdate.
 ** Bug fixes
 - The top level $prefix is propagated to the AC_CONFIG_SUBDIRS configures.
 ** C Macros
index 44c9e71cb37e6147e11680393f6fd29ac5075d3c..1382bdb65ae453f5c39f11fcd03089872c7154d4 100644 (file)
@@ -512,8 +512,9 @@ Try `$me --help' for more information.\n"
 
   # Normalize the includes: the first occurrence is enough, several is
   # a pain since it introduces a useless difference in the path which
-  # invalidates the cache.
-  @include = uniq (@include);
+  # invalidates the cache.  And strip `.' which is implicit and always
+  # first.
+  @include = grep { !/^\.$/ } uniq (@include);
 
   # Convert @trace to %trace, and work around the M4 builtins tracing
   # problem.
index e9bfd859fb68792ffe12781fa5fe8a35cfa00ff6..9df4120caed7031f8aa3ca84c0a8ecaac6242ece 100644 (file)
@@ -32,9 +32,9 @@ use Autom4te::General;
 use strict;
 
 # Lib files.
-my $autoconf_dir = $ENV{"AC_MACRODIR"} || "@datadir@";
-my $autoconf = $ENV{'AUTOCONF'} || '@autoconf-name@';
-my $localdir = '.';
+my $autom4te = $ENV{'AUTOM4TE'} || '@autom4te-name@';
+my @include;
+my $force = 0;
 # m4.
 my $m4 = $ENV{"M4"} || "@M4@";
 
@@ -53,14 +53,8 @@ Operation modes:
   -V, --version        print version number, then exit
   -v, --verbose        verbosely report processing
   -d, --debug          don\'t remove temporary files
-
-Library directories:
-  -A, --autoconf-dir=ACDIR  Autoconf\'s macro files location (rarely needed)
-  -l, --localdir=DIR        location of \`aclocal.m4\'
-
-Environment variables:
-  M4         GNU M4 1.4 or above
-  AUTOCONF   autoconf @VERSION@
+  -I, --include=DIR    look for input files in DIR.  Accumulates
+  -f, --force          consider all the files are obsolete
 
 Report bugs to <bug-autoconf\@gnu.org>.
 END
@@ -92,8 +86,8 @@ sub parse_args ()
   # If fixed some day, use this: '' => sub { push @ARGV, "-" }
   my $update_stdin = grep /^-$/, @ARGV;
   @ARGV = grep !/^-$/, @ARGV;
-  getopt ('A|autoconf-dir|m|macrodir=s' => \$autoconf_dir,
-         'l|localdir=s' => \$localdir);
+  getopt ('I|include|A|autoconf-dir|m|macrodir|l|localdir=s' => \@include,
+         'f|force' => \$force);
 
   push @ARGV, '-'
     if $update_stdin;
@@ -111,11 +105,15 @@ sub parse_args ()
 ## -------------- ##
 ## Main program.  ##
 ## -------------- ##
+
 parse_args;
+my $autoconf = "$autom4te --language=autoconf ";
+$autoconf .= join (' --include=', '', @include);
+$autoconf .= " --debug" if $debug;
+$autoconf .= " --force" if $force;
+$autoconf .= " --verbose" if $verbose;
+
 mktmpdir ('au');
-$autoconf .= " --include=$autoconf_dir --include=$localdir ";
-$autoconf .= "--debug " if $debug;
-$autoconf .= "--verbose " if $verbose;
 
 # @M4_BUILTINS -- M4 builtins and a useful comment.
 my @m4_builtins = `echo dumpdef | $m4 2>&1 >/dev/null`;
@@ -148,7 +146,7 @@ close M4_M4
 # @AU_MACROS & AC_MACROS -- AU and AC macros and yet another useful comment.
 open MACROS, ("$autoconf "
              . "--trace AU_DEFUN:'AU:\$f:\$1' --trace define:'AC:\$f:\$1' "
-             . "-i /dev/null |")
+             . "--melt /dev/null |")
   or die "$me: cannot open definitions reading pipe: $!\n";
 my (%ac_macros, %au_macros);
 while (<MACROS>)
@@ -197,7 +195,7 @@ my $au_changequote =
 
 # au.m4 -- definitions the AU macros.
 xsystem ("$autoconf --trace AU_DEFUN:'_au_defun(\@<:\@\$1\@:>\@,
-\@<:\@\$2\@:>\@)' -i /dev/null "
+\@<:\@\$2\@:>\@)' --melt /dev/null "
        . ">$tmp/au.m4");
 
 # ac.m4 -- autoquoting definitions of the AC macros (M4sugar excluded).
@@ -350,7 +348,9 @@ EOF
        or die "$me: cannot close $tmp/input.m4: $!\n";
 
     # Now ask m4 to perform the update.
-    xsystem ("$m4 --include=$autoconf_dir $tmp/input.m4 >$tmp/updated");
+    xsystem ("$m4"
+            . join (' --include=', '', @include)
+            . " $tmp/input.m4 >$tmp/updated");
     update_file ("$tmp/updated",
                 "$file" eq "$tmp/stdin" ? '-' : "$file");
   }
index 8958d7744d11f70eacb0c44830a5ae3e32629e40..d624d9f4b7204782873b363d34612bfd4f99aa89 100644 (file)
@@ -10066,6 +10066,10 @@ Report processing steps.
 @itemx -d
 Don't remove the temporary files.
 
+@item --force
+@itemx -f
+Force the update even if the file has not changed.  Disregard the cache.
+
 @item --include=@var{dir}
 @itemx -I @var{dir}
 Also look for input files in @var{dir}.  Multiple invocations accumulate.
index d6aa4c5750585fc7f9e1e78bae8fbbe32e2acfe5..92396832272d45371bac94e1f2db54d5b23f4667 100755 (executable)
@@ -11,4 +11,4 @@
 autom4te_perllibdir=$top_srcdir/lib
 export autom4te_perllibdir
 
-exec ../bin/autoheader --autoconf-dir ../lib ${1+"$@"}
+exec ../bin/autoheader --include ../lib ${1+"$@"}
index 580690433a62bece44659cca0048c1392fca9b7f..52ac2a4b6f27e054c87e937dc340dc1f48fae78c 100755 (executable)
@@ -11,4 +11,4 @@
 autom4te_perllibdir=$top_srcdir/lib
 export autom4te_perllibdir
 
-exec ../bin/autoupdate --autoconf-dir ../lib ${1+"$@"}
+exec ../bin/autoupdate --include ../lib --include $top_srcdir/lib ${1+"$@"}