From 943483503cf223f24836c8b1124edc7f6950c0c6 Mon Sep 17 00:00:00 2001 From: Robert Garrett Date: Tue, 28 Oct 2025 12:46:37 -0500 Subject: [PATCH] Turn output folder into an order-only prerequisite This makes the output folder "required to exist" and not "required to be more recent." The folder's timestamp is updated when files are written into it. The files inside depend on the folder existing. The result is that the WASM and JS files are considered very slightly older than the folder that contains them. The result is that the folder is up-to-date but it's contents are not, thus re-building them and *again* updating the folder timestamp. The makefile was stuck constantly rebuilding things that are actually up-to-date. --- makefile_web | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefile_web b/makefile_web index 3ecc5b92..58f7f1f5 100644 --- a/makefile_web +++ b/makefile_web @@ -15,7 +15,7 @@ out: # Both the JS and WASM files are generated by the wasm-bindgen call, so both # get to be on the target half of this recipe. -out/boids.js out/boids.wasm: out target/wasm32-unknown-unknown/wasm-release/another-boids-in-rust.wasm +out/boids.js out/boids.wasm: target/wasm32-unknown-unknown/wasm-release/another-boids-in-rust.wasm | out wasm-bindgen --no-typescript --target web --out-dir ./out/ --out-name boids target/wasm32-unknown-unknown/wasm-release/another-boids-in-rust.wasm out/index.html: www/index.html