summaryrefslogtreecommitdiff
path: root/pidl/lib
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-10-15 02:06:41 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-10-15 02:06:41 +0200
commit358e9931bc55e8c645b60da821e88cea4b4a8801 (patch)
treedba415e7a48b19a0c025504bbd1efd13a7056d4b /pidl/lib
parent4f6a4b55101f9b2c5356eda43b0f56fa61ce5775 (diff)
downloadsamba-358e9931bc55e8c645b60da821e88cea4b4a8801.tar.gz
samba-358e9931bc55e8c645b60da821e88cea4b4a8801.tar.bz2
samba-358e9931bc55e8c645b60da821e88cea4b4a8801.zip
Also check include dirs for IDL files.
Diffstat (limited to 'pidl/lib')
-rw-r--r--pidl/lib/Parse/Pidl/ODL.pm13
1 files changed, 10 insertions, 3 deletions
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");
}
}
}