1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-05 23:44:53 +00:00

Update asm-processor and add make dependencies for global asm and early includes (#801)

* Update asm-processor to latest master

* Add make dependencies for global asm and early includes

* Update asm-processor to latest master
This commit is contained in:
Roman971 2021-05-02 22:21:27 +02:00 committed by GitHub
parent ce44541d33
commit 4e9f40cb13
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 42 additions and 20 deletions

View file

@ -35,7 +35,7 @@ try:
asmproc_flags = opt_flags + [in_file, '--input-enc', 'utf-8', '--output-enc', 'euc-jp']
compile_cmdline = compiler + compile_args + ['-I', in_dir, '-o', out_file, preprocessed_file.name]
functions = asm_processor.run(asmproc_flags, outfile=preprocessed_file)
functions, deps = asm_processor.run(asmproc_flags, outfile=preprocessed_file)
try:
subprocess.check_call(compile_cmdline)
except subprocess.CalledProcessError as e:
@ -48,5 +48,17 @@ try:
# os._exit(1)
asm_processor.run(asmproc_flags + ['--post-process', out_file, '--assembler', assembler_sh, '--asm-prelude', prelude], functions=functions)
deps_file = out_file[:-2] + ".asmproc.d"
if deps:
with open(deps_file, "w") as f:
f.write(out_file + ": " + " \\\n ".join(deps) + "\n")
for dep in deps:
f.write("\n" + dep + ":\n")
else:
try:
os.remove(deps_file)
except OSError:
pass
finally:
os.remove(preprocessed_file.name)