Created
February 7, 2024 11:46
-
-
Save skylock/1d90e424c7ce7da82fffe41d449b8382 to your computer and use it in GitHub Desktop.
self-documenting-makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.DEFAULT_GOAL := help | |
# VARIABLES | |
# TARGETS | |
# See details at from http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html | |
help: ## Prints this help message | |
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | |
foo: ## This line will be shown as documentation when `make` or `make help` command is used. | |
bar | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment