diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-11-09 08:28:47 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-11-09 08:28:47 +0000 |
commit | 5eb907f1d4d093f79998688a00c15b907e5d249a (patch) | |
tree | ba76c1c0420f3abb29b52078ab3e07c693a8f493 /source4/build/pidl/pidl.pl | |
parent | adf6142953c4fa81493f133d45eb80d91b069e47 (diff) | |
download | samba-5eb907f1d4d093f79998688a00c15b907e5d249a.tar.gz samba-5eb907f1d4d093f79998688a00c15b907e5d249a.tar.bz2 samba-5eb907f1d4d093f79998688a00c15b907e5d249a.zip |
added a module for auto-generating the client calls. We can now go
from IDL file to working Samba4 RPC client library in a completely
automated fashion.
(This used to be commit 566476b3ff91eaa02c4f3c494afbf9ac7c200461)
Diffstat (limited to 'source4/build/pidl/pidl.pl')
-rwxr-xr-x | source4/build/pidl/pidl.pl | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/source4/build/pidl/pidl.pl b/source4/build/pidl/pidl.pl index a3333da70a..8d15d86347 100755 --- a/source4/build/pidl/pidl.pl +++ b/source4/build/pidl/pidl.pl @@ -18,6 +18,7 @@ use dump; use header; use parser; use eparser; +use client; use util; my($opt_help) = 0; @@ -27,6 +28,7 @@ my($opt_diff) = 0; my($opt_header) = 0; my($opt_parser) = 0; my($opt_eparser) = 0; +my($opt_client); my($opt_keep) = 0; my($opt_output); @@ -59,7 +61,7 @@ sub ShowHelp() { print " perl IDL parser and code generator - Copyright tridge\@samba.org + Copyright (C) tridge\@samba.org Usage: pidl.pl [options] <idlfile> @@ -71,6 +73,7 @@ sub ShowHelp() --header create a C header file --parser create a C parser --eparser create an ethereal parser + --client FILENAME create client calls in FILENAME --diff run diff on the idl and dumped output --keep keep the .pidl file \n"; @@ -86,6 +89,7 @@ GetOptions ( 'header' => \$opt_header, 'parser' => \$opt_parser, 'eparser' => \$opt_eparser, + 'client=s' => \$opt_client, 'diff' => \$opt_diff, 'keep' => \$opt_keep ); @@ -136,6 +140,13 @@ if ($opt_eparser) { util::FileSave($parser, IdlEParser::Parse($idl)); } +if ($opt_client) { + my($idl) = util::LoadStructure($pidl_file); + my($client) = util::ChangeExtension($opt_client, "c"); + print "Generating $client client calls\n"; + util::FileSave($client, IdlClient::Parse($idl)); +} + if ($opt_diff) { my($idl) = util::LoadStructure($pidl_file); my($tempfile) = util::ChangeExtension($opt_output, "tmp"); |