From ad5bb10f707dddc0cea159af09393520128157d7 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 14 Jan 2008 23:04:57 +0100 Subject: python: Build shared python modules for generic use. (This used to be commit 502424955237ace5a276d4c91c62e95233ecd978) --- source4/build/smb_build/input.pm | 2 +- source4/build/smb_build/makefile.pm | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'source4/build') diff --git a/source4/build/smb_build/input.pm b/source4/build/smb_build/input.pm index 6d5c4f4a1e..0b26aee65e 100644 --- a/source4/build/smb_build/input.pm +++ b/source4/build/smb_build/input.pm @@ -182,7 +182,7 @@ sub check_python($$$) $python->{SUBSYSTEM} = "LIBPYTHON"; - check_module($INPUT, $python, $default_ot); + check_module($INPUT, $python, ["SHARED_LIBRARY", "STATIC_LIBRARY"]); } sub check_binary($$) diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm index 0e7771c3f2..ce1e757c61 100644 --- a/source4/build/smb_build/makefile.pm +++ b/source4/build/smb_build/makefile.pm @@ -27,6 +27,7 @@ sub new($$$) $self->{torture_progs} = []; $self->{static_libs} = []; $self->{python_dsos} = []; + $self->{python_pys} = []; $self->{shared_libs} = []; $self->{installable_shared_libs} = []; $self->{headers} = []; @@ -345,7 +346,7 @@ sub SharedModule($$) push(@{$self->{all_objs}}, "\$($ctx->{TYPE}_$ctx->{NAME}_FULL_OBJ_LIST)"); - if (defined($ctx->{INIT_FUNCTION})) { + if (defined($ctx->{INIT_FUNCTION}) and $ctx->{TYPE} ne "PYTHON") { my $init_fn = $ctx->{INIT_FUNCTION_TYPE}; $init_fn =~ s/\(\*\)/init_module/; my $proto_fn = $ctx->{INIT_FUNCTION_TYPE}; @@ -539,7 +540,7 @@ sub PythonFiles($$) $self->output("$target: $source\n" . "\tmkdir -p \$(builddir)/bin/python\n" . "\tcp $source \$@\n\n"); - push (@{$self->{python_dsos}}, $target); + push (@{$self->{python_pys}}, $target); } } @@ -714,6 +715,7 @@ sub write($$) $self->output("STATIC_LIBS = " . array2oneperline($self->{static_libs}) . "\n"); $self->output("SHARED_LIBS = " . array2oneperline($self->{shared_libs}) . "\n"); $self->output("PYTHON_DSOS = " . array2oneperline($self->{python_dsos}) . "\n"); + $self->output("PYTHON_PYS = " . array2oneperline($self->{python_pys}) . "\n"); $self->output("INSTALLABLE_SHARED_LIBS = " . array2oneperline($self->{installable_shared_libs}) . "\n"); $self->output("PUBLIC_HEADERS = " . array2oneperline($self->{headers}) . "\n"); $self->output("PC_FILES = " . array2oneperline($self->{pc_files}) . "\n"); -- cgit From 6508824f394ceac5cd16b3e620bffd18fe577fc1 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 16 Jan 2008 17:50:29 +0100 Subject: python: Don't attempt to build shared and static versions of modules, because it's just not going to work with the current build system. (This used to be commit d9b4a5bb172be74db3c16b50426810f1bdedd00e) --- source4/build/smb_build/input.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/build') diff --git a/source4/build/smb_build/input.pm b/source4/build/smb_build/input.pm index 0b26aee65e..6d5c4f4a1e 100644 --- a/source4/build/smb_build/input.pm +++ b/source4/build/smb_build/input.pm @@ -182,7 +182,7 @@ sub check_python($$$) $python->{SUBSYSTEM} = "LIBPYTHON"; - check_module($INPUT, $python, ["SHARED_LIBRARY", "STATIC_LIBRARY"]); + check_module($INPUT, $python, $default_ot); } sub check_binary($$) -- cgit