diff options
author | rillig <rillig> | 2005-08-06 21:08:05 +0000 |
---|---|---|
committer | rillig <rillig> | 2005-08-06 21:08:05 +0000 |
commit | ee62c46abf179969ec46938377d276ae3283b226 (patch) | |
tree | c0c74e5e1fd39d50a4ef025e8f6f6c09d5a550a7 /pkgtools | |
parent | b314191d760b5485d17db2a8ec85d4b120827e48 (diff) | |
download | pkgsrc-ee62c46abf179969ec46938377d276ae3283b226.tar.gz |
Don't be too strict to the "wip" category Makefile. It may have a
different second line and additional targets after the SUBDIR entries.
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pkglint/files/pkglint.pl | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index 3ee7d69954f..6e3a5468960 100644 --- a/pkgtools/pkglint/files/pkglint.pl +++ b/pkgtools/pkglint/files/pkglint.pl @@ -11,7 +11,7 @@ # Freely redistributable. Absolutely no warranty. # # From Id: portlint.pl,v 1.64 1998/02/28 02:34:05 itojun Exp -# $NetBSD: pkglint.pl,v 1.231 2005/08/06 20:32:35 rillig Exp $ +# $NetBSD: pkglint.pl,v 1.232 2005/08/06 21:08:05 rillig Exp $ # # This version contains lots of changes necessary for NetBSD packages # done by: @@ -2028,19 +2028,22 @@ sub check_category($) { my ($lines); my (@makefile_subdirs) = (); my (@filesys_subdirs) = (); + my ($is_wip); if (!($lines = load_file($fname))) { log_error($fname, NO_LINE_NUMBER, "Cannot be read."); return; } + $is_wip = (basename(Cwd::abs_path($dir)) eq "wip"); + if (@{$lines} < 8) { log_error($fname, NO_LINE_NUMBER, "File too short."); } if (@{$lines} > 0) { checkline_rcsid_regex($lines->[0], qr"#\s+", "# "); } - if (@{$lines} > 1 && $lines->[1]->text ne "#") { + if (@{$lines} > 1 && $lines->[1]->text ne "#" && !$is_wip) { $lines->[1]->log_error("This line must contain a single #, nothing more."); } if (@{$lines} > 2 && $lines->[2]->text ne "") { @@ -2082,7 +2085,13 @@ sub check_category($) { $last_subdir = $subdir; push(@makefile_subdirs, $subdir); + } else { + # ignore the special case "wip", which defines its own "index" target. + if ($is_wip && $line->text eq "") { + last; + } + $line->log_error("SUBDIR+= line expected."); } } |