From 25e9e1529f17b7a8243c7897c99eca3792a90652 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Sat, 13 Aug 2022 10:29:00 -0500 Subject: [PATCH] feat: improve makefile help --- Makefile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 002869a..daadd5c 100644 --- a/Makefile +++ b/Makefile @@ -55,11 +55,10 @@ clean: rm -f docs/png/* -FILL = 15 .PHONY: help -## Display this help screen help: ## try `make help` @awk '/^[a-z.A-Z_-]+:/ { helpMessage = match(lastLine, /^##(.*)/); \ - if (helpMessage) { helpCommand = substr($$1, 0, index($$1, ":")-1); \ - helpMessage = substr(lastLine, RSTART + 3, RLENGTH); printf "\033[36m%-$(FILL)s\033[0m%s\n"\ - , helpCommand, helpMessage;}} { lastLine = $$0 }' $(MAKEFILE_LIST) + if (helpMessage) { helpCommand = substr($$1, 0, index($$1, ":")-1); \ + helpMessage = substr(lastLine, RSTART + 3, RLENGTH); \ + printf "\033[36m%-9s\033[0m - %s\n", \ + helpCommand, helpMessage;}} { lastLine = $$0 }' $(MAKEFILE_LIST) \ No newline at end of file