diff options
author | rillig <rillig@pkgsrc.org> | 2006-07-22 05:28:45 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2006-07-22 05:28:45 +0000 |
commit | f0149979ddae43ed9f83c41794c76d079e7dc07a (patch) | |
tree | 924da9b7de929398d3c0e53cfde7612c8fa66a8c /pkgtools | |
parent | bf2ffdf13c80d8f328ca8da688aa3a8cb6a10389 (diff) | |
download | pkgsrc-f0149979ddae43ed9f83c41794c76d079e7dc07a.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.pl | 11 |
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."); } |