svn commit: samba r19495 - in branches/SAMBA_4_0/source: . bin build/smb_build lib lib/replace/test lib/talloc torture/local

jelmer at samba.org jelmer at samba.org
Wed Oct 25 14:58:08 GMT 2006


Author: jelmer
Date: 2006-10-25 14:58:05 +0000 (Wed, 25 Oct 2006)
New Revision: 19495

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

Log:
Stop linking binaries twice (once before installation, once during build). 
Make TORTURE-TALLOC and TORTURE-REPLACE builtin again rather than 
separate binaries.

Removed:
   branches/SAMBA_4_0/source/bin/install/
Modified:
   branches/SAMBA_4_0/source/build/smb_build/makefile.pm
   branches/SAMBA_4_0/source/dynconfig.mk
   branches/SAMBA_4_0/source/lib/basic.mk
   branches/SAMBA_4_0/source/lib/replace/test/testsuite.c
   branches/SAMBA_4_0/source/lib/talloc/config.mk
   branches/SAMBA_4_0/source/lib/talloc/testsuite.c
   branches/SAMBA_4_0/source/torture/local/config.mk
   branches/SAMBA_4_0/source/torture/local/local.c


Changeset:
Modified: branches/SAMBA_4_0/source/build/smb_build/makefile.pm
===================================================================
--- branches/SAMBA_4_0/source/build/smb_build/makefile.pm	2006-10-25 12:50:10 UTC (rev 19494)
+++ branches/SAMBA_4_0/source/build/smb_build/makefile.pm	2006-10-25 14:58:05 UTC (rev 19495)
@@ -106,18 +106,10 @@
 {
 	my ($self) = @_;
 
-	my $devld_local = "";
 	my $devld_install = "";
 	my $builddir_headers = "";
 
-	$self->{duplicate_build} = 0;
-	if ($self->{developer}) {
-		$self->{duplicate_build} = 1;
-	}
 	if ($self->{config}->{LIBRARY_OUTPUT_TYPE} eq "SHARED_LIBRARY") {
-		if ($self->{duplicate_build}) {
-			$devld_local = " -Wl,-rpath,\$(builddir)/bin";
-		}
 		$devld_install = " -Wl,-rpath-link,\$(builddir)/bin";
 	}
 	
@@ -138,7 +130,6 @@
 PICFLAG=$self->{config}->{PICFLAG}
 HOSTCC=$self->{config}->{HOSTCC}
 
-LOCAL_LINK_FLAGS=$devld_local
 INSTALL_LINK_FLAGS=$devld_install
 
 LD=$self->{config}->{LD} 
@@ -219,11 +210,7 @@
 	my $installdir;
 	my $init_obj = "";
 	
-	if ($self->{duplicate_build}) {
-		$installdir = $ctx->{RELEASEDIR};
-	} else {
-		$installdir = $ctx->{DEBUGDIR};
-	}
+	$installdir = $ctx->{DEBUGDIR};
 
 	if ($ctx->{TYPE} eq "LIBRARY") {
 		push (@{$self->{shared_libs}}, "$ctx->{DEBUGDIR}/$ctx->{LIBRARY_REALNAME}") if (defined($ctx->{SO_VERSION}));
@@ -379,13 +366,7 @@
 	my $dynconfig = "dynconfig.o";
 	my $dynconfig_install = "dynconfig.o";
 	
-	if ($self->{duplicate_build}) {
-		$installdir = "bin/install$extradir";
-		$dynconfig = "dynconfig-devel.o";
-		$dynconfig_install = "dynconfig.o";
-	} else {
-		$installdir = "bin$extradir";
-	}
+	$installdir = "bin$extradir";
 
 	push(@{$self->{all_objs}}, "\$($ctx->{TYPE}_$ctx->{NAME}_FULL_OBJ_LIST)");
 		
@@ -406,18 +387,6 @@
 	$self->_prepare_list($ctx, "DEPEND_LIST");
 	$self->_prepare_list($ctx, "LINK_FLAGS");
 
-	if ($self->{duplicate_build}) {
-	$self->output(<< "__EOD__"
-#
-$localdir/$ctx->{BINARY}: \$($ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST) \$($ctx->{TYPE}_$ctx->{NAME}_FULL_OBJ_LIST) $dynconfig
-	\@echo Linking \$\@
-	\@\$(LD) \$(LDFLAGS) -o \$\@ \$(LOCAL_LINK_FLAGS) $dynconfig \\
-		\$(INSTALL_LINK_FLAGS) \$\($ctx->{TYPE}_$ctx->{NAME}_LINK_FLAGS) 
-
-__EOD__
-);
-	}
-
 $self->output(<< "__EOD__"
 $installdir/$ctx->{BINARY}: \$($ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST) \$($ctx->{TYPE}_$ctx->{NAME}_FULL_OBJ_LIST) $dynconfig_install
 	\@echo Linking \$\@
@@ -545,12 +514,6 @@
 	$self->output("\ninstallplugins: \$(PLUGINS)\n".$self->{install_plugins}."\n");
 	$self->output("\nuninstallplugins:\n".$self->{uninstall_plugins}."\n");
 
-	# nasty hack to allow running locally
-	if ($self->{duplicate_build}) {
-		$self->output("bin/libdynconfig.\$(SHLIBEXT).0.0.1: dynconfig-devel.o\n");
-		$self->output("bin/libdynconfig.\$(SHLIBEXT).0.0.1: LIBRARY_DYNCONFIG_OBJ_LIST=dynconfig-devel.o\n");
-	}
-
 	$self->_prepare_mk_files();
 
 	$self->output($self->{mkfile});

Modified: branches/SAMBA_4_0/source/dynconfig.mk
===================================================================
--- branches/SAMBA_4_0/source/dynconfig.mk	2006-10-25 12:50:10 UTC (rev 19494)
+++ branches/SAMBA_4_0/source/dynconfig.mk	2006-10-25 14:58:05 UTC (rev 19495)
@@ -17,23 +17,3 @@
 dynconfig.o: dynconfig.c Makefile
 	@echo Compiling $<
 	@$(CC) `$(PERL) $(srcdir)/script/cflags.pl $@` $(CFLAGS) $(PICFLAG) $(PATH_FLAGS) -c $< -o $@
-
-# dynconfig defines used for binaries in bin/, when configure ran in developer 
-# mode:
-
-DEVEL_PATH_FLAGS = -DCONFIGFILE=\"$(CONFIGFILE)\" -DBINDIR=\"$(builddir)/bin\" \
-     -DLMHOSTSFILE=\"$(LMHOSTSFILE)\" -DLOCKDIR=\"$(LOCKDIR)\" \
-	 -DPIDDIR=\"$(PIDDIR)\" -DDATADIR=\"$(srcdir)/codepages\" \
-	 -DLOGFILEBASE=\"$(LOGFILEBASE)\" -DSHLIBEXT=\"$(SHLIBEXT)\" \
-	 -DCONFIGDIR=\"$(CONFIGDIR)\" -DNCALRPCDIR=\"$(NCALRPCDIR)\" \
-	 -DSWATDIR=\"$(srcdir)/../../swat\" \
-	 -DSERVICESDIR=\"$(srcdir)/../../services\"\
-	 -DPRIVATE_DIR=\"$(PRIVATEDIR)\" \
-	 -DMODULESDIR=\"$(builddir)/bin/modules\" \
-	 -DJSDIR=\"$(srcdir)/../scripting/libjs\" \
-	 -DSETUPDIR=\"$(srcdir)/setup\" -DTORTUREDIR=\"$(srcdir)/bin/torture\" \
-	 -DWINBINDD_SOCKET_DIR=\"$(WINBINDD_SOCKET_DIR)\"
-
-dynconfig-devel.o: dynconfig.c Makefile
-	@echo Compiling $<
-	@$(CC) `$(PERL) $(srcdir)/script/cflags.pl $@` -Ilib/replace $(CFLAGS) $(PICFLAG) $(DEVEL_PATH_FLAGS) -c $< -o $@

Modified: branches/SAMBA_4_0/source/lib/basic.mk
===================================================================
--- branches/SAMBA_4_0/source/lib/basic.mk	2006-10-25 12:50:10 UTC (rev 19494)
+++ branches/SAMBA_4_0/source/lib/basic.mk	2006-10-25 14:58:05 UTC (rev 19495)
@@ -4,7 +4,6 @@
 include charset/config.mk
 include ldb/config.mk
 include talloc/config.mk
-include replace/config.mk
 include tdb/config.mk
 include tls/config.mk
 include registry/config.mk

Modified: branches/SAMBA_4_0/source/lib/replace/test/testsuite.c
===================================================================
--- branches/SAMBA_4_0/source/lib/replace/test/testsuite.c	2006-10-25 12:50:10 UTC (rev 19494)
+++ branches/SAMBA_4_0/source/lib/replace/test/testsuite.c	2006-10-25 14:58:05 UTC (rev 19495)
@@ -417,8 +417,7 @@
 }
 
 struct torture_context;
-
-int main()
+bool torture_local_replace(struct torture_context *ctx)
 {
 	bool ret = true;
 	ret &= test_ftruncate();
@@ -466,7 +465,15 @@
 	ret &= test_MAX();
 	ret &= test_socketpair();
 
+	return ret;
+}
+
+#ifndef _SAMBA_BUILD_
+int main()
+{
+	bool ret = torture_local_replace(NULL);
 	if (ret) 
 		return 0;
 	return -1;
 }
+#endif

Modified: branches/SAMBA_4_0/source/lib/talloc/config.mk
===================================================================
--- branches/SAMBA_4_0/source/lib/talloc/config.mk	2006-10-25 12:50:10 UTC (rev 19494)
+++ branches/SAMBA_4_0/source/lib/talloc/config.mk	2006-10-25 14:58:05 UTC (rev 19495)
@@ -11,8 +11,3 @@
 #
 # End LIBRARY LIBTALLOC
 ################################################
-
-[BINARY::TALLOC]
-OBJ_FILES = testsuite.o
-PRIVATE_DEPENDENCIES = LIBTALLOC
-INSTALLDIR = TORTUREDIR/LOCAL

Modified: branches/SAMBA_4_0/source/lib/talloc/testsuite.c
===================================================================
--- branches/SAMBA_4_0/source/lib/talloc/testsuite.c	2006-10-25 12:50:10 UTC (rev 19494)
+++ branches/SAMBA_4_0/source/lib/talloc/testsuite.c	2006-10-25 14:58:05 UTC (rev 19495)
@@ -1025,7 +1025,8 @@
 	return true;
 }
 
-int main(void)
+struct torture_context;
+bool torture_local_talloc(struct torture_context *tctx)
 {
 	bool ret = true;
 
@@ -1057,7 +1058,15 @@
 	}
 	ret &= test_autofree();
 
+	return ret;
+}
+
+#ifndef _SAMBA_BUILD_
+int main(void)
+{
+	bool ret = torture_local_talloc(NULL);
 	if (!ret)
 		return -1;
 	return 0;
 }
