summaryrefslogtreecommitdiff
path: root/source4/build
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-02-26 00:40:40 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-02-26 00:40:40 +0100
commit6fece9358b35c117203a015389f7f086b372b0af (patch)
tree0ebba2124522dd9cf9c55e347625eb249aeec46d /source4/build
parent5b0670ea534a53ce9192f72cfc21018cfaff2aac (diff)
downloadsamba-6fece9358b35c117203a015389f7f086b372b0af.tar.gz
samba-6fece9358b35c117203a015389f7f086b372b0af.tar.bz2
samba-6fece9358b35c117203a015389f7f086b372b0af.zip
Fix the build.
(This used to be commit 59bf804ef64d87fa76fe41063f91c35cf805a779)
Diffstat (limited to 'source4/build')
-rw-r--r--source4/build/smb_build/makefile.pm19
-rw-r--r--source4/build/smb_build/output.pm9
2 files changed, 13 insertions, 15 deletions
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index 676a0d9e2d..c2a0c2287e 100644
--- a/source4/build/smb_build/makefile.pm
+++ b/source4/build/smb_build/makefile.pm
@@ -312,9 +312,7 @@ sub ProtoHeader($$)
{
my ($self,$ctx) = @_;
- my $target = "";
-
- $target = "\$(addprefix $ctx->{BASEDIR}/, $ctx->{PRIVATE_PROTO_HEADER})";
+ my $target = "\$(addprefix $ctx->{BASEDIR}/, $ctx->{PRIVATE_PROTO_HEADER})";
$self->output("PROTO_HEADERS += $target\n");
$self->output("\$(call proto_header_template, $target, \$($ctx->{NAME}_OBJ_LIST:.o=.c))\n");
@@ -367,21 +365,20 @@ sub CFlags($$)
my @cflags = ();
foreach my $flag (@sorted_cflags) {
if($src_ne_build) {
- if($flag =~ m#^-I([^/].*$)#) {
- my $dir = $1;
- $dir =~ s#^\$\((?:src|build)dir\)/?##;
+ if($flag =~ m#^-I([^/].*$)#) {
+ my $dir = $1;
+ $dir =~ s#^\$\((?:src|build)dir\)/?##;
push(@cflags, "-I$builddir/$dir", "-I$srcdir/$dir");
- next;
- }
+ next;
+ }
}
push(@cflags, $flag);
}
my $cflags = join(' ', @cflags);
- foreach (@{$key->{OBJ_LIST}}) {
- $self->output("\$($key->{NAME}_OBJ_FILES) \$($key->{NAME}_OBJ_FILES:.o=.d): CFLAGS+= $cflags\n");
- }
+ my $ext = "o";
+ $self->output("\$($key->{NAME}_OBJ_LIST) \$(patsubst %.ho,%.d,\$($key->{NAME}_OBJ_LIST:.o=.d)): CFLAGS+=$cflags\n");
}
1;
diff --git a/source4/build/smb_build/output.pm b/source4/build/smb_build/output.pm
index 8b356f9df5..eec438b108 100644
--- a/source4/build/smb_build/output.pm
+++ b/source4/build/smb_build/output.pm
@@ -137,11 +137,12 @@ sub create_output($$)
# Combine object lists
if (defined($part->{OBJ_FILES})) {
- my $list = "\$(addprefix $part->{BASEDIR}/, " . join(" ", @{$part->{OBJ_FILES}}) . ")";
+ my $list;
- if ($list =~ /\.\.\//) {
- $list = "\$(abspath $list)";
- }
+ $list = join(" ", @{$part->{OBJ_FILES}});
+ unless ($list =~ /^\.\//) {
+ $list = "\$(addprefix $part->{BASEDIR}/, $list)"
+ }
push(@{$part->{OBJ_LIST}}, $list);
}