A worked example, rendered from real sample data. Sign in to run the tool on your own input.
target─── Makefile RULES ───
target: dependencies Define a rule with target and dependencies
<recipe> Tab-indented commands to build target (MUST be tab, not spaces)
.PHONY: target Mark target as phony (not a file)
target: dep1 dep2 Multiple dependencies trigger target build
$@ Reference target name in recipe
$? Reference dependencies newer than target
Rules, variables, functions, pattern matching, advanced features. Part of the DevTools Surf developer suite. Browse more tools in the Cheatsheets collection.