From 5c3fd8e4717ec7167a67f9e9ee1e2d86f7d515a8 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 6 Nov 2006 20:01:22 +0000 Subject: r19580: Add --includedir option. (This used to be commit b076bfa39fefafcf30ac5be5056abfd629338fa5) --- source4/pidl/lib/Parse/Pidl/IDL.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'source4/pidl/lib/Parse') diff --git a/source4/pidl/lib/Parse/Pidl/IDL.pm b/source4/pidl/lib/Parse/Pidl/IDL.pm index b9c39f186e..87b4ccb5e5 100644 --- a/source4/pidl/lib/Parse/Pidl/IDL.pm +++ b/source4/pidl/lib/Parse/Pidl/IDL.pm @@ -2987,9 +2987,9 @@ sub parse_string return CleanData($idl); } -sub parse_file($) +sub parse_file($$) { - my ($filename) = @_; + my ($filename,$incdirs) = @_; my $saved_delim = $/; undef $/; @@ -2997,7 +2997,8 @@ sub parse_file($) if (! defined $cpp) { $cpp = "cpp"; } - my $data = `$cpp -D__PIDL__ -xc $filename`; + my $includes = map { " -I$_" } @$incdirs; + my $data = `$cpp -D__PIDL__$includes -xc $filename`; $/ = $saved_delim; return parse_string($data, $filename); -- cgit