From d166939adb4835fcb0749c599a22c6de9ccdf0cf Mon Sep 17 00:00:00 2001 From: Aetias Date: Mon, 19 May 2025 19:18:23 +0200 Subject: [PATCH] ninja apply: New target for running `dsd apply` --- tools/configure.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tools/configure.py b/tools/configure.py index d9e1016a..939d9890 100755 --- a/tools/configure.py +++ b/tools/configure.py @@ -304,6 +304,12 @@ def main(): ) n.newline() + n.rule( + name="apply", + command=f"{DSD} {DSD_BASE_FLAGS} apply --config-path $config_path --elf-path $elf_path" + ) + n.newline() + n.rule( name="sha1", command=f"{PYTHON} tools/sha1.py $in -c $sha1_file" @@ -327,6 +333,7 @@ def main(): add_check_builds(n, project) add_objdiff_builds(n, project) add_configure_build(n, project) + add_apply_build(n, project) n.default(["objdiff", "check", "sha1"]) @@ -646,6 +653,20 @@ def add_configure_build(n: ninja_syntax.Writer, project: Project): ) +def add_apply_build(n: ninja_syntax.Writer, project: Project): + n.build( + inputs=project.dsd_configs() + [str(project.arm9_o())], + implicit=DSD, + rule="apply", + outputs="apply", + variables={ + "config_path": str(project.arm9_config_yaml()), + "elf_path": str(project.arm9_o()), + } + ) + n.newline() + + def get_config_files(game_config: Path, name: str) -> list[str]: return [ f"{root}/{file}"