Attach the same recipe to multiple targets.
Section: Targets, prerequisites, and recipes
Multiple targets one recipe
makefile
makefile
.PHONY: lint fmt
lint fmt:
pnpm biome check .Explanation
Useful when several targets truly run the same command.
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.
Order-only prerequisite
Require creation order without forcing rebuilds when the prerequisite timestamp changes.