summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/build/smb_build/main.pl3
-rw-r--r--source4/build/smb_build/makefile.pm38
2 files changed, 7 insertions, 34 deletions
diff --git a/source4/build/smb_build/main.pl b/source4/build/smb_build/main.pl
index 6c205a69f0..14f334a6ea 100644
--- a/source4/build/smb_build/main.pl
+++ b/source4/build/smb_build/main.pl
@@ -67,8 +67,7 @@ foreach my $key (values %$OUTPUT) {
$key->{TYPE} eq "PYTHON") and
grep(/SHARED_LIBRARY/, @{$key->{OUTPUT_TYPE}});
$mkenv->PythonFiles($key) if defined($key->{PYTHON_FILES});
- $mkenv->ProtoHeader($key) if defined($key->{PRIVATE_PROTO_HEADER}) or
- defined($key->{PUBLIC_PROTO_HEADER});
+ $mkenv->ProtoHeader($key) if defined($key->{PRIVATE_PROTO_HEADER});
}
foreach my $key (values %$OUTPUT) {
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index 5fe0e68e95..9e728fa162 100644
--- a/source4/build/smb_build/makefile.pm
+++ b/source4/build/smb_build/makefile.pm
@@ -350,39 +350,13 @@ sub ProtoHeader($$)
{
my ($self,$ctx) = @_;
- my $target = "";
- my $comment = "Creating ";
-
- my $priv = undef;
- my $pub = undef;
-
- if (defined($ctx->{PRIVATE_PROTO_HEADER})) {
- $priv = output::add_dir_str($ctx->{BASEDIR}, $ctx->{PRIVATE_PROTO_HEADER});
- $target .= $priv;
- $comment .= $priv;
- if (defined($ctx->{PUBLIC_PROTO_HEADER})) {
- $comment .= " and ";
- $target.= " ";
- }
- $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});
- }
-
- if (defined($ctx->{PUBLIC_PROTO_HEADER})) {
- $pub = output::add_dir_str($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});
- }
+ my $priv = output::add_dir_str($ctx->{BASEDIR}, $ctx->{PRIVATE_PROTO_HEADER});
+ $self->output("PROTO_HEADERS += $priv\n");
- $self->output("$pub: $ctx->{MK_FILE} \$($ctx->{NAME}_OBJ_LIST:.o=.c) \$(srcdir)/script/mkproto.pl\n");
- $self->output("\t\@echo \"$comment\"\n");
- $self->output("\t\@\$(PERL) \$(srcdir)/script/mkproto.pl --srcdir=\$(srcdir) --builddir=\$(builddir) --private=$priv --public=$pub \$($ctx->{NAME}_OBJ_LIST)\n\n");
+ $self->output("$priv: $ctx->{MK_FILE} \$($ctx->{NAME}_OBJ_LIST:.o=.c) \$(srcdir)/script/mkproto.pl\n");
+ $self->output("\t\@echo \"Creating \$@\"\n");
+ $self->output("\t\@mkdir -p \$(\@D)\n");
+ $self->output("\t\@\$(PERL) \$(srcdir)/script/mkproto.pl --srcdir=\$(srcdir) --builddir=\$(builddir) --all=\$@ \$($ctx->{NAME}_OBJ_LIST)\n\n");
}
sub write($$)