summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsource4/build/smb_build/dot.pl2
-rw-r--r--source4/build/smb_build/input.pm26
-rw-r--r--source4/build/smb_build/main.pl8
-rw-r--r--source4/build/smb_build/makefile.pm7
-rw-r--r--source4/build/smb_build/output.pm12
5 files changed, 17 insertions, 38 deletions
diff --git a/source4/build/smb_build/dot.pl b/source4/build/smb_build/dot.pl
index 82f89c081a..e50ee50f95 100755
--- a/source4/build/smb_build/dot.pl
+++ b/source4/build/smb_build/dot.pl
@@ -44,7 +44,7 @@ my $name = "samba4";
my $only;
if (defined($subsys)) {
my $DEPEND = smb_build::input::check($INPUT, \%config::enabled,
- "STATIC_LIBRARY", "SHARED_LIBRARY", "SHARED_LIBRARY");
+ "MERGED_OBJ", "SHARED_LIBRARY", "SHARED_LIBRARY");
die("No such subsystem $subsys") unless (defined($DEPEND->{$subsys}));
diff --git a/source4/build/smb_build/input.pm b/source4/build/smb_build/input.pm
index f175b4c8c9..95902dfcbf 100644
--- a/source4/build/smb_build/input.pm
+++ b/source4/build/smb_build/input.pm
@@ -105,8 +105,9 @@ sub check_module($$$)
push (@{$mod->{PUBLIC_DEPENDENCIES}}, $mod->{SUBSYSTEM});
add_libreplace($mod);
}
- if (grep(/INTEGRATED/, @{$mod->{OUTPUT_TYPE}})) {
+ if (grep(/MERGED_OBJ/, @{$mod->{OUTPUT_TYPE}})) {
push (@{$INPUT->{$mod->{SUBSYSTEM}}{INIT_FUNCTIONS}}, $mod->{INIT_FUNCTION}) if defined($mod->{INIT_FUNCTION});
+ unshift (@{$INPUT->{$mod->{SUBSYSTEM}}{PRIVATE_DEPENDENCIES}}, $mod->{NAME});
}
}
@@ -181,27 +182,6 @@ sub check_binary($$)
add_libreplace($bin);
}
-sub import_integrated($$)
-{
- my ($lib, $depend) = @_;
-
- foreach my $mod (values %$depend) {
- next if(not defined($mod->{OUTPUT_TYPE}));
- next if(not grep(/INTEGRATED/, @{$mod->{OUTPUT_TYPE}}));
- next if(not defined($mod->{SUBSYSTEM}));
- next if($mod->{SUBSYSTEM} ne $lib->{NAME});
- next if($mod->{ENABLE} ne "YES");
-
- push (@{$lib->{FULL_OBJ_LIST}}, "\$($mod->{NAME}_OBJ_LIST)");
- push (@{$lib->{LINK_FLAGS}}, "\$($mod->{NAME}_LINK_FLAGS)");
- push (@{$lib->{CFLAGS}}, @{$mod->{CFLAGS}}) if defined($mod->{CFLAGS});
- push (@{$lib->{PUBLIC_DEPENDENCIES}}, @{$mod->{PUBLIC_DEPENDENCIES}}) if defined($mod->{PUBLIC_DEPENDENCIES});
- push (@{$lib->{PRIVATE_DEPENDENCIES}}, @{$mod->{PRIVATE_DEPENDENCIES}}) if defined($mod->{PRIVATE_DEPENDENCIES});
-
- $mod->{ENABLE} = "NO";
- }
-}
-
sub add_implicit($$)
{
my ($INPUT, $n) = @_;
@@ -230,7 +210,6 @@ sub calc_unique_deps($$$$$$$$)
if (defined ($dep->{OUTPUT_TYPE}) &&
($withlibs or
- (@{$dep->{OUTPUT_TYPE}}[0] eq "INTEGRATED") or
(@{$dep->{OUTPUT_TYPE}}[0] eq "MERGED_OBJ") or
(@{$dep->{OUTPUT_TYPE}}[0] eq "STATIC_LIBRARY"))) {
push (@$busy, $dep->{NAME});
@@ -302,7 +281,6 @@ sub check($$$$$)
if (defined($part->{INIT_FUNCTIONS})) {
push (@{$part->{LINK_FLAGS}}, "\$(DYNEXP)");
}
- import_integrated($part, $INPUT);
}
foreach my $part (values %$INPUT) {
diff --git a/source4/build/smb_build/main.pl b/source4/build/smb_build/main.pl
index 375962bde9..3ed0327d6d 100644
--- a/source4/build/smb_build/main.pl
+++ b/source4/build/smb_build/main.pl
@@ -19,8 +19,7 @@ use strict;
my $INPUT = {};
my $mkfile = smb_build::config_mk::run_config_mk($INPUT, $config::config{srcdir}, $config::config{builddir}, "main.mk");
-my $subsys_output_type;
-$subsys_output_type = ["MERGED_OBJ"];
+my $subsys_output_type = ["MERGED_OBJ"];
my $library_output_type;
if ($config::config{USESHARED} eq "true") {
@@ -35,7 +34,7 @@ my $module_output_type;
if ($config::config{USESHARED} eq "true") {
$module_output_type = ["SHARED_LIBRARY"];
} else {
- $module_output_type = ["INTEGRATED"];
+ $module_output_type = ["MERGED_OBJ"];
}
my $DEPEND = smb_build::input::check($INPUT, \%config::enabled,
@@ -43,9 +42,6 @@ my $DEPEND = smb_build::input::check($INPUT, \%config::enabled,
$library_output_type,
$module_output_type);
my $OUTPUT = output::create_output($DEPEND, \%config::config);
-$config::config{SUBSYSTEM_OUTPUT_TYPE} = $subsys_output_type;
-$config::config{LIBRARY_OUTPUT_TYPE} = $library_output_type;
-$config::config{MODULE_OUTPUT_TYPE} = $module_output_type;
my $mkenv = new smb_build::makefile(\%config::config, $mkfile);
my $shared_libs_used = 0;
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index 52149083b1..d11e761ce1 100644
--- a/source4/build/smb_build/makefile.pm
+++ b/source4/build/smb_build/makefile.pm
@@ -255,14 +255,15 @@ sub MergedObj($$)
{
my ($self, $ctx) = @_;
+ return unless defined($ctx->{OUTPUT});
+
$self->output("$ctx->{NAME}_OUTPUT = $ctx->{OUTPUT}\n");
- $self->_prepare_list($ctx, "FULL_OBJ_LIST");
$self->output(<< "__EOD__"
#
-$ctx->{RESULT_MERGED_OBJ}: \$($ctx->{NAME}_FULL_OBJ_LIST)
+$ctx->{RESULT_MERGED_OBJ}: \$($ctx->{NAME}_OBJ_LIST)
\@echo Partially linking \$@
\@mkdir -p bin/mergedobj
- \$(PARTLINK) -o \$@ \$($ctx->{NAME}_FULL_OBJ_LIST)
+ \$(PARTLINK) -o \$@ \$($ctx->{NAME}_OBJ_LIST)
__EOD__
);
diff --git a/source4/build/smb_build/output.pm b/source4/build/smb_build/output.pm
index 33493eca2c..3d5f4466ca 100644
--- a/source4/build/smb_build/output.pm
+++ b/source4/build/smb_build/output.pm
@@ -136,7 +136,7 @@ sub generate_binary($)
my $bin = shift;
$bin->{DEPEND_LIST} = [];
- push(@{$bin->{LINK_FLAGS}}, "\$($bin->{NAME}\_OBJ_LIST)");
+ push(@{$bin->{LINK_FLAGS}}, "\$($bin->{NAME}\_FULL_OBJ_LIST)");
$bin->{DEBUGDIR} = "bin";
$bin->{RESULT_BINARY} = $bin->{OUTPUT_BINARY} = "$bin->{DEBUGDIR}/$bin->{NAME}";
@@ -198,10 +198,14 @@ sub create_output($$)
my $elem = $depend->{$_};
next if $elem == $part;
- push(@{$part->{LINK_FLAGS}}, "\$($elem->{NAME}_OUTPUT)") if defined($elem->{OUTPUT});
push(@{$part->{LINK_FLAGS}}, @{$elem->{LIBS}}) if defined($elem->{LIBS});
- push(@{$part->{LINK_FLAGS}},@{$elem->{LDFLAGS}}) if defined($elem->{LDFLAGS});
- push(@{$part->{DEPEND_LIST}}, $elem->{TARGET}) if defined($elem->{TARGET});
+ push(@{$part->{LINK_FLAGS}}, @{$elem->{LDFLAGS}}) if defined($elem->{LDFLAGS});
+ if (defined($elem->{OUTPUT_TYPE}) and @{$elem->{OUTPUT_TYPE}}[0] eq "MERGED_OBJ") {
+ push (@{$part->{FULL_OBJ_LIST}}, $elem->{TARGET});
+ } else {
+ push(@{$part->{LINK_FLAGS}}, "\$($elem->{NAME}_OUTPUT)") if defined($elem->{OUTPUT});
+ push(@{$part->{DEPEND_LIST}}, $elem->{TARGET}) if defined($elem->{TARGET});
+ }
}
}