Skip to content

Commit

Permalink
Makefile: fix to work 'make help' when using Makefile.local
Browse files Browse the repository at this point in the history
  • Loading branch information
makenowjust authored and Val committed Aug 12, 2017
1 parent cb0ee67 commit 905e229
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,17 @@ all: crystal ## Build all files (currently crystal only) [default]
help: ## Show this help
@echo
@printf '\033[34mtargets:\033[0m\n'
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) |\
@grep -hE '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) |\
sort |\
awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-15s\033[0m %s\n", $$1, $$2}'
@echo
@printf '\033[34moptional variables:\033[0m\n'
@grep -E '^[a-zA-Z_-]+ \?=.*?## .*$$' $(MAKEFILE_LIST) |\
@grep -hE '^[a-zA-Z_-]+ \?=.*?## .*$$' $(MAKEFILE_LIST) |\
sort |\
awk 'BEGIN {FS = " \\?=.*?## "}; {printf " \033[36m%-15s\033[0m %s\n", $$1, $$2}'
@echo
@printf '\033[34mrecipes:\033[0m\n'
@grep -E '^##.*$$' $(MAKEFILE_LIST) |\
@grep -hE '^##.*$$' $(MAKEFILE_LIST) |\
awk 'BEGIN {FS = "## "}; /^## [a-zA-Z_-]/ {printf " \033[36m%s\033[0m\n", $$2}; /^## / {printf " %s\n", $$2}'

.PHONY: spec
Expand Down

0 comments on commit 905e229

Please sign in to comment.