summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2008-06-11 01:36:08 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2008-06-11 01:36:08 +0000
commite6074d0ad7b0160c45b38b2ee51747f58a7f2dd7 (patch)
treea1ca41828f59474ecfe12f2f60fdeb65518bc905 /scripts
parent59f2b191722f54423808e1baf70ebc22d26abff0 (diff)
fix some previously ignored build dependencies (for example, uci->lua)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@11429 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/metadata.pl18
1 files changed, 14 insertions, 4 deletions
diff --git a/scripts/metadata.pl b/scripts/metadata.pl
index 50d636a67..bd1a40a53 100755
--- a/scripts/metadata.pl
+++ b/scripts/metadata.pl
@@ -502,11 +502,21 @@ sub gen_package_mk() {
foreach my $name (sort {uc($a) cmp uc($b)} keys %package) {
my $config;
my $pkg = $package{$name};
+ my @srcdeps;
next if defined $pkg->{vdepends};
next if $done{$pkg->{src}};
$done{$pkg->{src}} = 1;
+ foreach my $spkg (@{$srcpackage{$pkg->{src}}}) {
+ foreach my $dep (@{$spkg->{depends}}, @{$spkg->{builddepends}}) {
+ $dep =~ /@/ or do {
+ $dep =~ s/\+//g;
+ push @srcdeps, $dep;
+ };
+ }
+ }
+
if ($ENV{SDK}) {
$conf{$pkg->{src}} or do {
$config = 'm';
@@ -522,9 +532,7 @@ sub gen_package_mk() {
my $hasdeps = 0;
my $depline = "";
- foreach my $deps (@{$pkg->{depends}}, @{$pkg->{builddepends}}) {
- next if $deps =~ /@/;
- $deps =~ s/\+//;
+ foreach my $deps (@srcdeps) {
my $idx;
my $pkg_dep = $package{$deps};
my @deps;
@@ -544,10 +552,12 @@ sub gen_package_mk() {
}
undef $idx if $idx =~ /^(kernel)|(base-files)$/;
if ($idx) {
- next if $dep{$pkg->{src}."->".$idx};
next if $pkg->{src} eq $pkg_dep->{src};
+ next if $dep{$pkg->{src}."->".$idx};
+ next if $dep{$pkg->{src}."->($dep)".$idx};
if ($pkg_dep->{vdepends}) {
$depline .= " \$(if \$(CONFIG_PACKAGE_$dep),\$(curdir)/$idx/compile)";
+ $dep{$pkg->{src}."->($dep)".$idx} = 1;
} else {
$depline .= " \$(curdir)/$idx/compile";
$dep{$pkg->{src}."->".$idx} = 1;