diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-01-12 22:15:12 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-01-12 22:15:12 +0100 |
commit | 97ad5d5d80d0967c3ca7dbcd424883d3ad613138 (patch) | |
tree | fb0b3a74d4bdf9e2798a29c9c97f39aae8ca74c8 /source4/pidl/pidl | |
parent | c9e39b1d908e88fb6c6f3ff245827050a60ba851 (diff) | |
download | samba-97ad5d5d80d0967c3ca7dbcd424883d3ad613138.tar.gz samba-97ad5d5d80d0967c3ca7dbcd424883d3ad613138.tar.bz2 samba-97ad5d5d80d0967c3ca7dbcd424883d3ad613138.zip |
pidl: Add ability to write type metadata to a file.
(This used to be commit e8ab241ff47f2c3e6f80f9c62373139e4c9f5a1e)
Diffstat (limited to 'source4/pidl/pidl')
-rwxr-xr-x | source4/pidl/pidl | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/source4/pidl/pidl b/source4/pidl/pidl index 4395df2020..500b4dcbfc 100755 --- a/source4/pidl/pidl +++ b/source4/pidl/pidl @@ -17,7 +17,7 @@ pidl - An IDL compiler written in Perl pidl --help -pidl [--outputdir[=OUTNAME]] [--includedir DIR...] [--parse-idl-tree] [--dump-idl-tree] [--dump-ndr-tree] [--header[=OUTPUT]] [--ejs[=OUTPUT]] [--python[=OUTPUT]] [--swig[=OUTPUT]] [--ndr-parser[=OUTPUT]] [--client] [--server] [--warn-compat] [--quiet] [--verbose] [--template] [--ws-parser[=OUTPUT]] [--diff] [--dump-idl] [--tdr-parser[=OUTPUT]] [--samba3-ndr-client[=OUTPUT]] [--samba3-ndr-server[=OUTPUT]] [<idlfile>.idl]... +pidl [--outputdir[=OUTNAME]] [--includedir DIR...] [--parse-idl-tree] [--dump-idl-tree] [--dump-ndr-tree] [--header[=OUTPUT]] [--ejs[=OUTPUT]] [--python[=OUTPUT]] [--swig[=OUTPUT]] [--ndr-parser[=OUTPUT]] [--client] [--server] [--warn-compat] [--quiet] [--verbose] [--template] [--ws-parser[=OUTPUT]] [--diff] [--dump-idl] [--tdr-parser[=OUTPUT]] [--samba3-ndr-client[=OUTPUT]] [--samba3-ndr-server[=OUTPUT]] [--typelib=[OUTPUT]] [<idlfile>.idl]... =head1 DESCRIPTION @@ -88,6 +88,10 @@ Generate a C file and C header containing TDR parsers. The filename for the parser defaults to tdr_OUTNAME.c. The header filename will be the parser filename with the extension changed from .c to .h. +=item I<--typelib> + +Write type information to the specified file. + =item I<--server> Generate boilerplate for the RPC server that implements @@ -462,6 +466,7 @@ my($opt_samba3_ndr_client); my($opt_samba3_ndr_server); my($opt_template) = 0; my($opt_client); +my($opt_typelib); my($opt_server); my($opt_ndr_parser); my($opt_tdr_parser); @@ -498,6 +503,7 @@ Debugging: --dump-ndr-tree[=FILE] dump internal NDR data tree to file [BASENAME.ndr] --dump-idl regenerate IDL file --diff run diff on original IDL and dumped output + --typelib print type information Samba 4 output: --header[=OUTFILE] create generic header file [BASENAME.h] @@ -534,6 +540,7 @@ my $result = GetOptions ( 'samba3-ndr-server:s' => \$opt_samba3_ndr_server, 'header:s' => \$opt_header, 'server:s' => \$opt_server, + 'typelib:s' => \$opt_typelib, 'tdr-parser:s' => \$opt_tdr_parser, 'template' => \$opt_template, 'ndr-parser:s' => \$opt_ndr_parser, @@ -711,6 +718,12 @@ sub process_file($) FileSave($tdr_header, $hdr); } + if (defined($opt_typelib)) { + my $typelib = ($opt_typelib or "$outputdir/$basename.tlb"); + require Parse::Pidl::Typelist; + FileSave($typelib, Parse::Pidl::Typelist::GenerateTypeLib()); + } + if ($opt_template) { require Parse::Pidl::Samba4::Template; print Parse::Pidl::Samba4::Template::Parse($pidl); |