gecko-dev/config/system_header_util.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 строки
545 B
Python
Исходник Обычный вид История

from __future__ import absolute_import
import os
def find_in_path(file, searchpath):
for dir in searchpath.split(os.pathsep):
f = os.path.join(dir, file)
if os.path.exists(f):
return f
return ''
def header_path(header, compiler):
if compiler == 'gcc':
# we use include_next on gcc
return header
elif compiler == 'msvc':
return find_in_path(header, os.environ.get('INCLUDE', ''))
else:
# hope someone notices this ...
raise NotImplementedError(compiler)