diff --git a/.crumb b/.crumb index e140b6330..c3e37e307 100644 --- a/.crumb +++ b/.crumb @@ -42,13 +42,13 @@ "children": [ { "digest": "9f19f11674ca5dfc3c9c3ae35fe6106557aee9583210da13d257e1b9d88e052c", - "last_commit": "190ff8912", + "last_commit": "d863780eb", "name": "calibration", "purpose": "Directory calibration. Purpose not yet described by a human." }, { "digest": "d74cddad4fb68d35451857af81f4cb7f69412a595c44af8f3de8baaf602dc1b9", - "last_commit": "3a995ba8d", + "last_commit": "ad7ec9b0e", "name": "docs", "purpose": "Directory docs. Purpose not yet described by a human." }, @@ -60,50 +60,50 @@ }, { "digest": "8f0e5cb325040247440527f6b54b65cf72c47ff5adca75b4f32a1ddf2b2d6ade", - "last_commit": "ae4ad9c0a", + "last_commit": "ad7ec9b0e", "name": "mk", "purpose": "Directory mk. Purpose not yet described by a human." }, { "digest": "62b92244c52fa8af6f511012dee2967e98dff162cc1d8bf45d0b2f15cb0adc5f", - "last_commit": "5901baa51", + "last_commit": "450bbefd4", "name": "research", "purpose": "Directory research. Purpose not yet described by a human." }, { "digest": "1cef97c8f2d852990d04fe5e791e877015c74a751648a020033a2459e02c5148", - "last_commit": "43d8d20da", + "last_commit": "ad7ec9b0e", "name": "spec", "purpose": "Directory spec. Purpose not yet described by a human." }, { "digest": "199749684598b36b610b14a4c5b59703df5e53bba1db2b5939297c55ac423153", - "last_commit": "333091a6f", + "last_commit": "ad7ec9b0e", "name": "src", "purpose": "Directory src. Purpose not yet described by a human." }, { "digest": "ea8ae97d49edc85af090218634c9bad13bcc91fa84f96e0d33fefe313704e111", - "last_commit": "3a995ba8d", + "last_commit": "ad7ec9b0e", "name": "tests", "purpose": "Directory tests. Purpose not yet described by a human." }, { "digest": "4e83dea21da137c30076c2dc0ca4f3a488f576f30a94e334558ad5ea523f3a6b", - "last_commit": "88e24bdd5", + "last_commit": "a50c3bd41", "name": "tools", "purpose": "Directory tools. Purpose not yet described by a human." } ], "children_root": "sha256:1ef53b95bc495764c6a325611a2941905bbaf617c12cdbe236408a5f72812766", - "compiled_at": "2026-10-29T19:08:03Z", + "compiled_at": "2026-10-30T03:00:28Z", "compiler": "crumb-compile/1", - "digest": "sha256:fd5b27b23c524c67fd5e889f9e13815cbe239cd6e8520e4b6874f314ccf6c199", + "digest": "sha256:2605e29f7c23afddc2f4233c96d1cb6033d3acf4c6db1b5b6b25f4bb10ff6a37", "evidence_files": 12611, "evidence_root": "sha256:9ee1ecc8a32bd724cae4237a844b3cb2e82a8e6af89626fa84c2b5ea77bec79e", "files": 17819, - "generated_at_commit": "8975287573f284dd2140b2f2b169619d3e145cf1", - "source_tree": "sha256:1d172b7096a6e23d4a2746e09293f7f97656c5d1b4d1ffd808ff5ff5c6dce805" + "generated_at_commit": "ad7ec9b0eeb6cf5ba44eda416e6a8ad05fa61dcb", + "source_tree": "sha256:defb74aebde366031a8ce7d693e3701349c97144ea746423ec6ab69eee028f17" }, "owner_lane": "", "provenance": { diff --git a/Makefile b/Makefile index 4e068c1de..531465332 100644 --- a/Makefile +++ b/Makefile @@ -116,10 +116,20 @@ $(OUT_DIR): $(OUT_DIR)/%.o: src/%.c | $(OUT_DIR) $(CC) $(CFLAGS) -c $< -o $@ -$(OUT_DIR)/m16_native.o: $(PHYSICS_DIR)/m16/m16_native.c | $(OUT_DIR) +# The physics-built objects must be rebuilt when PHYSICS_DIR points somewhere else (#488), not only +# when a file there is newer. The stamp records the resolved PHYSICS_DIR and its git HEAD, and is +# rewritten only when that text changes, so an unchanged PHYSICS_DIR rebuilds nothing. +PHYSICS_STAMP = $(OUT_DIR)/physics.stamp +.PHONY: FORCE +FORCE: +$(PHYSICS_STAMP): FORCE | $(OUT_DIR) + @new="$$(cd '$(PHYSICS_DIR)' 2>/dev/null && pwd -P || echo '$(PHYSICS_DIR)') $$(git -C '$(PHYSICS_DIR)' rev-parse HEAD 2>/dev/null || echo nogit)"; \ + if [ "$$(cat $@ 2>/dev/null)" != "$$new" ]; then printf '%s\n' "$$new" > $@; fi + +$(OUT_DIR)/m16_native.o: $(PHYSICS_DIR)/m16/m16_native.c $(PHYSICS_STAMP) | $(OUT_DIR) $(CC) $(CFLAGS) -c $< -o $@ -$(OUT_DIR)/nvrm.o: $(PHYSICS_DIR)/nvrm/nvrm.c | $(OUT_DIR) +$(OUT_DIR)/nvrm.o: $(PHYSICS_DIR)/nvrm/nvrm.c $(PHYSICS_STAMP) | $(OUT_DIR) $(CC) $(CFLAGS) -c $< -o $@ $(OUT_DIR)/crumbline/%.o: src/crumbline/%.c | $(OUT_DIR)