mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-04-21 12:27:27 +03:00
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
This commit is contained in:
@@ -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";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user