]> sourceware.org Git - automake.git/commitdiff
* automake.in (check_typos): Clarify the diagnostic.
authorAlexandre Duret-Lutz <adl@gnu.org>
Sat, 24 Apr 2004 19:42:20 +0000 (19:42 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Sat, 24 Apr 2004 19:42:20 +0000 (19:42 +0000)
* tests/warnopts.test: Adjust.

ChangeLog
automake.in
tests/warnopts.test

index acd88edeab96679c86124531464a519410a0d75b..220fda416d7616c06a42f2cc57cca2b064e1d4f4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2004-04-24  Alexandre Duret-Lutz  <adl@gnu.org>
 
+       * automake.in (check_typos): Clarify the diagnostic.
+       * tests/warnopts.test: Adjust.
+
        * lib/Automake/VarDef.pm (append): Turn VAR_ASIS variables into
        VAR_PRETTY variables to work around make implementation with
        limited line length, such as OSF1/Tru64 make.
index ce074c2752363602ff1bd0304270a186c7f87316..f782105fc0aff291e95979972b449869662e64fb 100755 (executable)
@@ -2636,9 +2636,9 @@ sub check_typos ()
       foreach my $primary ('_SOURCES', '_LIBADD', '_LDADD', '_LDFLAGS',
                           '_DEPENDENCIES')
        {
-         if ($varname =~ /$primary$/)
+         if ($varname =~ /^(.*)$primary$/)
            {
-             $check = 1;
+             $check = $1;
              last;
            }
        }
@@ -2646,7 +2646,9 @@ sub check_typos ()
 
       for my $cond ($var->conditions->conds)
        {
-         msg_var 'syntax', $var, "unused variable: `$varname'"
+         msg_var ('syntax', $var, "variable `$varname' is defined but no"
+                  . " program or\nlibrary has `$check' as canonic name"
+                  . " (possible typo)")
            unless $var->rdef ($cond)->seen;
        }
     }
index 2ee4391864ac4b85a68f2aabf022591b7fd8798e..8b93e638bb8a41bd87a3161351adff75cc980e7b 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2004  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -56,8 +56,8 @@ grep '^Makefile.am:.*foo_SOURCES' stderr
 grep '^sub/Makefile.am:.*INCLUDES' stderr
 grep '^sub/Makefile.am:.*foo_SOURCES' stderr && exit 1
 grep '^Makefile.am:.*INCLUDES' stderr && exit 1
-# Only two lines of warnings.
-test `wc -l < stderr` = 2
+# Only three lines of warnings.
+test `wc -l < stderr` = 3
 
 # On fast machines the autom4te.cache created during the above run of
 # $AUTOMAKE is likely to have the same time stamp as the configure.in
This page took 0.055119 seconds and 5 git commands to generate.