diff options
-rw-r--r-- | pkgtools/pkglint/Makefile | 4 | ||||
-rw-r--r-- | pkgtools/pkglint/files/pkglint.pl | 11 |
2 files changed, 8 insertions, 7 deletions
diff --git a/pkgtools/pkglint/Makefile b/pkgtools/pkglint/Makefile index ed0f8d6bb54..6993284874f 100644 --- a/pkgtools/pkglint/Makefile +++ b/pkgtools/pkglint/Makefile @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.388 2011/02/01 09:08:01 wiz Exp $ +# $NetBSD: Makefile,v 1.389 2011/05/23 10:59:36 cheusov Exp $ # # Note: if you update the version number, please have a look at the # changes between the CVS tag "pkglint_current" and HEAD. # After updating, please re-set the CVS tag to HEAD. -DISTNAME= pkglint-4.97 +DISTNAME= pkglint-4.98 CATEGORIES= pkgtools MASTER_SITES= # none DISTFILES= # none diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index 314a88321d8..2f22d6a70c1 100644 --- a/pkgtools/pkglint/files/pkglint.pl +++ b/pkgtools/pkglint/files/pkglint.pl @@ -1,5 +1,5 @@ #! @PERL@ -# $NetBSD: pkglint.pl,v 1.825 2011/02/01 09:08:01 wiz Exp $ +# $NetBSD: pkglint.pl,v 1.826 2011/05/23 10:59:37 cheusov Exp $ # # pkglint - static analyzer and checker for pkgsrc packages @@ -7976,9 +7976,6 @@ sub checkfile($) { } elsif ($basename eq "buildlink3.mk") { $opt_check_bl3 and checkfile_buildlink3_mk($fname); - } elsif ($basename =~ m"^(?:.*\.mk|Makefile.*)$") { - $opt_check_mk and checkfile_mk($fname); - } elsif ($basename =~ m"^DESCR") { $opt_check_DESCR and checkfile_DESCR($fname); @@ -8000,6 +7997,9 @@ sub checkfile($) { } elsif ($fname =~ m"(?:^|/)patches/[^/]*$") { log_warning($fname, NO_LINE_NUMBER, "Patch files should be named \"patch-\", followed by letters, '-', '_', '.', and digits only."); + } elsif ($basename =~ m"^(?:.*\.mk|Makefile.*)$") { + $opt_check_mk and checkfile_mk($fname); + } elsif ($basename =~ m"^PLIST") { $opt_check_PLIST and checkfile_PLIST($fname); @@ -8326,7 +8326,8 @@ sub checkdir_package() { # Determine the used variables before checking any of the # Makefile fragments. foreach my $fname (@files) { - if ($fname =~ m"^((?:.*/)?Makefile\..*|.*\.mk)$" + if (($fname =~ m"^((?:.*/)?Makefile\..*|.*\.mk)$") + && (not $fname =~ m"patch-") && (defined(my $lines = load_lines($fname, true)))) { parselines_mk($lines); determine_used_variables($lines); |