From f3953f8a6d355e925cfdb4e1562fbc0e15b039c0 Mon Sep 17 00:00:00 2001 From: valeros Date: Mon, 4 Mar 2024 16:45:34 +0200 Subject: [PATCH] Properly handle ULP sources in incremental builds Resolves #1320 --- builder/frameworks/ulp.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/builder/frameworks/ulp.py b/builder/frameworks/ulp.py index 5af8f87..9faf8c6 100644 --- a/builder/frameworks/ulp.py +++ b/builder/frameworks/ulp.py @@ -124,14 +124,19 @@ def compile_ulp_binary(): "build", ) - return ulp_env.Command( + # The `build.ninja` dependency is always generated with the same content + # so a cloned environment with a decider that depends on a timestamp is used + ulp_binary_env = ulp_env.Clone() + ulp_binary_env.Decider("timestamp-newer") + + return ulp_binary_env.Command( [ os.path.join(ULP_BUILD_DIR, "ulp_main.h"), os.path.join(ULP_BUILD_DIR, "ulp_main.ld"), os.path.join(ULP_BUILD_DIR, "ulp_main.bin"), ], None, - ulp_env.VerboseAction(" ".join(cmd), "Generating ULP project files $TARGETS"), + ulp_binary_env.VerboseAction(" ".join(cmd), "Generating ULP project files $TARGETS"), )