From 7f2465a3a54dd1f7e24964e286a2d52f122e4f63 Mon Sep 17 00:00:00 2001 From: rillig Date: Sat, 7 May 2005 21:22:40 +0000 Subject: Replaced the shell here-document operator with qw(...). No functional changes. Approved by wiz. --- pkgtools/pkglint/files/pkglint.pl | 83 +++++++++++++++++---------------------- 1 file changed, 35 insertions(+), 48 deletions(-) (limited to 'pkgtools') diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index 53d6ab7f007..56246108b23 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.142 2005/05/07 15:10:24 rillig Exp $ +# $NetBSD: pkglint.pl,v 1.143 2005/05/07 21:22:40 rillig Exp $ # # This version contains lots of changes necessary for NetBSD packages # done by Hubert Feyrer , @@ -1354,12 +1354,14 @@ sub checkfile_Makefile($) { # whole file: direct use of command names # log_info(NO_FILE, NO_LINE_NUMBER, "checking direct use of command names."); - foreach my $i (split(/\s+/, < "\${PKGSRCDIR} instead", + $conf_pkgsrcdir => "\${PKGSRCDIR} instead", + $conf_localbase => "\${PREFIX} or \${LOCALBASE}, as appropriate", + "/usr/X11" => "\${PREFIX} or \${X11BASE}, as appropriate", + "/usr/X11R6" => "\${PREFIX} or \${X11BASE}, as appropriate"); foreach my $i (keys %abspathnames) { if ($str =~ /$i/) { log_warning(NO_FILE, NO_LINE_NUMBER, "possible direct use of \"$&\" ". @@ -2026,18 +2014,17 @@ EOF } log_info(NO_FILE, NO_LINE_NUMBER, "checking direct use of pathnames, phase 2."); - my %relpathnames = split(/\n|\t+/, < "DISTDIR", + "pkg" => "PKGDIR", + "files" => "FILESDIR", + "scripts" => "SCRIPTSDIR", + "patches" => "PATCHDIR", + "work" => "WRKDIR"); foreach my $i (keys %relpathnames) { if ($str =~ /(\.\/|\$[\{\(]\.CURDIR[\}\)]\/|[ \t])(\b$i)\//) { log_warning(NO_FILE, NO_LINE_NUMBER, "possible direct use of \"$i\" ". - "found in $file. if so, use $relpathnames{$i}."); + "found in $file. If so, use \${$relpathnames{$i}} instead."); } } return true; -- cgit v1.2.3