diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2006-04-26 11:58:42 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:04:59 -0500 |
commit | 61ff97e360b92aae536a4e2b8cae9ad9c3fa875f (patch) | |
tree | a8823dcae6382cf1d7f1f7e0d8b21267b08ebd38 /source4/build/smb_build | |
parent | f5bc4a72c56a8d74bfa0f334890fac9b3ea3f37e (diff) | |
download | samba-61ff97e360b92aae536a4e2b8cae9ad9c3fa875f.tar.gz samba-61ff97e360b92aae536a4e2b8cae9ad9c3fa875f.tar.bz2 samba-61ff97e360b92aae536a4e2b8cae9ad9c3fa875f.zip |
r15271: Fix --enable-dso
(This used to be commit 8de11ec2445ce414b37938b07937fdd7837f89a2)
Diffstat (limited to 'source4/build/smb_build')
-rw-r--r-- | source4/build/smb_build/TODO | 3 | ||||
-rw-r--r-- | source4/build/smb_build/input.pm | 28 | ||||
-rw-r--r-- | source4/build/smb_build/output.pm | 10 |
3 files changed, 25 insertions, 16 deletions
diff --git a/source4/build/smb_build/TODO b/source4/build/smb_build/TODO index e74e7790a0..2c4a913828 100644 --- a/source4/build/smb_build/TODO +++ b/source4/build/smb_build/TODO @@ -1,7 +1,4 @@ - let the build system implement some make functions($(patsubst),$(wildcard),...) and use our own implementations where `make' does not support them -- fix --enable-dso: - - loop over all the dependencies of a SUBSYSTEM - - include their PUBLIC_CFLAGS - make --enable-dso the default - fix module loading for selftest during non-developer builds - clearer distinction between dcerpc and ndr. seperate interface tables? diff --git a/source4/build/smb_build/input.pm b/source4/build/smb_build/input.pm index 488ac5c6ec..c153e0c95d 100644 --- a/source4/build/smb_build/input.pm +++ b/source4/build/smb_build/input.pm @@ -120,23 +120,24 @@ sub check_binary($$) my $level = ""; -sub calc_unique_deps($$$) +sub calc_unique_deps($$$$) { - sub calc_unique_deps($$$); - my ($name, $deps, $udeps) = @_; + sub calc_unique_deps($$$$); + my ($name, $deps, $udeps, $withlibs) = @_; print "$level-> $name\n" if ($ENV{SMB_BUILD_VERBOSE}); $level.=" "; foreach my $dep (@{$deps}) { - if (not defined($udeps->{$$dep->{NAME}})) { - if (defined ($$dep->{OUTPUT_TYPE}) && (($$dep->{OUTPUT_TYPE} eq "OBJ_LIST") - or ($$dep->{OUTPUT_TYPE} eq "MERGEDOBJ"))) { + next if defined($udeps->{$$dep->{NAME}}); + + if (defined ($$dep->{OUTPUT_TYPE}) && + ($withlibs or ($$dep->{OUTPUT_TYPE} eq "OBJ_LIST") or ($$dep->{OUTPUT_TYPE} eq "MERGEDOBJ"))) { $udeps->{$$dep->{NAME}} = "BUSY"; - calc_unique_deps($$dep->{NAME}, $$dep->{DEPENDENCIES}, $udeps); - } - $udeps->{$$dep->{NAME}} = $$dep; - } + calc_unique_deps($$dep->{NAME}, $$dep->{DEPENDENCIES}, $udeps, $withlibs); + } + + $udeps->{$$dep->{NAME}} = $$dep; } $level = substr($level, 1); @@ -209,7 +210,12 @@ sub check($$$$$) foreach my $part (values %depend) { $part->{UNIQUE_DEPENDENCIES} = {}; - calc_unique_deps($part->{NAME}, $part->{DEPENDENCIES}, $part->{UNIQUE_DEPENDENCIES}); + calc_unique_deps($part->{NAME}, $part->{DEPENDENCIES}, $part->{UNIQUE_DEPENDENCIES}, 0); + } + + foreach my $part (values %depend) { + $part->{UNIQUE_DEPENDENCIES_ALL} = {}; + calc_unique_deps($part->{NAME}, $part->{DEPENDENCIES}, $part->{UNIQUE_DEPENDENCIES_ALL}, 1); } return \%depend; diff --git a/source4/build/smb_build/output.pm b/source4/build/smb_build/output.pm index 5c54feee1b..a53a9263f9 100644 --- a/source4/build/smb_build/output.pm +++ b/source4/build/smb_build/output.pm @@ -147,12 +147,18 @@ sub create_output($$) foreach $part (values %{$depend}) { next if not defined($part->{OUTPUT_TYPE}); - # Always import the CFLAGS and CPPFLAGS of the unique dependencies - foreach my $elem (values %{$part->{UNIQUE_DEPENDENCIES}}) { + foreach my $elem (values %{$part->{UNIQUE_DEPENDENCIES_ALL}}) { next if $elem == $part; push(@{$part->{PUBLIC_CFLAGS}}, @{$elem->{CPPFLAGS}}) if defined(@{$elem->{CPPFLAGS}}); push(@{$part->{PUBLIC_CFLAGS}}, $elem->{CFLAGS}) if defined($elem->{CFLAGS}); + } + + + # Always import the CFLAGS and CPPFLAGS of the unique dependencies + foreach my $elem (values %{$part->{UNIQUE_DEPENDENCIES}}) { + next if $elem == $part; + push(@{$part->{LINK_LIST}}, $elem->{OUTPUT}) if defined($elem->{OUTPUT}); push(@{$part->{LINK_FLAGS}}, @{$elem->{LIBS}}) if defined($elem->{LIBS}); push(@{$part->{LINK_FLAGS}},@{$elem->{LDFLAGS}}) if defined($elem->{LDFLAGS}); |