mirror of
https://github.com/daylinmorgan/logo.git
synced 2024-12-21 22:10:45 -06:00
feat: improve makefile help
This commit is contained in:
parent
804a95d69a
commit
25e9e1529f
1 changed files with 4 additions and 5 deletions
9
Makefile
9
Makefile
|
@ -55,11 +55,10 @@ clean:
|
||||||
rm -f docs/png/*
|
rm -f docs/png/*
|
||||||
|
|
||||||
|
|
||||||
FILL = 15
|
|
||||||
.PHONY: help
|
.PHONY: help
|
||||||
## Display this help screen
|
|
||||||
help: ## try `make help`
|
help: ## try `make help`
|
||||||
@awk '/^[a-z.A-Z_-]+:/ { helpMessage = match(lastLine, /^##(.*)/); \
|
@awk '/^[a-z.A-Z_-]+:/ { helpMessage = match(lastLine, /^##(.*)/); \
|
||||||
if (helpMessage) { helpCommand = substr($$1, 0, index($$1, ":")-1); \
|
if (helpMessage) { helpCommand = substr($$1, 0, index($$1, ":")-1); \
|
||||||
helpMessage = substr(lastLine, RSTART + 3, RLENGTH); printf "\033[36m%-$(FILL)s\033[0m%s\n"\
|
helpMessage = substr(lastLine, RSTART + 3, RLENGTH); \
|
||||||
, helpCommand, helpMessage;}} { lastLine = $$0 }' $(MAKEFILE_LIST)
|
printf "\033[36m%-9s\033[0m - %s\n", \
|
||||||
|
helpCommand, helpMessage;}} { lastLine = $$0 }' $(MAKEFILE_LIST)
|
Loading…
Reference in a new issue