Bug 1319352 - Allow to run AccEventGen.py and xpild/header.py from any directory. r=mshal

--HG--
extra : rebase_source : 52c9ffea0628101ca651ca2fdad1ececbfeb8039
This commit is contained in:
Mike Hommey 2016-11-22 17:05:49 +09:00
parent b5ee6f1c8c
commit d04ddd8b0e
2 changed files with 2 additions and 2 deletions

View File

@ -223,6 +223,6 @@ def gen_files(fd, conf_file, xpidllex, xpidlyacc):
deps = set()
conf, inc_dir = get_conf(conf_file)
deps.update(print_header_file(fd, conf, inc_dir))
with open('xpcAccEvents.cpp', 'w') as cpp_fd:
with open(os.path.join(os.path.dirname(fd.name), 'xpcAccEvents.cpp'), 'w') as cpp_fd:
deps.update(print_cpp_file(cpp_fd, conf, inc_dir))
return deps

View File

@ -548,7 +548,7 @@ def write_interface(iface, fd):
def main(outputfile):
cachedir = '.'
cachedir = os.path.dirname(outputfile.name if outputfile else '') or '.'
if not os.path.isdir(cachedir):
os.mkdir(cachedir)
sys.path.append(cachedir)