summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2006-12-12 21:56:44 +0000
committerrillig <rillig@pkgsrc.org>2006-12-12 21:56:44 +0000
commit9c7ddd7ed864135febed188f811dd4c95499d13e (patch)
tree8b701e27ff5dd427906daf40bcbfe8666e39344b /pkgtools
parented581cc06427252df1a2a307d9bcd720f7677b8f (diff)
downloadpkgsrc-9c7ddd7ed864135febed188f811dd4c95499d13e.tar.gz
Added c99 to the list of known languages.
Following existing practice, the variable PKG_BUILD_OPTIONS.* may be queried in buildlink3.mk files in the .include section, and no warning is generated anymore.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkglint/files/makevars.map4
-rw-r--r--pkgtools/pkglint/files/pkglint.pl10
2 files changed, 8 insertions, 6 deletions
diff --git a/pkgtools/pkglint/files/makevars.map b/pkgtools/pkglint/files/makevars.map
index 0f9953de10d..9dbd73d823b 100644
--- a/pkgtools/pkglint/files/makevars.map
+++ b/pkgtools/pkglint/files/makevars.map
@@ -1,4 +1,4 @@
-# $NetBSD: makevars.map,v 1.146 2006/12/06 00:46:27 wiz Exp $
+# $NetBSD: makevars.map,v 1.147 2006/12/12 21:56:44 rillig Exp $
#
# This file contains the guessed type of some variables, according to
@@ -659,7 +659,7 @@ USE_GNU_READLINE Yes [m:s,c:s,o:s]
USE_IMAKE Yes [m:s]
USE_JAVA { run yes } [$package]
USE_JAVA2 { YES yes no 1.4 1.5 } [$package]
-USE_LANGUAGES List of { c c++ fortran java objc } [m:s,c:s,o:s]
+USE_LANGUAGES List of { c c99 c++ fortran java objc } [m:s,c:s,o:s]
USE_LIBTOOL Yes [$package]
USE_MAKEINFO Yes [$package]
USE_MSGFMT_PLURALS Yes [$package]
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index 9168f9a9c5f..210fe83ac66 100644
--- a/pkgtools/pkglint/files/pkglint.pl
+++ b/pkgtools/pkglint/files/pkglint.pl
@@ -1,5 +1,5 @@
#! @PERL@
-# $NetBSD: pkglint.pl,v 1.686 2006/12/06 23:42:43 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.687 2006/12/12 21:56:44 rillig Exp $
#
# pkglint - static analyzer and checker for pkgsrc packages
@@ -6241,8 +6241,10 @@ sub checkfile_buildlink3_mk($) {
my $have_dependencies = false;
my $need_empty_line = false;
while (true) {
- if (expect($lines, \$lineno, qr"^\.include \"\.\./\.\./([^/]+/[^/]+)/buildlink3\.mk\"$")
- || expect($lines, \$lineno, qr"^\.include \"\.\./\.\./mk/(\S+)\.buildlink3\.mk\"$")) {
+ if (expect($lines, \$lineno, qr"^\.\s*include \"\.\./\.\./([^/]+/[^/]+)/buildlink3\.mk\"$")
+ || expect($lines, \$lineno, qr"^\.\s*include \"\.\./\.\./mk/(\S+)\.buildlink3\.mk\"$")
+ || expect($lines, \$lineno, qr"^\.if !empty\(PKG_BUILD_OPTIONS\.${bl_pkgbase}:M\S+\)$")
+ || expect($lines, \$lineno, qr"^\.endif$")) {
$have_dependencies = true;
$need_empty_line = true;
} elsif ($have_dependencies && expect($lines, \$lineno, qr"^$")) {
@@ -6594,7 +6596,7 @@ sub checkfile_package_Makefile($$$) {
# probably contains a statement that C is
# really not needed.
- } elsif ($value !~ qr"(?:^|\s+)(?:c|objc)(?:\s+|$)") {
+ } elsif ($value !~ qr"(?:^|\s+)(?:c|c99|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.");
}