1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-22 22:04:08 +03:00

r15271: Fix --enable-dso

(This used to be commit 8de11ec2445ce414b37938b07937fdd7837f89a2)
This commit is contained in:
Jelmer Vernooij 2006-04-26 11:58:42 +00:00 committed by Gerald (Jerry) Carter
parent f5bc4a72c5
commit 61ff97e360
4 changed files with 27 additions and 17 deletions

View File

@ -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?

View File

@ -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;

View File

@ -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});

View File

@ -40,6 +40,7 @@ OBJ_FILES = \
access.o \
connect_multi.o \
connect.o
PUBLIC_DEPENDENCIES = LIBCLI_RESOLVE SOCKET_WRAPPER LIBTALLOC
PUBLIC_DEPENDENCIES = LIBTALLOC
PRIVATE_DEPENDENCIES = LIBCLI_RESOLVE SOCKET_WRAPPER
# End SUBSYSTEM SOCKET
################################################