summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorrillig <rillig>2006-07-22 05:28:45 +0000
committerrillig <rillig>2006-07-22 05:28:45 +0000
commitd65820fbec85fcbfbbaaa46a11af3f85b1d351d9 (patch)
tree924da9b7de929398d3c0e53cfde7612c8fa66a8c /pkgtools
parent66654f9ead3eaae08bd62b1ea3e47853ce26a53d (diff)
downloadpkgsrc-d65820fbec85fcbfbbaaa46a11af3f85b1d351d9.tar.gz
Don't warn about the GNU_CONFIGURE/USE_LANGUAGES combination when a
comment in that line contains the word "c" in either case, or if objc is specified, since that enables the C compiler, too.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkglint/files/pkglint.pl11
1 files changed, 8 insertions, 3 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index 6ccbba3af60..eeee8f1fd58 100644
--- a/pkgtools/pkglint/files/pkglint.pl
+++ b/pkgtools/pkglint/files/pkglint.pl
@@ -1,5 +1,5 @@
#! @PERL@
-# $NetBSD: pkglint.pl,v 1.659 2006/07/21 19:09:23 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.660 2006/07/22 05:28:45 rillig Exp $
#
# pkglint - static analyzer and checker for pkgsrc packages
@@ -6279,9 +6279,14 @@ sub checkfile_package_Makefile($$$) {
my $languages_line = $pkgctx_vardef->{"USE_LANGUAGES"};
if ($languages_line->text =~ regex_varassign) {
- my (undef, $op, $value, undef) = ($1, $2, $3, $4);
+ my (undef, $op, $value, $comment) = ($1, $2, $3, $4);
- if ($value !~ qr"(?:^|\s+)c(?:\s+|$)") {
+ if (defined($comment) && $comment =~ qr"(?:^|\s+)c(?:\s+|$)"i) {
+ # Don't emit a warning, since the comment
+ # probably contains a statement that C is
+ # really not needed.
+
+ } elsif ($value !~ qr"(?:^|\s+)(?:c|objc)(?:\s+|$)") {
$pkgctx_vardef->{"GNU_CONFIGURE"}->log_warning("GNU_CONFIGURE almost always needs a C compiler, ...");
$languages_line->log_warning("... but \"c\" is not added to USE_LANGUAGES.");
}