next unless $pkg->{"builddepends/$type"};
foreach my $dep (@{$pkg->{"builddepends/$type"}}) {
my $suffix = "";
+ my $deptype = "";
my $condition;
if ($dep =~ /^(.+):(.+)/) {
$condition = $1;
$dep = $2;
}
- if ($dep =~ /^(.+)(\/.+)/) {
+ if ($dep =~ /^(.+)\/(.+)/) {
$dep = $1;
- $suffix = $2;
+ $deptype = $2;
+ $suffix = "/$2";
}
my $idx = "";
my $pkg_dep = $package{$dep};
if (defined($pkg_dep) && defined($pkg_dep->{src})) {
+ unless (!$deptype || grep { $_ eq $deptype } @{$pkg_dep->{buildtypes}}) {
+ warn sprintf "WARNING: Makefile '%s' has a %s build dependency on '%s/%s' but '%s' does not implement a '%s' build type\n",
+ $pkg->{makefile}, $type, $pkg_dep->{src}, $deptype, $pkg_dep->{makefile}, $deptype;
+ next;
+ }
$idx = $pkg_dep->{subdir}.$pkg_dep->{src};
} elsif (defined($srcpackage{$dep})) {
$idx = $subdir{$dep}.$dep;
my $condition;
my $prefix = "";
my $suffix = "";
+ my $deptype = "";
if ($deps =~ /^(.+):(.+)/) {
$condition = $1;
$deps = $2;
}
- if ($deps =~ /^(.+)(\/.+)/) {
+ if ($deps =~ /^(.+)\/(.+)/) {
$deps = $1;
- $suffix = $2;
+ $deptype = $2;
+ $suffix = "/$2";
}
my $pkg_dep = $package{$deps};
foreach my $dep (@deps) {
$pkg_dep = $package{$deps};
if (defined $pkg_dep->{src}) {
- ($pkg->{src} ne $pkg_dep->{src}.$suffix) and $idx = $pkg_dep->{subdir}.$pkg_dep->{src};
+ unless (!$deptype || grep { $_ eq $deptype } @{$pkg_dep->{buildtypes}}) {
+ warn sprintf "WARNING: Makefile '%s' has a build dependency on '%s/%s' but '%s' does not implement a '%s' build type\n",
+ $pkg->{makefile}, $pkg_dep->{src}, $deptype, $pkg_dep->{makefile}, $deptype;
+ next;
+ }
+ unless ($pkg->{src} ne $pkg_dep->{sec}.$suffix) {
+ warn sprintf "WARNING: Makefile '%s' has a build dependency on itself\n",
+ $pkg->{makefile};
+ next;
+ }
+ $idx = $pkg_dep->{subdir}.$pkg_dep->{src};
} elsif (defined($srcpackage{$dep})) {
$idx = $subdir{$dep}.$dep;
}
( \\
$cmds \\
) > \$@
-
+
ifneq (\$(IMAGEOPT)\$(CONFIG_IMAGEOPT),)
package/preconfig: \$(TARGET_DIR)/etc/uci-defaults/$preconfig
endif