diff options
Diffstat (limited to 'source4/build')
-rw-r--r-- | source4/build/smb_build/makefile.pm | 19 | ||||
-rw-r--r-- | source4/build/smb_build/output.pm | 9 |
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); } |