mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
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:
parent
b5ee6f1c8c
commit
d04ddd8b0e
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user