summaryrefslogtreecommitdiff
path: root/pkgtools/pkglint
diff options
context:
space:
mode:
authorrillig <rillig>2005-05-25 17:41:18 +0000
committerrillig <rillig>2005-05-25 17:41:18 +0000
commitb28c28e7f9d33b2ec771991254cf36c955e52df2 (patch)
treee6d2fbc49816776f936929c3b86d8865153c124f /pkgtools/pkglint
parent9be1b9c1286de688b4c28b7310c6d7149d7381bb (diff)
downloadpkgsrc-b28c28e7f9d33b2ec771991254cf36c955e52df2.tar.gz
Added the dirname($file) to the search path for include files when
scanning package Makefiles. Changed the output format to include a newline where necessary. Added the search path to the error message. This might fix PR 30322.
Diffstat (limited to 'pkgtools/pkglint')
-rwxr-xr-xpkgtools/pkglint/files/lintpkgsrc.pl10
1 files changed, 8 insertions, 2 deletions
diff --git a/pkgtools/pkglint/files/lintpkgsrc.pl b/pkgtools/pkglint/files/lintpkgsrc.pl
index fd83fec12e0..538d86b9c6c 100755
--- a/pkgtools/pkglint/files/lintpkgsrc.pl
+++ b/pkgtools/pkglint/files/lintpkgsrc.pl
@@ -1,6 +1,6 @@
#!@PERL@
-# $NetBSD: lintpkgsrc.pl,v 1.102 2005/05/24 15:37:17 rillig Exp $
+# $NetBSD: lintpkgsrc.pl,v 1.103 2005/05/25 17:41:18 rillig Exp $
# Written by David Brownlee <abs@netbsd.org>.
#
@@ -18,6 +18,7 @@ use locale;
use strict;
use Getopt::Std;
use File::Find;
+use File::Basename;
use Cwd 'realpath', 'getcwd';
my( $pkglist, # list of Pkg packages
$pkg_installver, # installed version of pkg_install pseudo-pkg
@@ -828,6 +829,7 @@ sub parse_makefile_vars
close(FILE);
$incdirs{"."} = 1;
+ $incdirs{dirname($file)} = 1;
# Some Makefiles depend on these being set
if ($file eq '/etc/mk.conf')
{ $vars{LINTPKGSRC} = 'YES'; }
@@ -934,7 +936,11 @@ sub parse_makefile_vars
if (! -f $incfile)
{
- verbose("Cannot locate '$incfile' (from $file): $_\n");
+ if (!$opt{L}) {
+ verbose("\n");
+ }
+ verbose("$file: Cannot locate $incfile in "
+ . join(" ", sort keys %incdirs) . "\n");
}
else
{