summaryrefslogtreecommitdiff
path: root/source4/build
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-02-25 21:34:13 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-02-25 21:34:13 +0100
commit16502898b6dbc8e34b1eb6aaba4dfbaa5c25d56e (patch)
tree3175369e512a6831adaec8c4cae1c41c5e05afa6 /source4/build
parentb5bd6636907c76f6bb562b62abca78a7aeed83d8 (diff)
downloadsamba-16502898b6dbc8e34b1eb6aaba4dfbaa5c25d56e.tar.gz
samba-16502898b6dbc8e34b1eb6aaba4dfbaa5c25d56e.tar.bz2
samba-16502898b6dbc8e34b1eb6aaba4dfbaa5c25d56e.zip
Use make's $(call) feature.
(This used to be commit 4046ec8be08bb940ec60390c4f2e1719e14b858d)
Diffstat (limited to 'source4/build')
-rw-r--r--source4/build/smb_build/makefile.pm10
-rw-r--r--source4/build/smb_build/output.pm6
2 files changed, 6 insertions, 10 deletions
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index 8a3e99c629..e4ce48ee68 100644
--- a/source4/build/smb_build/makefile.pm
+++ b/source4/build/smb_build/makefile.pm
@@ -229,15 +229,7 @@ sub MergedObj($$)
return unless defined($ctx->{OUTPUT});
$self->output("$ctx->{NAME}_OUTPUT = $ctx->{OUTPUT}\n");
- $self->output(<< "__EOD__"
-#
-$ctx->{RESULT_MERGED_OBJ}: \$($ctx->{NAME}_OBJ_LIST)
- \@echo Partially linking \$@
- \@mkdir -p \$(\@D)
- \$(PARTLINK) -o \$@ \$^
-
-__EOD__
-);
+ $self->output("\$(call partial_link_template, $ctx->{RESULT_MERGED_OBJ}, \$($ctx->{NAME}_OBJ_LIST))\n");
}
sub StaticLibraryPrimitives($$)
diff --git a/source4/build/smb_build/output.pm b/source4/build/smb_build/output.pm
index 6e8803fa23..8b356f9df5 100644
--- a/source4/build/smb_build/output.pm
+++ b/source4/build/smb_build/output.pm
@@ -137,7 +137,11 @@ sub create_output($$)
# Combine object lists
if (defined($part->{OBJ_FILES})) {
- my $list = "\$(abspath \$(addprefix $part->{BASEDIR}/, " . join(" ", @{$part->{OBJ_FILES}}) . "))";
+ my $list = "\$(addprefix $part->{BASEDIR}/, " . join(" ", @{$part->{OBJ_FILES}}) . ")";
+
+ if ($list =~ /\.\.\//) {
+ $list = "\$(abspath $list)";
+ }
push(@{$part->{OBJ_LIST}}, $list);
}