makefile-best-practices
Installation
SKILL.md
When creating or modifying Makefiles, follow these principles to ensure they are self-documenting and user-friendly.
1. Default Target Must Be help
Always set help as the default target so users can discover available commands:
.DEFAULT_GOAL := help
This ensures running make without arguments shows available targets instead of executing an arbitrary first target.
2. Self-Documenting Help Target
The help target should automatically build itself from comments in the Makefile. Use the ## comment pattern:
target-name: ## Description of what this target does
@command here