Commit ad109acd authored by Robert Bradshaw's avatar Robert Bradshaw

More robust include searching.

parent c6d8607a
...@@ -265,9 +265,15 @@ class DependencyTree(object): ...@@ -265,9 +265,15 @@ class DependencyTree(object):
cimports = set(cimports) cimports = set(cimports)
externs = set(externs) externs = set(externs)
for include in includes: for include in includes:
a, b = self.cimports_and_externs(os.path.join(os.path.dirname(filename), include)) include_path = os.path.join(os.path.dirname(filename), include)
if not os.path.exists(include_path):
include_path = self.context.find_include_file(include)
if include_path:
a, b = self.cimports_and_externs(include_path)
cimports.update(a) cimports.update(a)
externs.update(b) externs.update(b)
else:
print "Unable to locate '%s' referenced from '%s'" % (filename, include)
return tuple(cimports), tuple(externs) return tuple(cimports), tuple(externs)
cimports_and_externs = cached_method(cimports_and_externs) cimports_and_externs = cached_method(cimports_and_externs)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment