ninja: Phonies for arm9 and report

This commit is contained in:
Aetias
2025-03-09 17:10:52 +01:00
parent 3439ade1a7
commit 1e1600cec7
+57
View File
@@ -252,6 +252,18 @@ def main():
)
n.newline()
n.rule(
name="check_modules",
command=f"{DSD} check modules --config-path $config_path"
)
n.newline()
n.rule(
name="check_symbols",
command=f"{DSD} check symbols --config-path $config_path --elf-path $elf_path"
)
n.newline()
n.rule(
name="sha1",
command=f"{PYTHON} tools/sha1.py $in -c $sha1_file"
@@ -263,6 +275,7 @@ def main():
add_delink_and_lcf_builds(n, project)
add_mwcc_builds(n, project, mwcc_implicit)
add_mwld_and_rom_builds(n, project)
add_check_builds(n, project)
add_objdiff_builds(n, project)
@@ -345,6 +358,13 @@ def add_mwld_and_rom_builds(n: ninja_syntax.Writer, project: Project):
)
n.newline()
n.build(
inputs=elf_file,
rule="phony",
outputs="arm9",
)
n.newline()
rom_config_file = str(project.build_rom_config())
n.build(
inputs=elf_file,
@@ -469,6 +489,36 @@ def add_delink_and_lcf_builds(n: ninja_syntax.Writer, project: Project):
n.newline()
def add_check_builds(n: ninja_syntax.Writer, project: Project):
n.build(
inputs=str(project.arm9_o()),
rule="check_modules",
outputs="check_modules",
variables={
"config_path": project.arm9_config_yaml(),
},
)
n.newline()
n.build(
inputs=str(project.arm9_o()),
rule="check_symbols",
outputs="check_symbols",
variables={
"config_path": project.arm9_config_yaml(),
"elf_path": project.arm9_o(),
},
)
n.newline()
n.build(
inputs=["check_modules", "check_symbols"],
rule="phony",
outputs="check",
)
n.newline()
def add_objdiff_builds(n: ninja_syntax.Writer, project: Project):
n.build(
inputs=project.dsd_configs(),
@@ -496,6 +546,13 @@ def add_objdiff_builds(n: ninja_syntax.Writer, project: Project):
)
n.newline()
n.build(
inputs=str(project.objdiff_report()),
rule="phony",
outputs="report",
)
n.newline()
def get_config_files(game_config: Path, name: str) -> list[str]:
return [