From 3c87a63ecd500d1fd066534fb4e60fb7e0db9f2c Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Sat, 24 Apr 2004 19:42:20 +0000 Subject: [PATCH] * automake.in (check_typos): Clarify the diagnostic. * tests/warnopts.test: Adjust. --- ChangeLog | 3 +++ automake.in | 8 +++++--- tests/warnopts.test | 6 +++--- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index acd88ede..220fda41 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2004-04-24 Alexandre Duret-Lutz + * 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. diff --git a/automake.in b/automake.in index ce074c27..f782105f 100755 --- a/automake.in +++ b/automake.in @@ -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; } } diff --git a/tests/warnopts.test b/tests/warnopts.test index 2ee43918..8b93e638 100755 --- a/tests/warnopts.test +++ b/tests/warnopts.test @@ -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 -- 2.43.5