From: Alexandre Duret-Lutz Date: Sat, 24 Apr 2004 19:42:21 +0000 (+0000) Subject: * automake.in (check_typos): Clarify the diagnostic. X-Git-Tag: Release-1-8b~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb6b99dc4b39b6dc3b0efd4910eabd19533fe7e6;p=thirdparty%2Fautomake.git * automake.in (check_typos): Clarify the diagnostic. * tests/warnopts.test: Adjust. --- diff --git a/ChangeLog b/ChangeLog index acd88edea..220fda416 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 ce074c275..f782105fc 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 2ee439186..8b93e638b 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