pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files Added a function for checking b...
details: https://anonhg.NetBSD.org/pkgsrc/rev/eaecab9c2db7
branches: trunk
changeset: 534765:eaecab9c2db7
user: rillig <rillig%pkgsrc.org@localhost>
date: Wed Oct 31 12:20:07 2007 +0000
description:
Added a function for checking bmake conditionals.
diffstat:
pkgtools/pkglint/files/pkglint.pl | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diffs (35 lines):
diff -r b7fce59d122b -r eaecab9c2db7 pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Wed Oct 31 12:15:09 2007 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Wed Oct 31 12:20:07 2007 +0000
@@ -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 @@
}
}
+# 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 @@
}
} 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") {
Home |
Main Index |
Thread Index |
Old Index