build: clean all stamps of a subdir

stampfile assigns the clean rule of its stamp to <subdir>//clean with
:=, so every call replaces the one before. toolchain and tools define
a compile and a check stamp, and <subdir>/clean only removes the check
stamp. After "make toolchain/clean", the compile stamp is newer than the
toolchain sources, the next build takes the toolchain as built, and the
target build fails because the compiler is missing.

Append the clean rule instead, so that all stamps are removed.

Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
John Crispin committed 2026-09-22 18:18:58 +02:00
1 parent d0379f4a5a
commit 39ed48c8f1
1 file changed
+1 -1
+1 -1
View File
@@ -101,7 +101,7 @@ define stampfile
.PRECIOUS: $$($(1)/stamp-$(3)) # work around a make bug
$(1)//clean:=$(1)/stamp-$(3)/clean
$(1)//clean+=$(1)/stamp-$(3)/clean
$(1)/stamp-$(3)/clean: FORCE
@rm -f $$($(1)/stamp-$(3))