summaryrefslogtreecommitdiff
path: root/source4/build/smb_build/makefile.pm
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-02-25 15:28:55 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-02-25 15:28:55 +0100
commit247220e946d579666bf8bb4103c4fa46dfb43cbf (patch)
treeac35af8eed9ad374110c264f6b905588e8b86fc3 /source4/build/smb_build/makefile.pm
parent46dd75b82ab1861a0bb22a79359064eab74de470 (diff)
downloadsamba-247220e946d579666bf8bb4103c4fa46dfb43cbf.tar.gz
samba-247220e946d579666bf8bb4103c4fa46dfb43cbf.tar.bz2
samba-247220e946d579666bf8bb4103c4fa46dfb43cbf.zip
Use addprefix where possible rather than perl expansion of files.
(This used to be commit b136ee5d344b1f1b2de697afd6815b8c3cb770ba)
Diffstat (limited to 'source4/build/smb_build/makefile.pm')
-rw-r--r--source4/build/smb_build/makefile.pm21
1 files changed, 7 insertions, 14 deletions
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index a6dfc2dee3..5de8519044 100644
--- a/source4/build/smb_build/makefile.pm
+++ b/source4/build/smb_build/makefile.pm
@@ -263,13 +263,7 @@ sub Header($$)
return if ($#{$ctx->{PUBLIC_HEADERS}} == -1);
- $self->output("PUBLIC_HEADERS +=");
-
- foreach (@{$ctx->{PUBLIC_HEADERS}}) {
- $self->output(" " . output::add_dir_str($ctx->{BASEDIR}, $_));
- }
-
- $self->output("\n");
+ $self->output("PUBLIC_HEADERS += \$(addprefix $ctx->{BASEDIR}/, " . join(" ", @{$ctx->{PUBLIC_HEADERS}}) . ")\n");
}
sub Binary($$)
@@ -317,8 +311,7 @@ sub PythonFiles($$)
foreach (@{$ctx->{PYTHON_FILES}}) {
my $target = "bin/python/".basename($_);
- my $source = output::add_dir_str($ctx->{BASEDIR}, $_);
- $self->output("$target: $source\n\n");
+ $self->output("$target: \$(addprefix $ctx->{BASEDIR}/, $_)\n\n");
$self->output("PYTHON_PYS += $target\n");
}
}
@@ -327,7 +320,7 @@ sub Manpage($$)
{
my ($self,$ctx) = @_;
- $self->output("MANPAGES += " . output::add_dir_str($ctx->{BASEDIR}, $ctx->{MANPAGE}) . "\n");
+ $self->output("MANPAGES += \$(addprefix $ctx->{BASEDIR}/, $ctx->{MANPAGE})\n");
}
sub ProtoHeader($$)
@@ -341,7 +334,7 @@ sub ProtoHeader($$)
my $pub = undef;
if (defined($ctx->{PRIVATE_PROTO_HEADER})) {
- $priv = output::add_dir_str($ctx->{BASEDIR}, $ctx->{PRIVATE_PROTO_HEADER});
+ $priv = "\$(addprefix $ctx->{BASEDIR}/, $ctx->{PRIVATE_PROTO_HEADER})";
$target .= $priv;
$comment .= $priv;
if (defined($ctx->{PUBLIC_PROTO_HEADER})) {
@@ -351,17 +344,17 @@ sub ProtoHeader($$)
$self->output("PROTO_HEADERS += $priv\n");
} else {
$ctx->{PRIVATE_PROTO_HEADER} = $ctx->{PUBLIC_PROTO_HEADER};
- $priv = output::add_dir_str($ctx->{BASEDIR}, $ctx->{PRIVATE_PROTO_HEADER});
+ $priv = "\$(addprefix $ctx->{BASEDIR}/, $ctx->{PRIVATE_PROTO_HEADER})";
}
if (defined($ctx->{PUBLIC_PROTO_HEADER})) {
- $pub = output::add_dir_str($ctx->{BASEDIR}, $ctx->{PUBLIC_PROTO_HEADER});
+ $pub = "\$(addprefix $ctx->{BASEDIR}/, $ctx->{PUBLIC_PROTO_HEADER})";
$comment .= $pub;
$target .= $pub;
$self->output("PROTO_HEADERS += $pub\n");
} else {
$ctx->{PUBLIC_PROTO_HEADER} = $ctx->{PRIVATE_PROTO_HEADER};
- $pub = output::add_dir_str($ctx->{BASEDIR}, $ctx->{PUBLIC_PROTO_HEADER});
+ $pub = "\$(addprefix $ctx->{BASEDIR}/, $ctx->{PUBLIC_PROTO_HEADER})";
}
$self->output("$pub: $ctx->{MK_FILE} \$($ctx->{NAME}_OBJ_LIST:.o=.c) \$(srcdir)/script/mkproto.pl\n");