summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-05-09 13:20:42 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-09-15 17:37:06 +0200
commit9b21042938214137cd62e5017a2bf46288e44570 (patch)
treee5d12a504a2faa2431b9fddd54f0267b6c0c5ca7
parent947bde9562917e8948af93f86e90653ec717d47c (diff)
downloadsamba-9b21042938214137cd62e5017a2bf46288e44570.tar.gz
samba-9b21042938214137cd62e5017a2bf46288e44570.tar.bz2
samba-9b21042938214137cd62e5017a2bf46288e44570.zip
Build (D)COM output again.
-rwxr-xr-xsource4/librpc/scripts/build_idl.sh2
-rwxr-xr-xsource4/pidl/pidl25
2 files changed, 26 insertions, 1 deletions
diff --git a/source4/librpc/scripts/build_idl.sh b/source4/librpc/scripts/build_idl.sh
index 3f13b64a2e..5b2d09f654 100755
--- a/source4/librpc/scripts/build_idl.sh
+++ b/source4/librpc/scripts/build_idl.sh
@@ -8,7 +8,7 @@ PIDL_EXTRA_ARGS="$*"
[ -d $OUTDIR ] || mkdir -p $OUTDIR || exit 1
-PIDL="$PIDL --outputdir $OUTDIR --header --ndr-parser --server --client --swig --python $PIDL_EXTRA_ARGS"
+PIDL="$PIDL --outputdir $OUTDIR --header --ndr-parser --server --client --swig --python --dcom-proxy --com-header $PIDL_EXTRA_ARGS"
if [ x$FULLBUILD = xFULL ]; then
echo Rebuilding all idl files in $IDLDIR
diff --git a/source4/pidl/pidl b/source4/pidl/pidl
index b7a22f0499..af6c6cca89 100755
--- a/source4/pidl/pidl
+++ b/source4/pidl/pidl
@@ -483,6 +483,8 @@ my($opt_quiet) = 0;
my($opt_outputdir) = '.';
my($opt_verbose) = 0;
my($opt_warn_compat) = 0;
+my($opt_dcom_proxy);
+my($opt_com_header);
#########################################
# display help text
@@ -523,6 +525,8 @@ Samba 4 output:
--swig[=OUTFILE] create swig wrapper file [BASENAME.i]
--server[=OUTFILE] create server boilerplate [ndr_BASENAME_s.c]
--template print a template for a pipe
+ --dcom-proxy[=OUTFILE] create DCOM proxy [ndr_BASENAME_p.c]
+ --com-header[=OUTFILE] create header for COM [com_BASENAME.h]
Samba 3 output:
--samba3-ndr-client[=OUTF] create client calls for Samba3
@@ -566,6 +570,8 @@ my $result = GetOptions (
'python' => \$opt_python,
'diff' => \$opt_diff,
'swig:s' => \$opt_swig,
+ 'dcom-proxy:s' => \$opt_dcom_proxy,
+ 'com-header:s' => \$opt_com_header,
'quiet' => \$opt_quiet,
'verbose' => \$opt_verbose,
'warn-compat' => \$opt_warn_compat,
@@ -626,6 +632,25 @@ sub process_file($)
unlink($tempfile);
}
+ my $comh_filename = ($opt_com_header or "$outputdir/com_$basename.h");
+ if (defined($opt_com_header)) {
+ require Parse::Pidl::Samba4::COM::Header;
+ my $res = Parse::Pidl::Samba4::COM::Header::Parse($pidl,"$outputdir/ndr_$basename.h");
+ if ($res) {
+ FileSave($comh_filename, $res);
+ }
+ }
+
+ if (defined($opt_dcom_proxy)) {
+ require Parse::Pidl::Samba4::COM::Proxy;
+ my $res = Parse::Pidl::Samba4::COM::Proxy::Parse($pidl,$comh_filename);
+ if ($res) {
+ my ($client) = ($opt_dcom_proxy or "$outputdir/$basename\_p.c");
+ FileSave($client, $res);
+ }
+ }
+
+
if ($opt_warn_compat) {
require Parse::Pidl::Compat;
Parse::Pidl::Compat::Check($pidl);