diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2005-12-27 21:11:09 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:47:51 -0500 |
commit | 7285e102f063122ca8ef1222cc6e9a5cde176b41 (patch) | |
tree | 2551036f62d46558a1e9acd26a20f2c0b7241dce /source4/build/smb_build | |
parent | 10c183d9ae941f0ef143b2d50aebfcaf550c72b3 (diff) | |
download | samba-7285e102f063122ca8ef1222cc6e9a5cde176b41.tar.gz samba-7285e102f063122ca8ef1222cc6e9a5cde176b41.tar.bz2 samba-7285e102f063122ca8ef1222cc6e9a5cde176b41.zip |
r12523: Convert the registry subsystem to use a seperate prototype header
(note that this doesn't use the distinction between private
and public prototypes yet)
(This used to be commit 60e11f575821c1762b25ad66441b6e69ad1167ef)
Diffstat (limited to 'source4/build/smb_build')
-rw-r--r-- | source4/build/smb_build/input.pm | 8 | ||||
-rw-r--r-- | source4/build/smb_build/makefile.pm | 14 |
2 files changed, 15 insertions, 7 deletions
diff --git a/source4/build/smb_build/input.pm b/source4/build/smb_build/input.pm index 53cd0f218e..ad0a275120 100644 --- a/source4/build/smb_build/input.pm +++ b/source4/build/smb_build/input.pm @@ -140,10 +140,14 @@ sub check($$$$$) $part->{NOPROTO} = "NO"; } - if (defined($part->{PRIVATE_PROTO_HEADER}) or - defined($part->{PUBLIC_PROTO_HEADER})) { + if (defined($part->{PRIVATE_PROTO_HEADER})) { $part->{NOPROTO} = "YES"; } + + if (defined($part->{PUBLIC_PROTO_HEADER})) { + $part->{NOPROTO} = "YES"; + push (@{$part->{PUBLIC_HEADERS}}, $part->{PUBLIC_PROTO_HEADER}); + } if (defined($enabled->{$part->{NAME}})) { $part->{ENABLE} = $enabled->{$part->{NAME}}; diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm index bae6fd5b93..4669180b56 100644 --- a/source4/build/smb_build/makefile.pm +++ b/source4/build/smb_build/makefile.pm @@ -25,6 +25,7 @@ sub new($$$) $self->{shared_libs} = []; $self->{headers} = []; $self->{pc_files} = []; + $self->{proto_headers} = []; $self->{output} = ""; $self->{mkfile} = $mkfile; @@ -426,7 +427,7 @@ sub Manpage($$) my $dir = $ctx->{BASEDIR}; - $ctx->{BASEDIR} =~ s/^\.\///g; + $dir =~ s/^\.\///g; push (@{$self->{manpages}}, "$dir/$ctx->{MANPAGE}"); } @@ -464,17 +465,19 @@ sub ProtoHeader($$) my ($self,$ctx) = @_; my $dir = $ctx->{BASEDIR}; - $ctx->{BASEDIR} =~ s/^\.\///g; + + $dir =~ s/^\.\///g; my $comment = ""; - my $target = "$dir/$ctx->{PRIVATE_PROTO_HEADER}"; if (defined($ctx->{PUBLIC_PROTO_HEADER})) { - $comment.= " and $dir/$ctx->{PRIVATE_PROTO_HEADER}"; + $comment.= " and $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("$target: \$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST:.o=.c)\n"); + $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\@\$(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"); @@ -494,6 +497,7 @@ sub write($$) $self->output("PC_FILES = " . array2oneperline($self->{pc_files}) . "\n"); $self->output("ALL_OBJS = " . array2oneperline($self->{all_objs}) . "\n"); $self->output("PROTO_OBJS = " . array2oneperline($self->{proto_objs}) . "\n"); + $self->output("PROTO_HEADERS = " . array2oneperline($self->{proto_headers}) . "\n"); $self->_prepare_mk_files(); |