summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2006-04-22 11:22:40 +0000
committerrillig <rillig@pkgsrc.org>2006-04-22 11:22:40 +0000
commit6ad02eac06dab0b8393485f8e1eca737def9a90c (patch)
tree1ed66ded64c18bd353ebc37e0fd4c5e2cd247659 /pkgtools
parentf7d62d3debf18651640748ed3868f20985c30fe6 (diff)
downloadpkgsrc-6ad02eac06dab0b8393485f8e1eca737def9a90c.tar.gz
The list of files that define the TOOLS is extracted from bsd.tools.mk
instead of specifying it explicitly.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/pkglint/files/pkglint.pl35
1 files changed, 30 insertions, 5 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index f1f1fd44f39..16f2d0a80b2 100644
--- a/pkgtools/pkglint/files/pkglint.pl
+++ b/pkgtools/pkglint/files/pkglint.pl
@@ -1,5 +1,5 @@
#! @PERL@
-# $NetBSD: pkglint.pl,v 1.561 2006/04/21 09:42:01 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.562 2006/04/22 11:22:40 rillig Exp $
#
# pkglint - static analyzer and checker for pkgsrc packages
@@ -1694,15 +1694,40 @@ my $load_tool_names_vartools = undef;
my $load_tool_names_varname_to_toolname = undef;
my $load_tool_names_predefined_vartools = undef;
sub load_tool_names() {
- my ($tools, $vartools, $predefined_vartools, $varname_to_toolname);
+ my ($tools, $vartools, $predefined_vartools, $varname_to_toolname, @tool_files);
+
+ #
+ # Get the list of files that define the tools from bsd.tools.mk.
+ #
+
+ @tool_files = ();
+ {
+ my $fname = "${current_dir}/${pkgsrcdir}/mk/tools/bsd.tools.mk";
+ my $lines = load_lines($fname, true);
+ if (!$lines) {
+ log_fatal($fname, NO_LINE_NUMBER, "Cannot be read.");
+ }
+
+ foreach my $line (@{$lines}) {
+ if ($line->text =~ regex_mk_include) {
+ my ($includefile) = ($1);
+ if ($includefile =~ qr"^\.\./\.\./mk/tools/(.*)$") {
+ push(@tool_files, $1);
+ }
+ }
+ }
+ }
+
+ #
+ # Scan the tool files for the actual definitions of the tools.
+ #
$tools = {};
$vartools = {};
$predefined_vartools = {};
$varname_to_toolname = {};
- # TODO: get the list of additional tool files from bsd.tools.mk
- foreach my $basename (qw(autoconf automake defaults gettext ldconfig make replace rpcgen texinfo)) {
- my $fname = "${current_dir}/${pkgsrcdir}/mk/tools/${basename}.mk";
+ foreach my $basename (@tool_files) {
+ my $fname = "${current_dir}/${pkgsrcdir}/mk/tools/${basename}";
my $lines = load_lines($fname, true);
if (!$lines) {