* tests/warnopts.test: Adjust.
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.
foreach my $primary ('_SOURCES', '_LIBADD', '_LDADD', '_LDFLAGS',
'_DEPENDENCIES')
{
- if ($varname =~ /$primary$/)
+ if ($varname =~ /^(.*)$primary$/)
{
- $check = 1;
+ $check = $1;
last;
}
}
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;
}
}
#! /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.
#
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