AWK script for Makefile docs
// momentum
// why it's here
- Active: last commit today
- Built almost entirely by one person
- Health 100/100 with only 6 stars
// how to help
// readme
makefile-doc
Generate make help from comments in your Makefile.
makefile-doc.awk is a single awk script with no dependencies other than awk. It reads your
Makefiles and prints the targets and variables you documented, with sections, colors, and optional
export to HTML and LaTeX.
help: ## Show this help
@awk -f makefile-doc.awk $(MAKEFILE_LIST)
## Number of parallel jobs
JOBS := 4
##@
##@ --- Build ---
##@
## Compile the project
build:
## Run the tests
## (set `JOBS` to run them in parallel)
test: build
##@
##@ --- Release ---
##@
##! Publish the release (cannot be undone)
publish: test
##% Use `publish` instead
upload:
Running make prints:
width=โ600โ>
See this blog post for another example.
The script started as a more elaborate version of this one-liner.
Contents: Install ยท Writing docs ยท Options ยท Substitutions ยท Export to HTML and LaTeX ยท Limitations ยท Development