/Makefile

Self-documenting Makefile.

Primary LanguageMakefileGNU General Public License v3.0GPL-3.0

Self-documenting Makefile

Idea comes from Payton White's gist Makefile.

Enhanced by good comments from the community:

Usage

  1. Copy help target to your Makefile.
  2. Mark each Makefile target with ## comment:
target: ## This is the help line
  1. Group your targets using ##@ comments:
another_target: ##@Grouped This will show up as 'Grouped targets'

other_target: ##@Grouped This will show right next to the 'another_target'
  1. Use make to show help!
Usage: make [target] ...

Targets:
help      Show this help message.
target    This is the help line

Grouped targets:
another_target    This will show up as 'Grouped targets'
other_target      This will show right next to the 'another_target'