From 95bdcf394e439d688a5290a26a15e0bc31144f91 Mon Sep 17 00:00:00 2001 From: mbm Date: Tue, 16 May 2006 00:32:57 +0000 Subject: finish up package makefile git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@3786 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- scripts/gen_deps.pl | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'scripts/gen_deps.pl') diff --git a/scripts/gen_deps.pl b/scripts/gen_deps.pl index a910a9937..ef49fa3f4 100755 --- a/scripts/gen_deps.pl +++ b/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"; +} -- cgit v1.2.3