Track completion of a step using a timestamp file.
Section: Targets, prerequisites, and recipes
Stamp file target
makefile
makefile
node_modules/.stamp: package-lock.json
npm ci
touch $@
Explanation
A stamp file is often cleaner than making a phony install target rerun every time.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Targets, prerequisites, and recipes
Rule with multiple prerequisites
Rebuild target when any listed prerequisite changes.
Multiple targets one recipe
Attach the same recipe to multiple targets.
Order-only prerequisite
Require creation order without forcing rebuilds when the prerequisite timestamp changes.