summaryrefslogtreecommitdiff
path: root/source4/build/smb_build
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-05-10 21:29:09 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-05-10 21:29:09 +0200
commit3758dec7b14e4a0e8905b38e94a3305a4bab91d0 (patch)
treef47f2ebfb8cd63fe3c3f2185738895dfda464425 /source4/build/smb_build
parente7910c6fcbe83a94de7a7a27f9102f0bb1aba7ef (diff)
downloadsamba-3758dec7b14e4a0e8905b38e94a3305a4bab91d0.tar.gz
samba-3758dec7b14e4a0e8905b38e94a3305a4bab91d0.tar.bz2
samba-3758dec7b14e4a0e8905b38e94a3305a4bab91d0.zip
Fix building with system-provided LDB without breaking anything else :-)
(This used to be commit ce9d759497ea49e54e9d96422ad07368e2925872)
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;
}
}