From 3709d6b8e33496fee568035b09f49c8ef907a3ef Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 16 Mar 2006 16:47:18 +0000 Subject: r14483: Allow subsystems with just a public prototype header, no private ones (This used to be commit bb6541126c94b33e4a24d9f036655b55b704923b) --- source4/build/smb_build/main.pl | 3 ++- source4/build/smb_build/makefile.pm | 17 +++++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/source4/build/smb_build/main.pl b/source4/build/smb_build/main.pl index 733b447e40..3443dbc46b 100644 --- a/source4/build/smb_build/main.pl +++ b/source4/build/smb_build/main.pl @@ -72,7 +72,8 @@ foreach my $key (values %$OUTPUT) { $mkenv->Binary($key) if $key->{OUTPUT_TYPE} eq "BINARY"; $mkenv->Manpage($key) if defined($key->{MANPAGE}); $mkenv->Header($key) if defined($key->{PUBLIC_HEADERS}); - $mkenv->ProtoHeader($key) if defined($key->{PRIVATE_PROTO_HEADER}); + $mkenv->ProtoHeader($key) if defined($key->{PRIVATE_PROTO_HEADER}) or + defined($key->{PUBLIC_PROTO_HEADER}); # $mkenv->DependencyInfo($key) if $config::config{developer} eq "yes"; } diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm index 8252c0181b..c6752ecde6 100644 --- a/source4/build/smb_build/makefile.pm +++ b/source4/build/smb_build/makefile.pm @@ -457,17 +457,26 @@ sub ProtoHeader($$) $dir =~ s/^\.\///g; - my $comment = ""; + my $comment = "Creating "; + if (defined($ctx->{PRIVATE_PROTO_HEADER})) { + $comment.= "$dir/$ctx->{PRIVATE_PROTO_HEADER}"; + if (defined($ctx->{PUBLIC_PROTO_HEADER})) { + $comment .= " and "; + } + push (@{$self->{proto_headers}}, "$dir/$ctx->{PRIVATE_PROTO_HEADER}"); + } else { + $ctx->{PRIVATE_PROTO_HEADER} = $ctx->{PUBLIC_PROTO_HEADER}; + } + if (defined($ctx->{PUBLIC_PROTO_HEADER})) { - $comment.= " and $dir/$ctx->{PUBLIC_PROTO_HEADER}"; + $comment.= "$dir/$ctx->{PUBLIC_PROTO_HEADER}"; push (@{$self->{proto_headers}}, "$dir/$ctx->{PUBLIC_PROTO_HEADER}"); } else { $ctx->{PUBLIC_PROTO_HEADER} = $ctx->{PRIVATE_PROTO_HEADER}; } - push (@{$self->{proto_headers}}, "$dir/$ctx->{PRIVATE_PROTO_HEADER}"); $self->output("$dir/$ctx->{PUBLIC_PROTO_HEADER}: \$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST:.o=.c)\n"); - $self->output("\t\@echo \"Creating $dir/$ctx->{PRIVATE_PROTO_HEADER}$comment\"\n"); + $self->output("\t\@echo \"$comment\"\n"); $self->output("\t\@\$(PERL) \$(srcdir)/script/mkproto.pl --private=$dir/$ctx->{PRIVATE_PROTO_HEADER} --public=$dir/$ctx->{PUBLIC_PROTO_HEADER} \$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST)\n\n"); } -- cgit