summaryrefslogtreecommitdiff
path: root/source4/build
diff options
context:
space:
mode:
Diffstat (limited to 'source4/build')
-rw-r--r--source4/build/smb_build/input.pm34
1 files changed, 15 insertions, 19 deletions
diff --git a/source4/build/smb_build/input.pm b/source4/build/smb_build/input.pm
index 3ca2f22f0c..34b4445fe2 100644
--- a/source4/build/smb_build/input.pm
+++ b/source4/build/smb_build/input.pm
@@ -94,10 +94,8 @@ sub check_module($$$)
unless (defined($mod->{INIT_FUNCTION_SENTINEL})) { $mod->{INIT_FUNCTION_SENTINEL} = "NULL"; }
if (not defined($mod->{OUTPUT_TYPE})) {
- if (not defined($INPUT->{$mod->{SUBSYSTEM}}->{TYPE})) {
- die("Invalid type for subsystem $mod->{SUBSYSTEM}");
- }
- if ($INPUT->{$mod->{SUBSYSTEM}}->{TYPE} eq "EXT_LIB") {
+ if ((not defined($INPUT->{$mod->{SUBSYSTEM}}->{TYPE})) or
+ $INPUT->{$mod->{SUBSYSTEM}}->{TYPE} eq "EXT_LIB") {
$mod->{OUTPUT_TYPE} = undef;
} else {
$mod->{OUTPUT_TYPE} = $default_ot;
@@ -181,15 +179,13 @@ sub add_implicit($$)
{
my ($INPUT, $n) = @_;
- $INPUT->{$n} = {
- TYPE => "MAKE_RULE",
- NAME => $n,
- OUTPUT_TYPE => undef,
- LIBS => ["\$(".uc($n)."_LIBS)"],
- LDFLAGS => ["\$(".uc($n)."_LDFLAGS)"],
- CFLAGS => ["\$(".uc($n)."_CFLAGS)"],
- CPPFLAGS => ["\$(".uc($n)."_CPPFLAGS)"]
- };
+ $INPUT->{$n}->{TYPE} = "MAKE_RULE";
+ $INPUT->{$n}->{NAME} = $n;
+ $INPUT->{$n}->{OUTPUT_TYPE} = undef;
+ $INPUT->{$n}->{LIBS} = ["\$(".uc($n)."_LIBS)"];
+ $INPUT->{$n}->{LDFLAGS} = ["\$(".uc($n)."_LDFLAGS)"];
+ $INPUT->{$n}->{CFLAGS} = ["\$(".uc($n)."_CFLAGS)"];
+ $INPUT->{$n}->{CPPFLAGS} = ["\$(".uc($n)."_CPPFLAGS)"];
}
sub calc_unique_deps($$$$$$$$)
@@ -198,7 +194,7 @@ sub calc_unique_deps($$$$$$$$)
my ($name, $INPUT, $deps, $udeps, $withlibs, $forward, $pubonly, $busy) = @_;
foreach my $n (@$deps) {
- add_implicit($INPUT, $n) unless (defined($INPUT->{$n}));
+ add_implicit($INPUT, $n) unless (defined($INPUT->{$n}) and defined($INPUT->{$n}->{TYPE}));
my $dep = $INPUT->{$n};
if (grep (/^$n$/, @$busy)) {
next if (@{$dep->{OUTPUT_TYPE}}[0] eq "MERGED_OBJ");
@@ -206,19 +202,19 @@ sub calc_unique_deps($$$$$$$$)
}
next if (grep /^$n$/, @$udeps);
- push (@{$udeps}, $dep->{NAME}) if $forward;
+ push (@{$udeps}, $n) if $forward;
if (defined ($dep->{OUTPUT_TYPE}) &&
($withlibs or
(@{$dep->{OUTPUT_TYPE}}[0] eq "MERGED_OBJ") or
(@{$dep->{OUTPUT_TYPE}}[0] eq "STATIC_LIBRARY"))) {
- push (@$busy, $dep->{NAME});
- calc_unique_deps($dep->{NAME}, $INPUT, $dep->{PUBLIC_DEPENDENCIES}, $udeps, $withlibs, $forward, $pubonly, $busy);
- calc_unique_deps($dep->{NAME}, $INPUT, $dep->{PRIVATE_DEPENDENCIES}, $udeps, $withlibs, $forward, $pubonly, $busy) unless $pubonly;
+ push (@$busy, $n);
+ calc_unique_deps($n, $INPUT, $dep->{PUBLIC_DEPENDENCIES}, $udeps, $withlibs, $forward, $pubonly, $busy);
+ calc_unique_deps($n, $INPUT, $dep->{PRIVATE_DEPENDENCIES}, $udeps, $withlibs, $forward, $pubonly, $busy) unless $pubonly;
pop (@$busy);
}
- unshift (@{$udeps}, $dep->{NAME}) unless $forward;
+ unshift (@{$udeps}, $n) unless $forward;
}
}