aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2006-10-05 12:39:52 +0000
committerFelix Fietkau <nbd@openwrt.org>2006-10-05 12:39:52 +0000
commita1c781bdae4fbb7466d04ef02e5be85191eb06c1 (patch)
tree6b03cb6970fc37cbfc9c1431cb3e05bba369533a /scripts
parent2bfd91acb25f337e103298a69f490cff87c4b8a3 (diff)
downloadupstream-a1c781bdae4fbb7466d04ef02e5be85191eb06c1.tar.gz
upstream-a1c781bdae4fbb7466d04ef02e5be85191eb06c1.tar.bz2
upstream-a1c781bdae4fbb7466d04ef02e5be85191eb06c1.zip
speed up package prereq check (only run make on those directories that actually contain prereq checks)
git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@4927 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/gen_deps.pl8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/gen_deps.pl b/scripts/gen_deps.pl
index 70c07b70a8..e7daf18866 100755
--- a/scripts/gen_deps.pl
+++ b/scripts/gen_deps.pl
@@ -13,6 +13,8 @@ my $src;
my $makefile;
my %conf;
my %pkg;
+my %prereq;
+my $prereq;
my %dep;
my %options;
my $opt;
@@ -33,6 +35,10 @@ while ($line = <>) {
defined $pkg{$name} or $pkg{$name} = {};
$pkg{$name}->{src} = $src;
};
+ $line =~ /^Prereq-Check:/ and !defined $prereq{$src} and do {
+ $prereq{$src} = 1;
+ $prereq .= "package-prereq += $src\n";
+ };
$line =~ /^(Build-)?Depends: \s*(.+)\s*$/ and do {
$pkg{$name}->{depends} ||= [];
foreach my $v (split /\s+/, $2) {
@@ -75,5 +81,5 @@ foreach $name (sort {uc($a) cmp uc($b)} keys %pkg) {
}
if ($line ne "") {
- print "\n$line";
+ print "\n$line\n$prereq";
}