From 121970d22409dd3686a7082e52682636eb6a133f Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 16 Dec 2008 16:37:54 +0100 Subject: Only create (D)COM output files if there were COM objects in the IDL files. --- pidl/lib/Parse/Pidl/Samba4/COM/Proxy.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'pidl/lib/Parse/Pidl/Samba4/COM/Proxy.pm') 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; -- cgit