diff options
-rw-r--r-- | source4/build/smb_build/TODO | 2 | ||||
-rw-r--r-- | source4/build/smb_build/config_mk.pm | 1 | ||||
-rw-r--r-- | source4/build/smb_build/makefile.pm | 4 | ||||
-rw-r--r-- | source4/build/smb_build/output.pm | 24 |
4 files changed, 20 insertions, 11 deletions
diff --git a/source4/build/smb_build/TODO b/source4/build/smb_build/TODO index 616c53201b..f02799de5a 100644 --- a/source4/build/smb_build/TODO +++ b/source4/build/smb_build/TODO @@ -1,3 +1,5 @@ +- make --enable-dso the default +- per-subsystem CFLAGS (which are inherited) - pregenerate more stuff (IDL, manpages, lex/yacc?) - saner names for: libcli.so.0.0.1 (rename to libsmb?) diff --git a/source4/build/smb_build/config_mk.pm b/source4/build/smb_build/config_mk.pm index 532580359d..587335ac3e 100644 --- a/source4/build/smb_build/config_mk.pm +++ b/source4/build/smb_build/config_mk.pm @@ -74,6 +74,7 @@ my $section_types = { "LIBRARY" => { "VERSION" => "string", "SO_VERSION" => "string", + "LIBRARY_REALNAME" => "string", "INIT_FUNCTION_TYPE" => "string", diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm index 47dea6076a..7b57470f81 100644 --- a/source4/build/smb_build/makefile.pm +++ b/source4/build/smb_build/makefile.pm @@ -204,7 +204,7 @@ sub SharedLibrary($$) } if ($ctx->{TYPE} eq "LIBRARY") { - push (@{$self->{shared_libs}}, "$ctx->{DEBUGDIR}/$ctx->{LIBRARY_REALNAME}"); + push (@{$self->{shared_libs}}, "$ctx->{DEBUGDIR}/$ctx->{LIBRARY_REALNAME}") if (defined($ctx->{SO_VERSION})); push (@{$self->{installable_shared_libs}}, "$installdir/$ctx->{LIBRARY_REALNAME}") if (defined($ctx->{SO_VERSION})); } elsif ($ctx->{TYPE} eq "MODULE") { push (@{$self->{shared_modules}}, "$ctx->{TARGET}"); @@ -260,7 +260,7 @@ __EOD__ my $singlesoarg = ""; - if ($self->{duplicate_build}) { + if ($ctx->{DEBUGDIR} ne $installdir) { $self->output(<< "__EOD__" # diff --git a/source4/build/smb_build/output.pm b/source4/build/smb_build/output.pm index 8b7f774f26..5593558c0c 100644 --- a/source4/build/smb_build/output.pm +++ b/source4/build/smb_build/output.pm @@ -58,16 +58,22 @@ sub generate_shared_library($) $lib_name = "lib$link_name"; } - if ($lib->{TYPE} eq "MODULE") { - $lib->{DEBUGDIR} = "bin/modules/$lib->{SUBSYSTEM}"; - $lib->{RELEASEDIR} = "bin/install/modules/$lib->{SUBSYSTEM}"; - $lib->{LIBRARY_REALNAME} = $link_name; - $lib->{LIBRARY_REALNAME} =~ s/^$lib->{SUBSYSTEM}_//g; - $lib->{LIBRARY_REALNAME}.= ".\$(SHLIBEXT)"; + if (defined($lib->{LIBRARY_REALNAME})) { + $lib->{BASEDIR} =~ s/^\.\///g; + $lib->{LIBRARY_REALNAME} = "$lib->{LIBRARY_REALNAME}"; + $lib->{DEBUGDIR} = $lib->{RELEASEDIR} = $lib->{BASEDIR}; } else { - $lib->{DEBUGDIR} = "bin"; - $lib->{RELEASEDIR} = "bin/install"; - $lib->{LIBRARY_REALNAME} = "$lib_name.\$(SHLIBEXT)"; + if ($lib->{TYPE} eq "MODULE") { + $lib->{DEBUGDIR} = "bin/modules/$lib->{SUBSYSTEM}"; + $lib->{RELEASEDIR} = "bin/install/modules/$lib->{SUBSYSTEM}"; + $lib->{LIBRARY_REALNAME} = $link_name; + $lib->{LIBRARY_REALNAME} =~ s/^$lib->{SUBSYSTEM}_//g; + $lib->{LIBRARY_REALNAME}.= ".\$(SHLIBEXT)"; + } else { + $lib->{DEBUGDIR} = "bin"; + $lib->{RELEASEDIR} = "bin/install"; + $lib->{LIBRARY_REALNAME} = "$lib_name.\$(SHLIBEXT)"; + } } if (defined($lib->{VERSION})) { |