diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2006-04-28 01:55:17 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:05:08 -0500 |
commit | bc141c795767cc765731c607f1fb047811da6e03 (patch) | |
tree | ecfc5163d2e58a679240fded98b9d08ab6134328 /source4/build/smb_build | |
parent | 4818967242c7f502661193428f6217e8caa43e20 (diff) | |
download | samba-bc141c795767cc765731c607f1fb047811da6e03.tar.gz samba-bc141c795767cc765731c607f1fb047811da6e03.tar.bz2 samba-bc141c795767cc765731c607f1fb047811da6e03.zip |
r15304: Fix smbd build, more updates on getting --enable-dso to build again
(This used to be commit 3ef9326386ba1c210166302cbcf02d2ed3f19944)
Diffstat (limited to 'source4/build/smb_build')
-rw-r--r-- | source4/build/smb_build/TODO | 4 | ||||
-rw-r--r-- | source4/build/smb_build/header.pm | 2 | ||||
-rw-r--r-- | source4/build/smb_build/input.pm | 7 | ||||
-rw-r--r-- | source4/build/smb_build/main.pl | 12 | ||||
-rw-r--r-- | source4/build/smb_build/makefile.pm | 1 | ||||
-rw-r--r-- | source4/build/smb_build/output.pm | 6 |
6 files changed, 13 insertions, 19 deletions
diff --git a/source4/build/smb_build/TODO b/source4/build/smb_build/TODO index c21c3b8082..cc15e9099a 100644 --- a/source4/build/smb_build/TODO +++ b/source4/build/smb_build/TODO @@ -1,8 +1,8 @@ +- replace StrnCpy() with strlcpy() +- Add --export-dynamic for each subsystem that has modules - let the build system implement some make functions($(patsubst),$(wildcard),...) and use our own implementations where `make' does not support them - include extra_flags.txt using Makefile construction if supported by current make -- change default subsystem/library build type to STATIC_LIBRARY - - fix order of UNIQUE_DEPENDENCIES - 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/header.pm b/source4/build/smb_build/header.pm index b2a71969af..7a0e40fda5 100644 --- a/source4/build/smb_build/header.pm +++ b/source4/build/smb_build/header.pm @@ -27,7 +27,7 @@ sub _prepare_build_h($) my @defines = (); my $output = ""; - foreach my $key (values %{$depend}) { + foreach my $key (values %$depend) { my $DEFINE = (); next if ($key->{TYPE} ne "LIBRARY" and $key->{TYPE} ne "MODULE" and diff --git a/source4/build/smb_build/input.pm b/source4/build/smb_build/input.pm index 3084381661..8f7e5e4838 100644 --- a/source4/build/smb_build/input.pm +++ b/source4/build/smb_build/input.pm @@ -71,8 +71,6 @@ sub check_module($$$) if ($mod->{OUTPUT_TYPE} eq "SHARED_LIBRARY") { $mod->{INSTALLDIR} = "MODULESDIR/$mod->{SUBSYSTEM}"; - push (@{$mod->{PRIVATE_DEPENDENCIES}}, $mod->{SUBSYSTEM}) unless - $INPUT->{$mod->{SUBSYSTEM}}->{TYPE} eq "BINARY"; } else { push (@{$INPUT->{$mod->{SUBSYSTEM}}{INIT_FUNCTIONS}}, $mod->{INIT_FUNCTION}) if defined($mod->{INIT_FUNCTION}); } @@ -114,7 +112,6 @@ sub check_binary($$) $bin->{OUTPUT_TYPE} = "BINARY"; } - sub import_integrated($$) { my ($lib, $depend) = @_; @@ -200,6 +197,7 @@ sub check($$$$$) foreach my $k (keys %$INPUT) { my $part = $INPUT->{$k}; + $part->{LINK_FLAGS} = []; $part->{FULL_OBJ_LIST} = ["\$($part->{TYPE}_$part->{NAME}_OBJ_LIST)"]; check_subsystem($INPUT, $part, $subsys_ot) if ($part->{TYPE} eq "SUBSYSTEM"); @@ -209,6 +207,9 @@ sub check($$$$$) } foreach my $part (values %$INPUT) { + if (defined($part->{INIT_FUNCTIONS})) { + push (@{$part->{LINK_FLAGS}}, "\$(DYNEXP)"); + } import_integrated($part, $INPUT); } diff --git a/source4/build/smb_build/main.pl b/source4/build/smb_build/main.pl index 61c9214086..d89be4bebf 100644 --- a/source4/build/smb_build/main.pl +++ b/source4/build/smb_build/main.pl @@ -19,14 +19,6 @@ use strict; my $INPUT = {}; my $mkfile = smb_build::config_mk::run_config_mk($INPUT, $config::config{srcdir}, $config::config{builddir}, "main.mk"); -my $subsystem_output_type; - -if (defined($ENV{"SUBSYSTEM_OUTPUT_TYPE"})) { - $subsystem_output_type = $ENV{SUBSYSTEM_OUTPUT_TYPE}; -} else { - $subsystem_output_type = "STATIC_LIBRARY"; -} - my $library_output_type; if (defined($ENV{"LIBRARY_OUTPUT_TYPE"})) { $library_output_type = $ENV{LIBRARY_OUTPUT_TYPE}; @@ -46,9 +38,9 @@ if (defined($ENV{"MODULE_OUTPUT_TYPE"})) { } my $DEPEND = smb_build::input::check($INPUT, \%config::enabled, - $subsystem_output_type, $library_output_type, $module_output_type); + "STATIC_LIBRARY", $library_output_type, $module_output_type); my $OUTPUT = output::create_output($DEPEND, \%config::config); -$config::config{SUBSYSTEM_OUTPUT_TYPE} = $subsystem_output_type; +$config::config{SUBSYSTEM_OUTPUT_TYPE} = "STATIC_LIBRARY"; $config::config{LIBRARY_OUTPUT_TYPE} = $library_output_type; $config::config{MODULE_OUTPUT_TYPE} = $module_output_type; my $mkenv = new smb_build::makefile(\%config::config, $mkfile); diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm index 3f0f29f208..bf12de628f 100644 --- a/source4/build/smb_build/makefile.pm +++ b/source4/build/smb_build/makefile.pm @@ -144,6 +144,7 @@ STLD_FLAGS=-rc SHLD=$self->{config}->{CC} SHLD_FLAGS=$self->{config}->{LDSHFLAGS} $self->{config}->{LDFLAGS} -L\$(builddir)/bin SHLIBEXT=$self->{config}->{SHLIBEXT} +DYNEXP=$self->{config}->{DYNEXP} XSLTPROC=$self->{config}->{XSLTPROC} diff --git a/source4/build/smb_build/output.pm b/source4/build/smb_build/output.pm index 0f66ef91fe..85c78cf3b4 100644 --- a/source4/build/smb_build/output.pm +++ b/source4/build/smb_build/output.pm @@ -33,7 +33,7 @@ sub generate_shared_library($) my $lib_name; $lib->{DEPEND_LIST} = []; - $lib->{LINK_FLAGS} = ["\$($lib->{TYPE}_$lib->{NAME}\_OBJ_LIST)"]; + push(@{$lib->{LINK_FLAGS}}, "\$($lib->{TYPE}_$lib->{NAME}\_OBJ_LIST)"); $link_name = lc($lib->{NAME}); $lib_name = $link_name; @@ -83,7 +83,7 @@ sub generate_static_library($) $link_name =~ s/^LIB//; $lib->{LIBRARY_NAME} = "lib".lc($link_name).".a"; - $lib->{LINK_FLAGS} = ["\$($lib->{TYPE}_$lib->{NAME}\_OBJ_LIST)"]; + push(@{$lib->{LINK_FLAGS}}, "\$($lib->{TYPE}_$lib->{NAME}\_OBJ_LIST)"); $lib->{TARGET} = "bin/$lib->{LIBRARY_NAME}"; $lib->{OUTPUT} = "-l".lc($link_name); @@ -94,7 +94,7 @@ sub generate_binary($) my $bin = shift; $bin->{DEPEND_LIST} = []; - $bin->{LINK_FLAGS} = ["\$($bin->{TYPE}_$bin->{NAME}\_OBJ_LIST)"]; + push(@{$bin->{LINK_FLAGS}}, "\$($bin->{TYPE}_$bin->{NAME}\_OBJ_LIST)"); $bin->{RELEASEDIR} = "bin/install"; $bin->{DEBUGDIR} = "bin/"; |