summaryrefslogtreecommitdiff
path: root/source4/build/smb_build
diff options
context:
space:
mode:
Diffstat (limited to 'source4/build/smb_build')
-rw-r--r--source4/build/smb_build/input.pm16
-rw-r--r--source4/build/smb_build/main.pl12
-rw-r--r--source4/build/smb_build/makefile.pm8
3 files changed, 19 insertions, 17 deletions
diff --git a/source4/build/smb_build/input.pm b/source4/build/smb_build/input.pm
index eb20a686c1..3ca2f22f0c 100644
--- a/source4/build/smb_build/input.pm
+++ b/source4/build/smb_build/input.pm
@@ -84,13 +84,19 @@ sub check_module($$$)
return if ($mod->{ENABLE} ne "YES");
+
if (exists($INPUT->{$mod->{SUBSYSTEM}}{INIT_FUNCTION_TYPE})) {
$mod->{INIT_FUNCTION_TYPE} = $INPUT->{$mod->{SUBSYSTEM}}{INIT_FUNCTION_TYPE};
} else {
$mod->{INIT_FUNCTION_TYPE} = "NTSTATUS (*) (void)";
}
+ unless (defined($mod->{INIT_FUNCTION_SENTINEL})) { $mod->{INIT_FUNCTION_SENTINEL} = "NULL"; }
+
if (not defined($mod->{OUTPUT_TYPE})) {
+ if (not defined($INPUT->{$mod->{SUBSYSTEM}}->{TYPE})) {
+ die("Invalid type for subsystem $mod->{SUBSYSTEM}");
+ }
if ($INPUT->{$mod->{SUBSYSTEM}}->{TYPE} eq "EXT_LIB") {
$mod->{OUTPUT_TYPE} = undef;
} else {
@@ -119,16 +125,6 @@ sub check_library($$$)
unless (defined($lib->{OUTPUT_TYPE})) { $lib->{OUTPUT_TYPE} = $default_ot; }
- if (defined($lib->{VERSION}) and not defined($lib->{SO_VERSION})) {
- print "$lib->{NAME}: Please specify SO_VERSION when specifying VERSION\n";
- return;
- }
-
- if (defined($lib->{SO_VERSION}) and not defined($lib->{VERSION})) {
- print "$lib->{NAME}: Please specify VERSION when specifying SO_VERSION\n";
- return;
- }
-
unless (defined($lib->{INIT_FUNCTION_TYPE})) { $lib->{INIT_FUNCTION_TYPE} = "NTSTATUS (*) (void)"; }
unless (defined($lib->{INIT_FUNCTION_SENTINEL})) { $lib->{INIT_FUNCTION_SENTINEL} = "NULL"; }
unless (defined($lib->{INSTALLDIR})) { $lib->{INSTALLDIR} = "LIBDIR"; }
diff --git a/source4/build/smb_build/main.pl b/source4/build/smb_build/main.pl
index a6abee6106..ccaac0b6fc 100644
--- a/source4/build/smb_build/main.pl
+++ b/source4/build/smb_build/main.pl
@@ -43,8 +43,7 @@ my $mkenv = new smb_build::makefile(\%config::config, $mkfile);
my $shared_libs_used = 0;
foreach my $key (values %$OUTPUT) {
- $mkenv->_prepare_list($key, "OBJ_LIST");
- push(@{$mkenv->{all_objs}}, "\$($key->{NAME}_OBJ_LIST)");
+ push(@{$mkenv->{all_objs}}, "\$($key->{NAME}_OBJ_FILES)");
}
foreach my $key (values %$OUTPUT) {
@@ -52,7 +51,7 @@ foreach my $key (values %$OUTPUT) {
$mkenv->StaticLibraryPrimitives($key) if grep(/STATIC_LIBRARY/, @{$key->{OUTPUT_TYPE}});
$mkenv->MergedObj($key) if grep(/MERGED_OBJ/, @{$key->{OUTPUT_TYPE}});
- $mkenv->SharedLibraryPrimitives($key) if ($key->{TYPE} eq "LIBRARY") and
+ $kenv->SharedLibraryPrimitives($key) if ($key->{TYPE} eq "LIBRARY") and
grep(/SHARED_LIBRARY/, @{$key->{OUTPUT_TYPE}});
if ($key->{TYPE} eq "LIBRARY" and
${$key->{OUTPUT_TYPE}}[0] eq "SHARED_LIBRARY") {
@@ -68,21 +67,20 @@ foreach my $key (values %$OUTPUT) {
foreach my $key (values %$OUTPUT) {
next unless defined $key->{OUTPUT_TYPE};
- $mkenv->Integrated($key) if grep(/INTEGRATED/, @{$key->{OUTPUT_TYPE}});
+ $mkenv->Integrated($key) if grep(/INTEGRATED/, @{$key->{OUTPUT_TYPE}});
}
foreach my $key (values %$OUTPUT) {
next unless defined $key->{OUTPUT_TYPE};
-
$mkenv->StaticLibrary($key) if grep(/STATIC_LIBRARY/, @{$key->{OUTPUT_TYPE}});
+
$mkenv->SharedLibrary($key) if ($key->{TYPE} eq "LIBRARY") and
grep(/SHARED_LIBRARY/, @{$key->{OUTPUT_TYPE}});
$mkenv->SharedModule($key) if ($key->{TYPE} eq "MODULE" and
grep(/SHARED_LIBRARY/, @{$key->{OUTPUT_TYPE}}));
$mkenv->PythonModule($key) if ($key->{TYPE} eq "PYTHON");
$mkenv->Binary($key) if grep(/BINARY/, @{$key->{OUTPUT_TYPE}});
- $mkenv->ProtoHeader($key) if defined($key->{PRIVATE_PROTO_HEADER}) or
- defined($key->{PUBLIC_PROTO_HEADER});
+ $mkenv->ProtoHeader($key) if defined($key->{PRIVATE_PROTO_HEADER});
$mkenv->InitFunctions($key) if defined($key->{INIT_FUNCTIONS});
}
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index 1f66fabf72..c56fdbf8cc 100644
--- a/source4/build/smb_build/makefile.pm
+++ b/source4/build/smb_build/makefile.pm
@@ -139,6 +139,14 @@ sub SharedModule($$)
}
}
+sub StaticLibraryPrimitives($$)
+{
+ my ($self,$ctx) = @_;
+
+ $self->output("$ctx->{NAME}_OUTPUT = $ctx->{OUTPUT}\n");
+ $self->_prepare_list($ctx, "FULL_OBJ_LIST");
+}
+
sub SharedLibraryPrimitives($$)
{
my ($self,$ctx) = @_;