Display your makefile documentation with makefile-docs.awk, a POSIX-compatible extension of a simple awk one-liner.
This script requires:
- AWK
- GNU Make (now installed by default on POSIX-compatible operating systems such as macOS, ubuntu, ...)
Insert this script in your Makefile
help:
@awk \
-v tab_width=2 \
-F ':.*?##' \
-f makefile-docs.awk \
$(MAKEFILE_LIST)In your Makefile, add section titles, arguments, descriptions to your commands
### Section title:
command: ## [args] Description
@echo "command"Run the make help command
make helpDistributed under the MIT License. See LICENSE for more information.