diff options
| author | Aetias <aetias@outlook.com> | 2025-03-09 17:10:52 +0100 |
|---|---|---|
| committer | Aetias <aetias@outlook.com> | 2025-03-09 17:10:52 +0100 |
| commit | 1e1600cec707d62e2c854c7222b2ea8a4283658d (patch) | |
| tree | 81c1179908625cd4c9fa30315ca4186e95726d8c | |
| parent | 3439ade1a70491b0bf7661b4f960393175772fcd (diff) | |
ninja: Phonies for `arm9` and `report`
| -rwxr-xr-x | tools/configure.py | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/tools/configure.py b/tools/configure.py index a1996b85..056682e9 100755 --- a/tools/configure.py +++ b/tools/configure.py @@ -253,6 +253,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 [ |
