svn commit: samba r25341 - in branches/4.0-python: . source source/build/smb_build source/lib/ldb source/lib/python source/lib/tdb source/libcli source/scripting/swig

jelmer at samba.org jelmer at samba.org
Wed Sep 26 02:06:14 GMT 2007


Author: jelmer
Date: 2007-09-26 02:06:12 +0000 (Wed, 26 Sep 2007)
New Revision: 25341

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

Log:
Revive tim's swig code.
Removed:
   branches/4.0-python/source/libcli/config.m4
   branches/4.0-python/source/scripting/swig/config.m4
Modified:
   branches/4.0-python/
   branches/4.0-python/.bzrignore
   branches/4.0-python/source/build/smb_build/config_mk.pm
   branches/4.0-python/source/build/smb_build/input.pm
   branches/4.0-python/source/build/smb_build/main.pl
   branches/4.0-python/source/configure.ac
   branches/4.0-python/source/lib/ldb/config.mk
   branches/4.0-python/source/lib/ldb/libldb.m4
   branches/4.0-python/source/lib/python/config.m4
   branches/4.0-python/source/lib/tdb/config.mk
   branches/4.0-python/source/libcli/config.mk
   branches/4.0-python/source/scripting/swig/config.mk


Changeset:

Property changes on: branches/4.0-python
___________________________________________________________________
Name: bzr:revision-info
...skipped...
Name: bzr:file-ids
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/4.0-python/.bzrignore
===================================================================
--- branches/4.0-python/.bzrignore	2007-09-26 01:34:45 UTC (rev 25340)
+++ branches/4.0-python/.bzrignore	2007-09-26 02:06:12 UTC (rev 25341)
@@ -207,3 +207,5 @@
 source/lib/python/Modules/Setup.local
 source/lib/python/Modules/Setup
 source/lib/python/Modules/Setup.config
+lib/ldb/swig/ldb.py
+source/lib/ldb/swig/ldb.py

Modified: branches/4.0-python/source/build/smb_build/config_mk.pm
===================================================================
--- branches/4.0-python/source/build/smb_build/config_mk.pm	2007-09-26 01:34:45 UTC (rev 25340)
+++ branches/4.0-python/source/build/smb_build/config_mk.pm	2007-09-26 02:06:12 UTC (rev 25341)
@@ -19,6 +19,12 @@
 		"CPPFLAGS"		=> "list",
 		"LDFLAGS"		=> "list",
 		},
+	"SWIG" => {
+		SWIG_FILE => "string",
+		"PRIVATE_DEPENDENCIES"	=> "list",
+		"PUBLIC_DEPENDENCIES"	=> "list",
+		"ENABLE"		=> "bool",
+	},
 	"SUBSYSTEM" => {
 		"OBJ_FILES"		=> "list",
 

Modified: branches/4.0-python/source/build/smb_build/input.pm
===================================================================
--- branches/4.0-python/source/build/smb_build/input.pm	2007-09-26 01:34:45 UTC (rev 25340)
+++ branches/4.0-python/source/build/smb_build/input.pm	2007-09-26 02:06:12 UTC (rev 25341)
@@ -8,6 +8,7 @@
 use smb_build::config;
 use strict;
 package smb_build::input;
+use File::Basename;
 
 my $srcdir = $config::config{srcdir};
 
@@ -134,6 +135,22 @@
 	add_libreplace($lib);
 }
 