+#endif

Modified: branches/SAMBA_4_0/source/torture/local/config.mk
===================================================================
--- branches/SAMBA_4_0/source/torture/local/config.mk	2006-10-25 12:50:10 UTC (rev 19494)
+++ branches/SAMBA_4_0/source/torture/local/config.mk	2006-10-25 14:58:05 UTC (rev 19495)
@@ -12,6 +12,9 @@
 		../../lib/crypto/hmacmd5test.o \
 		../../lib/crypto/sha1test.o \
 		../../lib/crypto/hmacsha1test.o \
+		../../lib/talloc/testsuite.o \
+		../../lib/replace/test/os2_delete.o \
+		../../lib/replace/test/testsuite.o \
 		messaging.o \
 		binding_string.o \
 		idtree.o \

Modified: branches/SAMBA_4_0/source/torture/local/local.c
===================================================================
--- branches/SAMBA_4_0/source/torture/local/local.c	2006-10-25 12:50:10 UTC (rev 19494)
+++ branches/SAMBA_4_0/source/torture/local/local.c	2006-10-25 14:58:05 UTC (rev 19495)
@@ -53,6 +53,9 @@
 										talloc_autofree_context(),
 										"LOCAL");
 
+	torture_suite_add_simple_test(suite, "TALLOC", torture_local_talloc);
+	torture_suite_add_simple_test(suite, "REPLACE", torture_local_replace);
+
 	torture_suite_add_simple_test(suite, "CRYPTO-SHA1", 
 								  torture_local_crypto_sha1);
 	torture_suite_add_simple_test(suite, 



More information about the samba-cvs mailing list