build: touch binaries after compile to stop perpetual rebuilds

This commit is contained in:
Andrew Hamilton 2026-09-01 10:53:53 +10:00
parent fd8c41b71f
commit 8b02869942

View file

@ -33,6 +33,13 @@ if stale build/kick kick.c meson.build subprojects wlr-protocols \
set -x
meson setup build --reconfigure
meson compile -C build
# A successful build means the binaries now reflect every tracked
# source, even ones meson decided not to relink (e.g. wltest after
# only meson.build changed). Touch them so the mtime-based stale()
# fast-path doesn't keep flagging them forever. Ninja tracks
# incrementality via its own dep files, not the binary's mtime, so this
# never fools the next real rebuild.
touch build/kick build/wltest
echo "Built: ./build/kick"
else
echo "build: nothing to do (binaries up to date)"