]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
* automake.in (macro_define): Update a variable's location each
authorAlexandre Duret-Lutz <adl@gnu.org>
Sun, 22 Sep 2002 14:35:19 +0000 (14:35 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Sun, 22 Sep 2002 14:35:19 +0000 (14:35 +0000)
time its owner is updated.
* tests/gnuwarn.test: Append to CFLAGS to check for this.
Reported by Harlan Stenn.

ChangeLog
automake.in
tests/gnuwarn.test

index a9336d603fe7bee4caf32433d22925f55fc0bdb2..c15eb3e8c3964d18e395f00e6e9c7989784b36be 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2002-09-22  Alexandre Duret-Lutz  <duret_g@epita.fr>
+
+       * automake.in (macro_define): Update a variable's location each
+       time its owner is updated.
+       * tests/gnuwarn.test: Append to CFLAGS to check for this.
+       Reported by Harlan Stenn.
+
 2002-09-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
 
        * configure.in: Bump version to 1.6g.
index a8c9800bec6e0f1fb6e3fb6f4cf0835ae1711b8a..ecad4ae30d1b907bea50505b37421cae77cff1c5 100755 (executable)
@@ -6392,6 +6392,10 @@ sub macro_define ($$$$$$)
        || $owner > $var_owner{$var}{$cond}))
     {
       $var_owner{$var}{$cond} = $owner;
+      # Always adjust the location when the owner changes (even for
+      # `+=' statements).  The risk otherwise is to warn about
+      # a VAR_MAKEFILE variable and locate it in configure.ac...
+      $var_location{$var}{$cond} = $where;
     }
 
   # Call var_VAR_trigger if it's defined.
index 9aff88b5adcf740286ab22fec77a965f63132fa9..9dca3b177eaddc7f477385d6a2be3e5f67976b48 100755 (executable)
@@ -36,7 +36,7 @@ END
 : > ChangeLog
 
 cat > Makefile.am << 'END'
-CFLAGS = -I..
+CFLAGS += -I..
 LDFLAGS = -lfoo
 CXXFLAGS = -Wall
 bin_PROGRAMS = bar
@@ -48,8 +48,8 @@ $AUTOMAKE -Wnone --add-missing --foreign
 # Warn in gnu mode
 $AUTOMAKE -Wnone  --add-missing --gnu 2>stderr && exit 1
 cat stderr
-grep CFLAGS stderr
-grep LDFLAGS stderr
+grep 'Makefile.am:1:.*CFLAGS' stderr
+grep 'Makefile.am:2:.*LDFLAGS' stderr
 # No reason to warn about CXXFLAGS since it's not used.
 grep CXXFLAGS stderr && exit 1
 # Don't warn if -Wno-gnu.