Bug 1564761 [wpt PR 17620] - Document::CheckComplete should be nop when called from...
[gecko.git] / config / system_header_util.py
bloba623c48ad4020ee4db0b15d91533ba91a99f2ef2
1 from __future__ import absolute_import
2 import os
5 def find_in_path(file, searchpath):
6 for dir in searchpath.split(os.pathsep):
7 f = os.path.join(dir, file)
8 if os.path.exists(f):
9 return f
10 return ''
13 def header_path(header, compiler):
14 if compiler == 'gcc':
15 # we use include_next on gcc
16 return header
17 elif compiler == 'msvc':
18 return find_in_path(header, os.environ.get('INCLUDE', ''))
19 else:
20 # hope someone notices this ...
21 raise NotImplementedError(compiler)