summaryrefslogtreecommitdiff
path: root/pkgtools/pkglint/files/pkglint.pl
diff options
context:
space:
mode:
authorrillig <rillig>2007-10-31 12:20:07 +0000
committerrillig <rillig>2007-10-31 12:20:07 +0000
commitbb3286ce536d7d1612c0e5427a06cd0e24d20bf7 (patch)
tree2e5d223e58935e755b1796c7d86bb3f8e5de7e57 /pkgtools/pkglint/files/pkglint.pl
parent94a9715cd869388929bcf65359b8ad43bf0a0b24 (diff)
downloadpkgsrc-bb3286ce536d7d1612c0e5427a06cd0e24d20bf7.tar.gz
Added a function for checking bmake conditionals.
Diffstat (limited to 'pkgtools/pkglint/files/pkglint.pl')
-rw-r--r--pkgtools/pkglint/files/pkglint.pl13
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") {