summaryrefslogtreecommitdiff
path: root/source4/build/smb_build/output.pm
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-08-02 19:38:30 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:30:59 -0500
commit23926e75c65ff4ca5226be0193c14073552a4344 (patch)
treeab32281848e8b42227a42e252c84565476bd49ef /source4/build/smb_build/output.pm
parent4216c18f34ad29d015e853f4d1cb1900f754ad44 (diff)
downloadsamba-23926e75c65ff4ca5226be0193c14073552a4344.tar.gz
samba-23926e75c65ff4ca5226be0193c14073552a4344.tar.bz2
samba-23926e75c65ff4ca5226be0193c14073552a4344.zip
r8936: Use incremental linking. This appeared to be supported on
all systems on the buildfarm when I tested it using smb_build. It's just a one line change to go back. If this works correctly, we can simplify the build system quite a bit. (This used to be commit 6b671fb34a35def9a8d2fdaa8d9a04ff26c9e929)
Diffstat (limited to 'source4/build/smb_build/output.pm')
-rw-r--r--source4/build/smb_build/output.pm23
1 files changed, 19 insertions, 4 deletions
diff --git a/source4/build/smb_build/output.pm b/source4/build/smb_build/output.pm
index b863d7e8dc..0b7be94dfc 100644
--- a/source4/build/smb_build/output.pm
+++ b/source4/build/smb_build/output.pm
@@ -10,6 +10,13 @@
package output;
use strict;
+sub generate_mergedobj($)
+{
+ my $subsys = shift;
+
+ $subsys->{OUTPUT} = $subsys->{TARGET} = "bin/$subsys->{TYPE}_$subsys->{NAME}.o";
+}
+
sub generate_objlist($)
{
my $subsys = shift;
@@ -85,15 +92,23 @@ sub create_output($)
next if $part->{NAME} eq "ALL_OBJS";
next if not defined($part->{OUTPUT_TYPE});
+ # Combine object lists
+ push(@{$part->{OBJ_LIST}}, @{$part->{INIT_OBJ_FILES}}) if defined($part->{INIT_OBJ_FILES});
+ push(@{$part->{OBJ_LIST}}, @{$part->{ADD_OBJ_FILES}}) if defined($part->{ADD_OBJ_FILES});
+ push(@{$part->{OBJ_LIST}}, @{$part->{OBJ_FILES}}) if defined($part->{OBJ_FILES});
+
+ if ((not defined($part->{OBJ_LIST}) or
+ scalar(@{$part->{OBJ_LIST}}) == 0) and
+ $part->{OUTPUT_TYPE} eq "MERGEDOBJ") {
+ $part->{OUTPUT_TYPE} = "OBJLIST";
+ }
+
generate_binary($part) if $part->{OUTPUT_TYPE} eq "BINARY";
+ generate_mergedobj($part) if $part->{OUTPUT_TYPE} eq "MERGEDOBJ";
generate_objlist($part) if $part->{OUTPUT_TYPE} eq "OBJLIST";
generate_shared_library($part) if $part->{OUTPUT_TYPE} eq "SHARED_LIBRARY";
generate_static_library($part) if $part->{OUTPUT_TYPE} eq "STATIC_LIBRARY";
- # Combine object lists
- push(@{$part->{OBJ_LIST}}, @{$part->{INIT_OBJ_FILES}}) if defined($part->{INIT_OBJ_FILES});
- push(@{$part->{OBJ_LIST}}, @{$part->{ADD_OBJ_FILES}}) if defined($part->{ADD_OBJ_FILES});
- push(@{$part->{OBJ_LIST}}, @{$part->{OBJ_FILES}}) if defined($part->{OBJ_FILES});
push(@{$depend->{ALL_OBJS}->{OBJ_LIST}}, @{$part->{OBJ_LIST}}) if (defined(@{$part->{OBJ_LIST}}));