diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-12-16 16:37:54 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-12-16 16:37:54 +0100 |
commit | 121970d22409dd3686a7082e52682636eb6a133f (patch) | |
tree | 2e8bb5e69eae278ef5a7e34a3669d817a362b99d /pidl/lib | |
parent | 5317dd50c01bb82881e2f641e43574a54c878967 (diff) | |
download | samba-121970d22409dd3686a7082e52682636eb6a133f.tar.gz samba-121970d22409dd3686a7082e52682636eb6a133f.tar.bz2 samba-121970d22409dd3686a7082e52682636eb6a133f.zip |
Only create (D)COM output files if there were COM objects in the IDL files.
Diffstat (limited to 'pidl/lib')
-rw-r--r-- | pidl/lib/Parse/Pidl/Samba4/COM/Header.pm | 7 | ||||
-rw-r--r-- | pidl/lib/Parse/Pidl/Samba4/COM/Proxy.pm | 6 |
2 files changed, 11 insertions, 2 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba4/COM/Header.pm b/pidl/lib/Parse/Pidl/Samba4/COM/Header.pm index 996689b4b6..de7d4547a5 100644 --- a/pidl/lib/Parse/Pidl/Samba4/COM/Header.pm +++ b/pidl/lib/Parse/Pidl/Samba4/COM/Header.pm @@ -127,6 +127,7 @@ sub Parse($$) { my ($idl,$ndr_header) = @_; my $res = ""; + my $has_obj = 0; $res .= "#include \"librpc/gen_ndr/orpc.h\"\n" . "#include \"$ndr_header\"\n\n"; @@ -135,6 +136,7 @@ sub Parse($$) { if ($_->{TYPE} eq "INTERFACE" && has_property($_, "object")) { $res .="struct $_->{NAME};\n"; + $has_obj = 1; } } @@ -142,14 +144,17 @@ sub Parse($$) { if ($_->{TYPE} eq "INTERFACE" && has_property($_, "object")) { $res.=ParseInterface($_); + $has_obj = 1; } if ($_->{TYPE} eq "COCLASS") { $res.=ParseCoClass($_); + $has_obj = 1; } } - return $res; + return $res if ($has_obj); + return undef; } 1; diff --git a/pidl/lib/Parse/Pidl/Samba4/COM/Proxy.pm b/pidl/lib/Parse/Pidl/Samba4/COM/Proxy.pm index ca9f37a053..27e1e5d424 100644 --- a/pidl/lib/Parse/Pidl/Samba4/COM/Proxy.pm +++ b/pidl/lib/Parse/Pidl/Samba4/COM/Proxy.pm @@ -201,6 +201,7 @@ sub Parse($$) { my ($pidl,$comh_filename) = @_; my $res = ""; + my $has_obj = 0; $res .= "#include \"includes.h\"\n" . "#include \"lib/com/dcom/dcom.h\"\n" . @@ -213,9 +214,12 @@ sub Parse($$) next unless has_property($_, "object"); $res .= ParseInterface($_); + + $has_obj = 1; } - return $res; + return $res if ($has_obj); + return undef; } 1; |