X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=openwrt%2Fscripts%2Fgen_deps.pl;h=ef49fa3f418cb9b9a251d4ce33019fb1453c232b;hb=b64d24928b353bd6c263190c903590632da6ac53;hp=a910a9937bbdebbc77fe9ef7adcdf9a9de3a039a;hpb=4db216c4dec44d29881a3bfa13cf491e603569b9;p=openwrt%2Fstaging%2Fchunkeey.git diff --git a/openwrt/scripts/gen_deps.pl b/openwrt/scripts/gen_deps.pl index a910a9937b..ef49fa3f41 100755 --- a/openwrt/scripts/gen_deps.pl +++ b/openwrt/scripts/gen_deps.pl @@ -24,16 +24,23 @@ while ($line = <>) { }; } +$line=""; + foreach $name (sort {uc($a) cmp uc($b)} keys %pkg) { + print "package-\$(CONFIG_PACKAGE_$name) += $pkg{$name}->{src}\n"; + my $hasdeps = 0; - $line = "$pkg{$name}->{src}-compile:"; + my $depline = ""; foreach my $dep (@{$pkg{$name}->{depends}}) { if (defined $pkg{$dep}->{src} && $pkg{$name}->{src} ne $pkg{$dep}->{src}) { - $hasdeps = 1; - $line .= " $pkg{$dep}->{src}-compile"; + $depline .= " $pkg{$dep}->{src}-compile"; } } - if ($hasdeps) { - print "$line\n"; + if ($depline ne "") { + $line .= "$pkg{$name}->{src}-compile: $depline\n"; } } + +if ($line ne "") { + print "\n$line"; +}