From e50a5ca8917d535f3002cdd26920693cd065b4ee Mon Sep 17 00:00:00 2001 From: rillig Date: Wed, 7 Nov 2007 16:19:01 +0000 Subject: When checking a single *.mk file, determine the used variables. This avoids many false positive warnings when checking files in the mk/ directory. --- pkgtools/pkglint/files/pkglint.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pkgtools') diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index 9e4f7c18cdb..2992ad4dcc7 100644 --- a/pkgtools/pkglint/files/pkglint.pl +++ b/pkgtools/pkglint/files/pkglint.pl @@ -1,5 +1,5 @@ #! @PERL@ -# $NetBSD: pkglint.pl,v 1.730 2007/11/07 12:11:18 rillig Exp $ +# $NetBSD: pkglint.pl,v 1.731 2007/11/07 16:19:01 rillig Exp $ # # pkglint - static analyzer and checker for pkgsrc packages @@ -5962,6 +5962,8 @@ sub checklines_mk($) { $mkctx_tools = {%{get_predefined_tool_names()}}; $mkctx_varuse = {}; + determine_used_variables($lines); + foreach my $prefix (qw(pre do post)) { foreach my $action (qw(fetch extract patch tools wrapper configure build test install package clean)) { $allowed_targets->{"${prefix}-${action}"} = true; -- cgit v1.2.3