]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Fix line numbers in the error messages of autoupdate.
authorStepan Kasal <kasal@ucw.cz>
Sat, 1 Apr 2006 15:58:43 +0000 (15:58 +0000)
committerStepan Kasal <kasal@ucw.cz>
Sat, 1 Apr 2006 15:58:43 +0000 (15:58 +0000)
ChangeLog
bin/autoupdate.in

index 1f1fb2d2754ba310cae46e2ae0873642187afabb..876f7a86cb83641d621d58002397fc5d838b7f4c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-04-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       * bin/autoupdate.in: Redefine m4_location so that warnings print
+       the correct lines of the input file by subtracting..
+       (_au__first_line): ..this new definition.
+
 2006-04-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        * lib/autoconf/general.m4 (AC_COMPILE_CHECK): Prefer
index 7ec8c1cb9fd5a045d9efaab6c410eb032ee70e8e..ef1e7bf633d08d9da879f50ea1731febbca29e02 100644 (file)
@@ -288,6 +288,9 @@ foreach my $file (@ARGV)
       # Redefine __file__ to make warnings nicer; $file is replaced below.
       m4_define([__file__], [$file])
 
+      # Redefine m4_location to fix the line number.
+      m4_define([m4_location], [__file__:m4_eval(__line__ - _au__first_line)])
+
       # Move all the builtins into the `_au_' pseudo namespace
       m4_include([m4save.m4])
 
@@ -373,11 +376,11 @@ foreach my $file (@ARGV)
       # `_au_disable' would be wrong.
       _au__include([unm4.m4])
 
-      # Disable special characters.
+      # Disable special characters, and set the first line number.
       _au_m4_changequote()
       _au_m4_changecom()
 
-      _au__divert(0)_au_dnl
+      _au_m4_define(_au__first_line, _au___line__)_au__divert(0)_au_dnl
 EOF
 
     $input_m4 =~ s/^      //mg;