summaryrefslogtreecommitdiff
path: root/source4/build
diff options
context:
space:
mode:
Diffstat (limited to 'source4/build')
-rw-r--r--source4/build/m4/env.m417
-rw-r--r--source4/build/m4/public.m411
-rw-r--r--source4/build/smb_build/config_mk.pm4
-rw-r--r--source4/build/smb_build/makefile.pm21
4 files changed, 35 insertions, 18 deletions
diff --git a/source4/build/m4/env.m4 b/source4/build/m4/env.m4
index 7556f16ce2..9510a8ee0d 100644
--- a/source4/build/m4/env.m4
+++ b/source4/build/m4/env.m4
@@ -19,9 +19,20 @@ AC_SUBST(datarootdir)
SMB_VERSION_STRING=`cat ${srcdir}/version.h | grep 'SAMBA_VERSION_OFFICIAL_STRING' | cut -d '"' -f2`
echo "SAMBA VERSION: ${SMB_VERSION_STRING}"
-SAMBA_VERSION_SVN_REVISION=`cat ${srcdir}/version.h | grep 'SAMBA_VERSION_SVN_REVISION' | cut -d ' ' -f3-`
-if test -n "${SAMBA_VERSION_SVN_REVISION}";then
- echo "BUILD REVISION: ${SAMBA_VERSION_SVN_REVISION}"
+SAMBA_VERSION_GIT_COMMIT_FULLREV=`cat ${srcdir}/version.h | grep 'SAMBA_VERSION_GIT_COMMIT_FULLREV' | cut -d ' ' -f3- | cut -d '"' -f2`
+if test -n "${SAMBA_VERSION_GIT_COMMIT_FULLREV}";then
+ echo "BUILD COMMIT REVISION: ${SAMBA_VERSION_GIT_COMMIT_FULLREV}"
+fi
+SAMBA_VERSION_GIT_COMMIT_DATE=`cat ${srcdir}/version.h | grep 'SAMBA_VERSION_GIT_COMMIT_DATE' | cut -d ' ' -f3-`
+if test -n "${SAMBA_VERSION_GIT_COMMIT_DATE}";then
+ echo "BUILD COMMIT DATE: ${SAMBA_VERSION_GIT_COMMIT_DATE}"
+fi
+SAMBA_VERSION_GIT_COMMIT_TIME=`cat ${srcdir}/version.h | grep 'SAMBA_VERSION_GIT_COMMIT_TIME' | cut -d ' ' -f3-`
+if test -n "${SAMBA_VERSION_GIT_COMMIT_TIME}";then
+ echo "BUILD COMMIT TIME: ${SAMBA_VERSION_GIT_COMMIT_TIME}"
+
+ # just to keep the build-farm gui happy for now...
+ echo "BUILD REVISION: ${SAMBA_VERSION_GIT_COMMIT_TIME}"
fi
m4_include(build/m4/check_path.m4)
diff --git a/source4/build/m4/public.m4 b/source4/build/m4/public.m4
index 9e82e6aaf1..6d693eaeee 100644
--- a/source4/build/m4/public.m4
+++ b/source4/build/m4/public.m4
@@ -8,7 +8,7 @@ dnl SMB_SUBSYSTEM(name,obj_files,required_subsystems)
dnl
dnl SMB_EXT_LIB_FROM_PKGCONFIG(name,pkg-config name,[ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND])
dnl
-dnl SMB_EXT_LIB(name,libs,cflags,cppflags,ldflags)
+dnl SMB_EXT_LIB(name,libs,cflags,cppflags,ldflags,pcname)
dnl
dnl SMB_ENABLE(name,default_build)
dnl
@@ -34,7 +34,7 @@ ENABLE = YES
"
])
-dnl SMB_LIBRARY(name,description,obj_files,required_subsystems,version,so_version,cflags,ldflags)
+dnl SMB_LIBRARY(name,description,obj_files,required_subsystems,version,so_version,cflags,ldflags,pcname)
AC_DEFUN([SMB_LIBRARY],
[
SMB_INFO_LIBRARIES="$SMB_INFO_LIBRARIES
@@ -48,6 +48,7 @@ VERSION = $5
SO_VERSION = $6
CFLAGS = $7
LDFLAGS = $8
+PC_NAME = $9
ENABLE = YES
# End Library $1
###################################
@@ -93,7 +94,8 @@ AC_DEFUN([SMB_EXT_LIB_FROM_PKGCONFIG],
[`$PKG_CONFIG --libs-only-l '$2'`],
[`$PKG_CONFIG --cflags-only-other '$2'`],
[`$PKG_CONFIG --cflags-only-I '$2'`],
- [`$PKG_CONFIG --libs-only-other '$2'` `$PKG_CONFIG --libs-only-L '$2'`])
+ [`$PKG_CONFIG --libs-only-other '$2'` `$PKG_CONFIG --libs-only-L '$2'`],
+ [ $2 ])
ac_cv_$1_found=yes
else
@@ -125,7 +127,7 @@ include $1
"
])
-dnl SMB_EXT_LIB(name,libs,cflags,cppflags,ldflags)
+dnl SMB_EXT_LIB(name,libs,cflags,cppflags,ldflags,pcname)
AC_DEFUN([SMB_EXT_LIB],
[
@@ -137,6 +139,7 @@ LIBS = $2
CFLAGS = $3
CPPFLAGS = $4
LDFLAGS = $5
+PC_NAME = $6
# End Ext Lib $1
###################################
"
diff --git a/source4/build/smb_build/config_mk.pm b/source4/build/smb_build/config_mk.pm
index 7ad6600a8c..d07660ba1d 100644
--- a/source4/build/smb_build/config_mk.pm
+++ b/source4/build/smb_build/config_mk.pm
@@ -18,6 +18,7 @@ my $section_types = {
"CFLAGS" => "list",
"CPPFLAGS" => "list",
"LDFLAGS" => "list",
+ "PC_NAME" => "string",
},
"PYTHON" => {
SWIG_FILE => "string",
@@ -26,6 +27,7 @@ my $section_types = {
"OBJ_FILES" => "list",
"ENABLE" => "bool",
"LDFLAGS" => "list",
+ "CFLAGS" => "list",
},
"SUBSYSTEM" => {
"OBJ_FILES" => "list",
@@ -87,6 +89,8 @@ my $section_types = {
"VERSION" => "string",
"SO_VERSION" => "string",
"LIBRARY_REALNAME" => "string",
+
+ "PC_NAME" => "string",
"INIT_FUNCTION_TYPE" => "string",
"INIT_FUNCTION_SENTINEL" => "string",
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");