summaryrefslogtreecommitdiff
path: root/source4/build
diff options
context:
space:
mode:
Diffstat (limited to 'source4/build')
-rw-r--r--source4/build/m4/public.m417
-rw-r--r--source4/build/smb_build/config_mk.pm3
-rw-r--r--source4/build/smb_build/env.pm36
-rw-r--r--source4/build/smb_build/main.pl5
-rw-r--r--source4/build/smb_build/makefile.pm109
5 files changed, 12 insertions, 158 deletions
diff --git a/source4/build/m4/public.m4 b/source4/build/m4/public.m4
index 6d693eaeee..81da34db86 100644
--- a/source4/build/m4/public.m4
+++ b/source4/build/m4/public.m4
@@ -34,21 +34,20 @@ ENABLE = YES
"
])
-dnl SMB_LIBRARY(name,description,obj_files,required_subsystems,version,so_version,cflags,ldflags,pcname)
+dnl SMB_LIBRARY(name,obj_files,required_subsystems,version,so_version,cflags,ldflags,pcname)
AC_DEFUN([SMB_LIBRARY],
[
SMB_INFO_LIBRARIES="$SMB_INFO_LIBRARIES
###################################
# Start Library $1
@<:@LIBRARY::$1@:>@
-DESCRIPTION = $2
-OBJ_FILES = $3
-PRIVATE_DEPENDENCIES = $4
-VERSION = $5
-SO_VERSION = $6
-CFLAGS = $7
-LDFLAGS = $8
-PC_NAME = $9
+OBJ_FILES = $2
+PRIVATE_DEPENDENCIES = $3
+VERSION = $4
+SO_VERSION = $5
+CFLAGS = $6
+LDFLAGS = $7
+PC_NAME = $8
ENABLE = YES
# End Library $1
###################################
diff --git a/source4/build/smb_build/config_mk.pm b/source4/build/smb_build/config_mk.pm
index d07660ba1d..aa075490bc 100644
--- a/source4/build/smb_build/config_mk.pm
+++ b/source4/build/smb_build/config_mk.pm
@@ -91,6 +91,7 @@ my $section_types = {
"LIBRARY_REALNAME" => "string",
"PC_NAME" => "string",
+ "PC_FILE" => "string",
"INIT_FUNCTION_TYPE" => "string",
"INIT_FUNCTION_SENTINEL" => "string",
@@ -98,8 +99,6 @@ my $section_types = {
"OBJ_FILES" => "list",
- "DESCRIPTION" => "string",
-
"PRIVATE_DEPENDENCIES" => "list",
"PUBLIC_DEPENDENCIES" => "list",
diff --git a/source4/build/smb_build/env.pm b/source4/build/smb_build/env.pm
index 8fbbe9cfd5..bbb72b520f 100644
--- a/source4/build/smb_build/env.pm
+++ b/source4/build/smb_build/env.pm
@@ -54,42 +54,6 @@ sub _set_config($$)
$self->{automatic_deps} = ($self->{config}->{automatic_dependencies} eq "yes");
}
-sub PkgConfig($$$$$$$$$$$$)
-{
- my ($self,$path,$name,$libs,$privlibs,$cflags,$version,$desc,$hasmodules,$pubdep,$privdep,$dirs) = @_;
-
- print __FILE__.": creating $path\n";
-
- if ($self->{config}->{libreplace_cv_immediate_structures} eq "yes") {
- $cflags .= " -DHAVE_IMMEDIATE_STRUCTURES=1";
- }
-
- mkpath(dirname($path),0,0755);
- open(OUT, ">$path") or die("Can't open $path: $!");
-
- foreach (@$dirs) {
- print OUT "$_\n";
- }
- if ($hasmodules) {
- print OUT "modulesdir=$self->{config}->{modulesdir}/$name\n" ;
- }
-
- print OUT "\n";
-
- print OUT "Name: $name\n";
- if (defined($desc)) {
- print OUT "Description: $desc\n";
- }
- print OUT "Requires: $pubdep\n" if defined($pubdep);
- print OUT "Requires.private: $privdep\n" if defined($privdep);
- print OUT "Version: $version\n";
- print OUT "Libs: $libs\n";
- print OUT "Libs.private: $privlibs\n" if (defined($privlibs));
- print OUT "Cflags: -I\${includedir} $cflags\n";
-
- close(OUT);
-}
-
sub Import($$)
{
my ($self,$items) = @_;
diff --git a/source4/build/smb_build/main.pl b/source4/build/smb_build/main.pl
index e084d48a77..fb769103d0 100644
--- a/source4/build/smb_build/main.pl
+++ b/source4/build/smb_build/main.pl
@@ -60,8 +60,9 @@ foreach my $key (values %$OUTPUT) {
next unless defined $key->{OUTPUT_TYPE};
$mkenv->StaticLibrary($key) if grep(/STATIC_LIBRARY/, @{$key->{OUTPUT_TYPE}});
- $mkenv->PkgConfig($key, $OUTPUT) if $key->{TYPE} eq "LIBRARY"
- and defined($key->{VERSION});
+ if (defined($key->{PC_FILE})) {
+ push(@{$mkenv->{pc_files}}, "$key->{BASEDIR}/$key->{PC_FILE}");
+ }
$mkenv->SharedLibrary($key) if ($key->{TYPE} eq "LIBRARY") and
grep(/SHARED_LIBRARY/, @{$key->{OUTPUT_TYPE}});
if ($key->{TYPE} eq "LIBRARY" and
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index 7e715b47eb..452e4254a3 100644
--- a/source4/build/smb_build/makefile.pm
+++ b/source4/build/smb_build/makefile.pm
@@ -552,115 +552,6 @@ sub Manpage($$)
push (@{$self->{manpages}}, $path);
}
-sub PkgConfig($$$)
-{
- my ($self,$ctx,$other) = @_;
-
- my $link_name = $ctx->{NAME};
-
- $link_name =~ s/^LIB//g;
- $link_name = lc($link_name);
-
- return if (not defined($ctx->{DESCRIPTION}));
-
- my $path = output::add_dir_str($ctx->{BASEDIR}, "$link_name.pc");
-
- push (@{$self->{pc_files}}, $path);
-
- my $pubs;
- my $privs;
- my $privlibs;
- my $publibs = "";
-
- if (defined($ctx->{PUBLIC_DEPENDENCIES})) {
- foreach (@{$ctx->{PUBLIC_DEPENDENCIES}}) {
- next if ($other->{$_}->{ENABLE} eq "NO");
- 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 "";
-
- $publibs .= $ldflags.$libs;
- } else {
- s/^LIB//g;
- $_ = lc($_);
-
- $privlibs .= "-l$_ ";
- }
- }
- }
-
- if (defined($ctx->{PRIVATE_DEPENDENCIES})) {
- foreach (@{$ctx->{PRIVATE_DEPENDENCIES}}) {
- next if ($other->{$_}->{ENABLE} eq "NO");
- if ($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 "";
-
- $privlibs .= $ldflags.$libs;
- } elsif ($other->{$_}->{TYPE} eq "LIBRARY") {
- s/^LIB//g;
- $_ = lc($_);
-
- $privs .= "$_ ";
- } else {
- s/^LIB//g;
- $_ = lc($_);
-
- $privlibs .= "-l$_ ";
- }
- }
- }
-
- smb_build::env::PkgConfig($self,
- $path,
- $link_name,
- "-L\${libdir} -l$link_name $publibs",
- $privlibs,
- "",
- "$ctx->{VERSION}",
- $ctx->{DESCRIPTION},
- defined($ctx->{INIT_FUNCTIONS}),
- $pubs,
- "",
- [
- "prefix=$self->{config}->{prefix}",
- "exec_prefix=$self->{config}->{exec_prefix}",
- "libdir=$self->{config}->{libdir}",
- "includedir=$self->{config}->{includedir}"
- ]
- );
- my $abs_srcdir = abs_path($self->{config}->{srcdir});
- smb_build::env::PkgConfig($self,
- "bin/pkgconfig/$link_name-uninstalled.pc",
- $link_name,
- "-Lbin/shared -Lbin/static -l$link_name",
- $privlibs,
- join(' ',
- "-I$abs_srcdir",
- "-I$abs_srcdir/include",
- "-I$abs_srcdir/lib",
- "-I$abs_srcdir/lib/replace"),
- "$ctx->{VERSION}",
- $ctx->{DESCRIPTION},
- defined($ctx->{INIT_FUNCTIONS}),
- $pubs,
- $privs,
- [
- "prefix=bin/",
- "includedir=$ctx->{BASEDIR}"
- ]
- );
-}
-
sub ProtoHeader($$)
{
my ($self,$ctx) = @_;