From 358e9931bc55e8c645b60da821e88cea4b4a8801 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 15 Oct 2008 02:06:41 +0200 Subject: Also check include dirs for IDL files. --- pidl/lib/Parse/Pidl/ODL.pm | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'pidl/lib/Parse/Pidl/ODL.pm') diff --git a/pidl/lib/Parse/Pidl/ODL.pm b/pidl/lib/Parse/Pidl/ODL.pm index c49cdfb795..b323a6a98a 100644 --- a/pidl/lib/Parse/Pidl/ODL.pm +++ b/pidl/lib/Parse/Pidl/ODL.pm @@ -57,11 +57,18 @@ sub ODL2IDL if ($x->{TYPE} eq "IMPORT") { foreach my $idl_file (@{$x->{PATHS}}) { $idl_file = unmake_str($idl_file); - unless (-f "$basedir/$idl_file") { + my $idl_path = undef; + foreach ($basedir, @$opt_incdirs) { + if (-f "$_/$idl_file") { + $idl_path = "$_/$idl_file"; + last; + } + } + unless ($idl_path) { error($x, "Unable to open include file `$idl_file'"); next; } - my $podl = Parse::Pidl::IDL::parse_file("$basedir/$idl_file", $opt_incdirs); + my $podl = Parse::Pidl::IDL::parse_file($idl_path, $opt_incdirs); if (defined(@$podl)) { require Parse::Pidl::Typelist; @@ -74,7 +81,7 @@ sub ODL2IDL } } } else { - error($x, "Failed to parse $idl_file"); + error($x, "Failed to parse $idl_path"); } } } -- cgit