diff options
author | rillig <rillig@pkgsrc.org> | 2007-10-31 12:20:07 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2007-10-31 12:20:07 +0000 |
commit | 48bf740968f773a103a4590a218bc13023e74a71 (patch) | |
tree | 2e5d223e58935e755b1796c7d86bb3f8e5de7e57 /pkgtools/pkglint | |
parent | 65662084d9ecdd29a106004c6effcde5830ffffe (diff) | |
download | pkgsrc-48bf740968f773a103a4590a218bc13023e74a71.tar.gz |
Added a function for checking bmake conditionals.
Diffstat (limited to 'pkgtools/pkglint')
-rw-r--r-- | pkgtools/pkglint/files/pkglint.pl | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index 9489ab2b922..84c741bcda1 100644 --- a/pkgtools/pkglint/files/pkglint.pl +++ b/pkgtools/pkglint/files/pkglint.pl @@ -1,5 +1,5 @@ #! @PERL@ -# $NetBSD: pkglint.pl,v 1.722 2007/10/25 16:08:48 rillig Exp $ +# $NetBSD: pkglint.pl,v 1.723 2007/10/31 12:20:07 rillig Exp $ # # pkglint - static analyzer and checker for pkgsrc packages @@ -5744,6 +5744,15 @@ sub checkline_mk_varassign($$$$$) { } } +# The bmake parser is way too sloppy about syntax, so we need to check +# that here. +# +sub checkline_mk_cond($$) { + my ($line, $cond) = @_; + + $opt_debug_trace and $line->log_debug("checkline_mk_cond($cond)"); +} + # # Procedures to check an array of lines. # @@ -6092,7 +6101,7 @@ sub checklines_mk($) { } } elsif ($directive eq "if" || $directive eq "elif") { - $opt_debug_unchecked and $line->log_debug("Unchecked conditional \"${args}\"."); + checkline_mk_cond($line, $args); } elsif ($directive eq "ifdef" || $directive eq "ifndef") { if ($args =~ qr"\s") { |