summaryrefslogtreecommitdiff
path: root/bin/autoupdate.in
diff options
context:
space:
mode:
authorPaolo Bonzini <bonzini@gnu.org>2004-02-03 09:00:27 +0000
committerPaolo Bonzini <bonzini@gnu.org>2004-02-03 09:00:27 +0000
commit8ddbbac5eef8b64dbee2dea15b9aba51775534a1 (patch)
tree4960d8f32a2da96284df45ad3128423827d60ba7 /bin/autoupdate.in
parent7c1b2b4c785fc89b711cd71528618307bbd644c8 (diff)
downloadautoconf-8ddbbac5eef8b64dbee2dea15b9aba51775534a1.tar.gz
* bin/autoupdate.in: Define __file__ so that warnings
refer to the correct file. * doc/autoconf.texi (AU_DEFUN): Describe more correctly the behavior of the third argument. * lib/autoconf/autoupdate.m4 (AU_DEFUN): Describe more correctly the behavior of the third argument. Document what the three macros that AU_DEFUN defines do. Fix warning message when the third argument includes $0 (reported by Alexandre Duret-Lutz).
Diffstat (limited to 'bin/autoupdate.in')
-rw-r--r--bin/autoupdate.in4
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/autoupdate.in b/bin/autoupdate.in
index 9c58ff85..065c339b 100644
--- a/bin/autoupdate.in
+++ b/bin/autoupdate.in
@@ -282,6 +282,9 @@ foreach my $file (@ARGV)
divert(-1) -*- Autoconf -*-
changequote([, ])
+ # Redefine __file__ to make warnings nicer; $file is replaced below.
+ define([__file__], [$file])
+
# Move all the builtins into the `_au_' pseudo namespace
include([m4save.m4])
@@ -379,6 +382,7 @@ foreach my $file (@ARGV)
EOF
$input_m4 =~ s/^ //mg;
+ $input_m4 =~ s/\$file/$file/g;
# prepared input -- input, but reenables the quote before each AU macro.
open INPUT_M4, ">$tmp/input.m4"