From d69c6cc741c2ff4aef35c317cf800cc997431b58 Mon Sep 17 00:00:00 2001 From: rillig Date: Tue, 12 Dec 2006 22:13:38 +0000 Subject: In buildlink3.mk files, bsd.fast.prefs.mk should be included instead of bsd.prefs.mk. Fixed the regular expression for buildlink3.mk files containing PKG_BUILD_OPTIONS code. --- pkgtools/pkglint/files/pkglint.pl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'pkgtools') diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index 210fe83ac66..0a9590e620f 100644 --- a/pkgtools/pkglint/files/pkglint.pl +++ b/pkgtools/pkglint/files/pkglint.pl @@ -1,5 +1,5 @@ #! @PERL@ -# $NetBSD: pkglint.pl,v 1.687 2006/12/12 21:56:44 rillig Exp $ +# $NetBSD: pkglint.pl,v 1.688 2006/12/12 22:13:38 rillig Exp $ # # pkglint - static analyzer and checker for pkgsrc packages @@ -5828,6 +5828,11 @@ sub checklines_mk($) { } if ($includefile eq "../../mk/bsd.prefs.mk") { + if ($line->fname =~ qr"buildlink3\.mk$") { + $line->log_note("For efficiency reasons, please include bsd.fast.prefs.mk instead of bsd.prefs.mk."); + } + $seen_bsd_prefs_mk = true; + } elsif ($includefile eq "../../mk/bsd.fast.prefs.mk") { $seen_bsd_prefs_mk = true; } @@ -6243,7 +6248,7 @@ sub checkfile_buildlink3_mk($) { while (true) { 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"^\.if !empty\(PKG_BUILD_OPTIONS\.\Q${bl_pkgbase}\E:M\S+\)$") || expect($lines, \$lineno, qr"^\.endif$")) { $have_dependencies = true; $need_empty_line = true; -- cgit v1.2.3