summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2006-10-05 12:39:52 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2006-10-05 12:39:52 +0000
commitcf807efd13ca47672871d0c50d23274fe34c3114 (patch)
tree6b03cb6970fc37cbfc9c1431cb3e05bba369533a /scripts
parent2347229ddd150b425c9617dabfe6ae7e2bcc53eb (diff)
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";
}