+sub check_swig($$)
+{
+	my ($INPUT, $swig) = @_;
+
+	return if ($swig->{ENABLE} ne "YES");
+	
+	my $dirname = dirname($swig->{SWIG_FILE});
+	my $basename = basename($swig->{SWIG_FILE}, ".i");
+
+	$swig->{OUTPUT_TYPE} = ["SHARED_LIBRARY"];
+	$swig->{LIBRARY_REALNAME} = "$dirname/_$basename.\$(SHLIBEXT)";
+	$swig->{OBJ_FILES} = ["$dirname/$basename\_wrap\.o"];
+
+	check_library($INPUT, $swig, ["SHARED_LIBRARY"]);
+}
+
 sub check_binary($$)
 {
 	my ($INPUT, $bin) = @_;
@@ -234,10 +251,20 @@
 		$part->{LINK_FLAGS} = [];
 		$part->{FULL_OBJ_LIST} = ["\$($part->{TYPE}_$part->{NAME}_OBJ_LIST)"];
 
-		check_subsystem($INPUT, $part, $subsys_ot) if ($part->{TYPE} eq "SUBSYSTEM");
-		check_module($INPUT, $part, $module_ot) if ($part->{TYPE} eq "MODULE");
-		check_library($INPUT, $part, $lib_ot) if ($part->{TYPE} eq "LIBRARY");
-		check_binary($INPUT, $part) if ($part->{TYPE} eq "BINARY");
+		if ($part->{TYPE} eq "SUBSYSTEM") { 
+			check_subsystem($INPUT, $part, $subsys_ot);
+		} elsif ($part->{TYPE} eq "MODULE") {
+			check_module($INPUT, $part, $module_ot);
+		} elsif ($part->{TYPE} eq "LIBRARY") {
+			check_library($INPUT, $part, $lib_ot);
+		} elsif ($part->{TYPE} eq "BINARY") {
+			check_binary($INPUT, $part);
+		} elsif ($part->{TYPE} eq "SWIG") {
+			check_swig($INPUT, $part);
+		} elsif ($part->{TYPE} eq "EXT_LIB") {
+		} else {
+			die("Unknown type $part->{TYPE}");
+		}
 	}
 
 	foreach my $part (values %$INPUT) {

Modified: branches/4.0-python/source/build/smb_build/main.pl
===================================================================
--- branches/4.0-python/source/build/smb_build/main.pl	2007-09-26 01:34:45 UTC (rev 25340)
+++ branches/4.0-python/source/build/smb_build/main.pl	2007-09-26 02:06:12 UTC (rev 25341)
@@ -74,7 +74,6 @@
 cflags::create_cflags($OUTPUT, $config::config{srcdir},
 		    $config::config{builddir}, "extra_cflags.txt");
 
-
 summary::show($OUTPUT, \%config::config);
 
 1;

Modified: branches/4.0-python/source/configure.ac
===================================================================
--- branches/4.0-python/source/configure.ac	2007-09-26 01:34:45 UTC (rev 25340)
+++ branches/4.0-python/source/configure.ac	2007-09-26 02:06:12 UTC (rev 25341)
@@ -64,7 +64,6 @@
 m4_include(lib/python/config.m4)
 m4_include(auth/gensec/config.m4)
 m4_include(smbd/process_model.m4)
-m4_include(scripting/swig/config.m4)
 m4_include(ntvfs/posix/config.m4)
 m4_include(ntvfs/unixuid/config.m4)
 m4_include(lib/socket_wrapper/config.m4)
@@ -73,7 +72,6 @@
 m4_include(ntvfs/sysdep/config.m4)
 m4_include(lib/appweb/config.m4)
 m4_include(nsswitch/config.m4)
-m4_include(libcli/config.m4)
 
 #################################################
 # add *_CFLAGS only for the real build

Modified: branches/4.0-python/source/lib/ldb/config.mk
===================================================================
--- branches/4.0-python/source/lib/ldb/config.mk	2007-09-26 01:34:45 UTC (rev 25340)
+++ branches/4.0-python/source/lib/ldb/config.mk	2007-09-26 02:06:12 UTC (rev 25341)
@@ -207,10 +207,10 @@
 
 #######################
 # Start LIBRARY swig_ldb
-[LIBRARY::swig_ldb]
-PUBLIC_DEPENDENCIES = LIBLDB DYNCONFIG
-LIBRARY_REALNAME = swig/_ldb.$(SHLIBEXT)
-OBJ_FILES = swig/ldb_wrap.o
+[SWIG::swig_ldb]
+PUBLIC_DEPENDENCIES = LIBLDB DYNCONFIG LIBPYTHON
+PRIVATE_DEPENDENCIES = gensec
+LIBRARY_REALNAME = swig/ldb.i
 # End LIBRARY swig_ldb
 #######################
 

Modified: branches/4.0-python/source/lib/ldb/libldb.m4
===================================================================
--- branches/4.0-python/source/lib/ldb/libldb.m4	2007-09-26 01:34:45 UTC (rev 25340)
+++ branches/4.0-python/source/lib/ldb/libldb.m4	2007-09-26 02:06:12 UTC (rev 25341)
@@ -5,5 +5,3 @@
 if test x"$with_sqlite3_support" = x"yes"; then
 	SMB_ENABLE(ldb_sqlite3, YES)
 fi
-
-SMB_ENABLE(swig_ldb, NO)

Modified: branches/4.0-python/source/lib/python/config.m4
===================================================================
--- branches/4.0-python/source/lib/python/config.m4	2007-09-26 01:34:45 UTC (rev 25340)
+++ branches/4.0-python/source/lib/python/config.m4	2007-09-26 02:06:12 UTC (rev 25341)
@@ -1519,7 +1519,7 @@
 fi
 
 AC_DEFINE_UNQUOTED(PLATFORM, $MACHDEP, [Platforms])
-SMB_SUBSYSTEM(LIBPYTHON, [], [INTERNAL_PYTHON])
+SMB_SUBSYSTEM(LIBPYTHON, [], [INTERNAL_PYTHON], [-Ilib/python/Include -Ilib/python])
 SMB_ENABLE(python)
 SMB_ENABLE(pgen)
 PYTHON="$builddir/bin/python"

Modified: branches/4.0-python/source/lib/tdb/config.mk
===================================================================
--- branches/4.0-python/source/lib/tdb/config.mk	2007-09-26 01:34:45 UTC (rev 25340)
+++ branches/4.0-python/source/lib/tdb/config.mk	2007-09-26 02:06:12 UTC (rev 25341)
@@ -60,9 +60,8 @@
 
 #######################
 # Start LIBRARY swig_tdb
-[LIBRARY::swig_tdb]
-LIBRARY_REALNAME = swig/_tdb.$(SHLIBEXT)
-OBJ_FILES = swig/tdb_wrap.o
+[SWIG::swig_tdb]
+SWIG_FILE = swig/tdb.i
 PUBLIC_DEPENDENCIES = LIBTDB DYNCONFIG
 # End LIBRARY swig_tdb
 #######################

Deleted: branches/4.0-python/source/libcli/config.m4
===================================================================
--- branches/4.0-python/source/libcli/config.m4	2007-09-26 01:34:45 UTC (rev 25340)
+++ branches/4.0-python/source/libcli/config.m4	2007-09-26 02:06:12 UTC (rev 25341)
@@ -1,3 +0,0 @@
-AC_MSG_CHECKING([for Python (libcli_nbt)])
-
-SMB_ENABLE(swig_libcli_nbt, NO)

Modified: branches/4.0-python/source/libcli/config.mk
===================================================================
--- branches/4.0-python/source/libcli/config.mk	2007-09-26 01:34:45 UTC (rev 25340)
+++ branches/4.0-python/source/libcli/config.mk	2007-09-26 02:06:12 UTC (rev 25341)
@@ -54,9 +54,8 @@
 PUBLIC_DEPENDENCIES = LIBNDR NDR_NBT LIBCLI_COMPOSITE LIBEVENTS \
 	NDR_SECURITY samba-socket LIBSAMBA-UTIL
 
-[LIBRARY::swig_libcli_nbt]
-LIBRARY_REALNAME = swig/_libcli_nbt.$(SHLIBEXT)
-OBJ_FILES = swig/libcli_nbt_wrap.o
+[SWIG::swig_libcli_nbt]
+SWIG_FILE = swig/libcli_nbt.i
 PUBLIC_DEPENDENCIES = LIBCLI_NBT DYNCONFIG LIBSAMBA-CONFIG
 
 [SUBSYSTEM::LIBCLI_DGRAM]

Deleted: branches/4.0-python/source/scripting/swig/config.m4
===================================================================
--- branches/4.0-python/source/scripting/swig/config.m4	2007-09-26 01:34:45 UTC (rev 25340)
+++ branches/4.0-python/source/scripting/swig/config.m4	2007-09-26 02:06:12 UTC (rev 25341)
@@ -1,6 +0,0 @@
-dnl # Scripting subsystem
-
-# Check for python support
-
-SMB_ENABLE(swig_dcerpc, NO)
-

Modified: branches/4.0-python/source/scripting/swig/config.mk
===================================================================
--- branches/4.0-python/source/scripting/swig/config.mk	2007-09-26 01:34:45 UTC (rev 25340)
+++ branches/4.0-python/source/scripting/swig/config.mk	2007-09-26 02:06:12 UTC (rev 25341)
@@ -1,9 +1,8 @@
 #######################
 # Start LIBRARY swig_dcerpc
-[LIBRARY::swig_dcerpc]
-LIBRARY_REALNAME = _dcerpc.$(SHLIBEXT)
+[SWIG::swig_dcerpc]
+SWIG_FILE = dcerpc.i
 PUBLIC_DEPENDENCIES = LIBCLI_SMB NDR_MISC LIBSAMBA-UTIL LIBSAMBA-CONFIG dcerpc_samr RPC_NDR_LSA DYNCONFIG
-OBJ_FILES = dcerpc_wrap.o
 # End LIBRARY swig_dcerpc
 #######################
 



More information about the samba-cvs mailing list