Require creation order without forcing rebuilds when the prerequisite timestamp changes.
Section: Targets, prerequisites, and recipes
Order-only prerequisite
makefile
makefile
dist/app.js: src/app.js | dist
cp $< $@
dist:
mkdir -p distExplanation
Prerequisites after `|` enforce order only.
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.