summaryrefslogtreecommitdiff
path: root/source4/build/smb_build/makefile.pm
diff options
context:
space:
mode:
Diffstat (limited to 'source4/build/smb_build/makefile.pm')
-rw-r--r--source4/build/smb_build/makefile.pm21
1 files changed, 10 insertions, 11 deletions
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index 0e7771c3f2..7e715b47eb 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);
}
}
@@ -569,24 +570,21 @@ sub PkgConfig($$$)
my $pubs;
my $privs;
my $privlibs;
+ my $publibs = "";
if (defined($ctx->{PUBLIC_DEPENDENCIES})) {
foreach (@{$ctx->{PUBLIC_DEPENDENCIES}}) {
next if ($other->{$_}->{ENABLE} eq "NO");
- if ($other->{$_}->{TYPE} eq "EXT_LIB") {
+ if (defined($other->{$_}->{PC_NAME})) {
+ $pubs .= "$other->{$_}->{PC_NAME} ";
+ } elsif ($other->{$_}->{TYPE} eq "EXT_LIB") {
my $e = $other->{$_};
-
my $ldflags = join(" ", @{$e->{LDFLAGS}});
$ldflags .= " " unless $ldflags eq "";
my $libs = join(" ", @{$e->{LIBS}});
$libs .= " " unless $libs eq "";
- $pubs .= $ldflags.$libs;
- } elsif ($other->{$_}->{TYPE} eq "LIBRARY") {
- s/^LIB//g;
- $_ = lc($_);
-
- $pubs .= "$_ ";
+ $publibs .= $ldflags.$libs;
} else {
s/^LIB//g;
$_ = lc($_);
@@ -625,7 +623,7 @@ sub PkgConfig($$$)
smb_build::env::PkgConfig($self,
$path,
$link_name,
- "-L\${libdir} -l$link_name",
+ "-L\${libdir} -l$link_name $publibs",
$privlibs,
"",
"$ctx->{VERSION}",
@@ -714,6 +712,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");