svn commit: samba r14606 - in branches/SAMBA_4_0/source: . build/smb_build lib/ldb/common

jelmer at samba.org jelmer at samba.org
Tue Mar 21 08:32:50 GMT 2006


Author: jelmer
Date: 2006-03-21 08:32:50 +0000 (Tue, 21 Mar 2006)
New Revision: 14606

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14606

Log:
Fix paths in developer mode. This allows 'make quicktest' to work when 
building with --enable-dso

Modified:
   branches/SAMBA_4_0/source/build/smb_build/makefile.pm
   branches/SAMBA_4_0/source/build/smb_build/output.pm
   branches/SAMBA_4_0/source/lib/ldb/common/ldb_modules.c
   branches/SAMBA_4_0/source/main.mk


Changeset:
Modified: branches/SAMBA_4_0/source/build/smb_build/makefile.pm
===================================================================
--- branches/SAMBA_4_0/source/build/smb_build/makefile.pm	2006-03-21 07:42:00 UTC (rev 14605)
+++ branches/SAMBA_4_0/source/build/smb_build/makefile.pm	2006-03-21 08:32:50 UTC (rev 14606)
@@ -208,21 +208,17 @@
 		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 @@
 		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 @@
 	\@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__"

Modified: branches/SAMBA_4_0/source/build/smb_build/output.pm
===================================================================
--- branches/SAMBA_4_0/source/build/smb_build/output.pm	2006-03-21 07:42:00 UTC (rev 14605)
+++ branches/SAMBA_4_0/source/build/smb_build/output.pm	2006-03-21 08:32:50 UTC (rev 14606)
@@ -58,6 +58,11 @@
 		$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 @@
 	} 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};
 }
 

Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb_modules.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/common/ldb_modules.c	2006-03-21 07:42:00 UTC (rev 14605)
+++ branches/SAMBA_4_0/source/lib/ldb/common/ldb_modules.c	2006-03-21 08:32:50 UTC (rev 14606)
@@ -38,6 +38,7 @@
 
 #ifdef _SAMBA_BUILD_
 #include "build.h"
+#include "dynconfig.h"
 #endif
 
 #define LDB_MODULE_PREFIX	"modules:"
@@ -202,7 +203,11 @@
 	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);
 

Modified: branches/SAMBA_4_0/source/main.mk
===================================================================
--- branches/SAMBA_4_0/source/main.mk	2006-03-21 07:42:00 UTC (rev 14605)
+++ branches/SAMBA_4_0/source/main.mk	2006-03-21 08:32:50 UTC (rev 14606)
@@ -239,7 +239,7 @@
 	@-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/.*_*



More information about the samba-cvs mailing list