summaryrefslogtreecommitdiff
path: root/source4/build/smb_build
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-05-10 21:29:42 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-05-10 21:29:42 +0200
commitbfd4850636587485aa05934e57da846f458a82e6 (patch)
treee54a7992540384f8f1f5dd75bf237691fbf231b2 /source4/build/smb_build
parent6267dd78539863a5ec75b6cadba39184a2efc9b5 (diff)
parent3758dec7b14e4a0e8905b38e94a3305a4bab91d0 (diff)
downloadsamba-bfd4850636587485aa05934e57da846f458a82e6.tar.gz
samba-bfd4850636587485aa05934e57da846f458a82e6.tar.bz2
samba-bfd4850636587485aa05934e57da846f458a82e6.zip
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-gmake3
(This used to be commit cce1659d3382495d84cd086bd105903211c1c1de)
Diffstat (limited to 'source4/build/smb_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;
}
}