diff options
Diffstat (limited to 'pkgtools/pkglint/files')
-rw-r--r-- | pkgtools/pkglint/files/pkglint.pl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index 2d7d536d8b1..100806ede1b 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.408 2005/12/02 08:08:36 rillig Exp $ +# $NetBSD: pkglint.pl,v 1.409 2005/12/02 08:26:52 rillig Exp $ # # This version contains lots of changes necessary for NetBSD packages # done by: @@ -2752,11 +2752,17 @@ sub checklines_package_Makefile($) { } } elsif ($directive eq "undef" && defined($args)) { + my $all_unnecessary = true; foreach my $var (split(qr"\s+", $args)) { if (exists($for_variables->{$var})) { $line->log_note("Using \".undef\" after a \".for\" loop is unnecessary."); + } else { + $all_unnecessary = false; } } + if ($all_unnecessary) { + $line->delete(); + } } } elsif ($text =~ regex_mk_dependency) { |