diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2006-03-21 08:32:50 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:59:00 -0500 |
commit | 07bdbd4592ecae2325a3456fe9d9700e6c256b64 (patch) | |
tree | 40016c83512dbe1bd327b91cf1235834fa3406b1 /source4 | |
parent | 59c427963f1e445012f8bb78ca46d2ec317e2caf (diff) | |
download | samba-07bdbd4592ecae2325a3456fe9d9700e6c256b64.tar.gz samba-07bdbd4592ecae2325a3456fe9d9700e6c256b64.tar.bz2 samba-07bdbd4592ecae2325a3456fe9d9700e6c256b64.zip |
r14606: Fix paths in developer mode. This allows 'make quicktest' to work when
building with --enable-dso
(This used to be commit 614f062748d95a455d1a99a7444fdc0fe152f4e4)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/build/smb_build/makefile.pm | 28 | ||||
-rw-r--r-- | source4/build/smb_build/output.pm | 12 | ||||
-rw-r--r-- | source4/lib/ldb/common/ldb_modules.c | 5 | ||||
-rw-r--r-- | source4/main.mk | 2 |
4 files changed, 32 insertions, 15 deletions
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm index 7db6367fd2..ec306c2bb7 100644 --- a/source4/build/smb_build/makefile.pm +++ b/source4/build/smb_build/makefile.pm @@ -208,21 +208,17 @@ sub SharedLibrary($$) push (@{$self->{shared_libs}}, "$ctx->{DEBUGDIR}/$ctx->{LIBRARY_REALNAME}"); push (@{$self->{installable_shared_libs}}, "$installdir/$ctx->{LIBRARY_REALNAME}") if (defined($ctx->{SO_VERSION})); } elsif ($ctx->{TYPE} eq "MODULE") { - push (@{$self->{shared_modules}}, "$ctx->{DEBUGDIR}/$ctx->{LIBRARY_REALNAME}"); + push (@{$self->{shared_modules}}, "$ctx->{DEBUGDIR}/$ctx->{FIXED_NAME}.\$(SHLIBEXT)"); push (@{$self->{plugins}}, "$installdir/$ctx->{LIBRARY_REALNAME}"); - my $fixedname = $ctx->{NAME}; - - $fixedname =~ s/^$ctx->{SUBSYSTEM}_//g; - - $self->{install_plugins} .= "\t\@echo Installing $installdir/$ctx->{LIBRARY_REALNAME} as \$(DESTDIR)\$(MODULESDIR)/$ctx->{SUBSYSTEM}/$fixedname.\$(SHLIBEXT)\n"; + $self->{install_plugins} .= "\t\@echo Installing $installdir/$ctx->{LIBRARY_REALNAME} as \$(DESTDIR)\$(MODULESDIR)/$ctx->{SUBSYSTEM}/$ctx->{FIXED_NAME}.\$(SHLIBEXT)\n"; $self->{install_plugins} .= "\t\@mkdir -p \$(DESTDIR)\$(MODULESDIR)/$ctx->{SUBSYSTEM}/\n"; - $self->{install_plugins} .= "\t\@cp $installdir/$ctx->{LIBRARY_REALNAME} \$(DESTDIR)\$(MODULESDIR)/$ctx->{SUBSYSTEM}/$fixedname.\$(SHLIBEXT)\n"; - $self->{uninstall_plugins} .= "\t\@echo Uninstalling \$(DESTDIR)\$(MODULESDIR)/$ctx->{SUBSYSTEM}/$fixedname.\$(SHLIBEXT)\n"; - $self->{uninstall_plugins} .= "\t\@-rm \$(DESTDIR)\$(MODULESDIR)/$ctx->{SUBSYSTEM}/$fixedname.\$(SHLIBEXT)\n"; + $self->{install_plugins} .= "\t\@cp $installdir/$ctx->{LIBRARY_REALNAME} \$(DESTDIR)\$(MODULESDIR)/$ctx->{SUBSYSTEM}/$ctx->{FIXED_NAME}.\$(SHLIBEXT)\n"; + $self->{uninstall_plugins} .= "\t\@echo Uninstalling \$(DESTDIR)\$(MODULESDIR)/$ctx->{SUBSYSTEM}/$ctx->{FIXED_NAME}.\$(SHLIBEXT)\n"; + $self->{uninstall_plugins} .= "\t\@-rm \$(DESTDIR)\$(MODULESDIR)/$ctx->{SUBSYSTEM}/$ctx->{FIXED_NAME}.\$(SHLIBEXT)\n"; if (defined($ctx->{ALIASES})) { foreach (@{$ctx->{ALIASES}}) { - $self->{install_plugins} .= "\t\@ln -s $fixedname.\$(SHLIBEXT) \$(DESTDIR)\$(MODULESDIR)/$ctx->{SUBSYSTEM}/$_.\$(SHLIBEXT)\n"; + $self->{install_plugins} .= "\t\@ln -s $ctx->{FIXED_NAME}.\$(SHLIBEXT) \$(DESTDIR)\$(MODULESDIR)/$ctx->{SUBSYSTEM}/$_.\$(SHLIBEXT)\n"; $self->{uninstall_plugins} .= "\t\@-rm \$(DESTDIR)\$(MODULESDIR)/$ctx->{SUBSYSTEM}/$_.\$(SHLIBEXT)\n"; } } @@ -259,7 +255,7 @@ __EOD__ defined($ctx->{LIBRARY_SONAME})) { $soarg = "$self->{config}->{SONAMEFLAG}$ctx->{LIBRARY_SONAME} "; if ($ctx->{LIBRARY_REALNAME} ne $ctx->{LIBRARY_SONAME}) { - $soargdebug = "\t\@ln -fs $ctx->{LIBRARY_REALNAME} $ctx->{DEBUGDIR}/$ctx->{LIBRARY_SONAME}\n"; + $soargdebug = "\n\t\@ln -fs $ctx->{LIBRARY_REALNAME} $ctx->{DEBUGDIR}/$ctx->{LIBRARY_SONAME}"; } } @@ -272,10 +268,16 @@ $ctx->{TARGET}: \$($ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST) \$($ctx->{TYPE}_$ctx-> \@mkdir -p $ctx->{DEBUGDIR} \@\$(SHLD) \$(SHLD_FLAGS) -o \$\@ \$(LOCAL_LINK_FLAGS) \\ \$($ctx->{TYPE}_$ctx->{NAME}_LINK_FLAGS) $soarg \\ - $init_obj \$($ctx->{TYPE}_$ctx->{NAME}_LINK_LIST) -$soargdebug + $init_obj \$($ctx->{TYPE}_$ctx->{NAME}_LINK_LIST)$soargdebug __EOD__ ); + if (defined($ctx->{ALIASES})) { + foreach (@{$ctx->{ALIASES}}) { + $self->output("\t\@ln -s $ctx->{FIXED_NAME}.\$(SHLIBEXT) $ctx->{DEBUGDIR}/$_.\$(SHLIBEXT)\n"); + } + } + + $self->output("\n"); } $self->output(<< "__EOD__" diff --git a/source4/build/smb_build/output.pm b/source4/build/smb_build/output.pm index 594d1d48c7..acff857497 100644 --- a/source4/build/smb_build/output.pm +++ b/source4/build/smb_build/output.pm @@ -58,6 +58,11 @@ sub generate_shared_library($) $lib_name = "lib$link_name"; } + if ($lib->{TYPE} eq "MODULE") { + $lib->{FIXED_NAME} = $link_name; + $lib->{FIXED_NAME} =~ s/^$lib->{SUBSYSTEM}_//g; + } + $lib->{DEBUGDIR} = "bin"; $lib->{RELEASEDIR} = "bin/install"; $lib->{LIBRARY_REALNAME} = $lib->{LIBRARY_NAME} = "$lib_name.\$(SHLIBEXT)"; @@ -68,7 +73,12 @@ sub generate_shared_library($) } elsif ($lib->{TYPE} eq "MODULE") { $lib->{DEBUGDIR} = "bin/modules/$lib->{SUBSYSTEM}"; } - $lib->{TARGET} = "$lib->{DEBUGDIR}/$lib->{LIBRARY_REALNAME}"; + + if (defined($lib->{FIXED_NAME})) { + $lib->{TARGET} = "$lib->{DEBUGDIR}/$lib->{FIXED_NAME}.\$(SHLIBEXT)"; + } else { + $lib->{TARGET} = "$lib->{DEBUGDIR}/$lib->{LIBRARY_REALNAME}"; + } $lib->{OUTPUT} = $lib->{TARGET}; } diff --git a/source4/lib/ldb/common/ldb_modules.c b/source4/lib/ldb/common/ldb_modules.c index 6ba5fbbc20..bc27d1ed1b 100644 --- a/source4/lib/ldb/common/ldb_modules.c +++ b/source4/lib/ldb/common/ldb_modules.c @@ -38,6 +38,7 @@ #ifdef _SAMBA_BUILD_ #include "build.h" +#include "dynconfig.h" #endif #define LDB_MODULE_PREFIX "modules:" @@ -202,7 +203,11 @@ int ldb_try_load_dso(struct ldb_context *ldb, const char *name) int (*init_fn) (void); #ifdef HAVE_DLOPEN +#ifdef _SAMBA_BUILD_ + path = talloc_asprintf(ldb, "%s/ldb/%s.%s", dyn_MODULESDIR, name, dyn_SHLIBEXT); +#else path = talloc_asprintf(ldb, "%s/%s.%s", MODULESDIR, name, SHLIBEXT); +#endif ldb_debug(ldb, LDB_DEBUG_TRACE, "trying to load %s from %s\n", name, path); diff --git a/source4/main.mk b/source4/main.mk index 62197b1560..1eee9a57a5 100644 --- a/source4/main.mk +++ b/source4/main.mk @@ -239,7 +239,7 @@ clean:: clean_pch @-rm -f $(STATIC_LIBRARIES) $(SHARED_LIBRARIES) @-rm -f bin/*.$(SHLIBEXT)* @echo Removing modules - @-rm -f $(SHARED_MODULES) $(PLUGINS) + @-rm -f bin/modules/*/*.$(SHLIBEXT) @-rm -f bin/*_init_module.c @echo Removing dummy targets @-rm -f bin/.*_* |