diff options
author | rillig <rillig@pkgsrc.org> | 2005-05-25 17:41:18 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2005-05-25 17:41:18 +0000 |
commit | 99d190a2ee3569fd906b148aa95e49640c195ca2 (patch) | |
tree | e6d2fbc49816776f936929c3b86d8865153c124f /pkgtools | |
parent | 24a2f1b57669008b25c221917f96e3da7c986a66 (diff) | |
download | pkgsrc-99d190a2ee3569fd906b148aa95e49640c195ca2.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')
-rwxr-xr-x | pkgtools/pkglint/files/lintpkgsrc.pl | 10 |
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 { |