X-Git-Url: http://git.ozo.com/?a=blobdiff_plain;f=scripts%2Fgen_deps.pl;h=e7daf18866be50384a5b8cbf516eabdf3d627349;hb=f7991898e34f59a40534c370908b81794c15b7c9;hp=0cdcc97a14789f6f3cf215ca4e0b8fd24bb4ed3b;hpb=02cdebbb91a33d8e24da1c94a9d93ac39be168a7;p=openwrt-10.03%2F.git diff --git a/scripts/gen_deps.pl b/scripts/gen_deps.pl index 0cdcc97a1..e7daf1886 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) { @@ -62,6 +68,7 @@ foreach $name (sort {uc($a) cmp uc($b)} keys %pkg) { } elsif (defined($pkg{$dep}) && !$options{SDK}) { $idx = $dep; } + undef $idx if $idx =~ /^(kernel)|(base-files)$/; if ($idx) { next if $dep{$pkg{$name}->{src}."->".$idx}; $depline .= " $idx\-compile"; @@ -74,5 +81,5 @@ foreach $name (sort {uc($a) cmp uc($b)} keys %pkg) { } if ($line ne "") { - print "\n$line"; + print "\n$line\n$prereq"; }