Answers for "self documenting makefile"

2

self-documenting makefile

.PHONY: help

help:
	@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

# All rules with double-hash comments will be automatically displayed in the make help rule
newrule: ## This is what will show up for this rule's help
	echo Hello World
Posted by: Guest on June-02-2021
0

self documenting makefile

.PHONY: help

help:
	@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
Posted by: Guest on June-02-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language