Skip to content

Instantly share code, notes, and snippets.

@ascarter
Created May 22, 2019 23:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ascarter/36141bcca7f37bdb09e5a31b4d5a89c3 to your computer and use it in GitHub Desktop.
Save ascarter/36141bcca7f37bdb09e5a31b4d5a89c3 to your computer and use it in GitHub Desktop.
Makefile help
HELP_FORMAT=" \033[36m%-25s\033[0m %s\n"
.PHONY: help
help: ## Display this usage information
@echo "Valid targets:"
@grep -E '^[^ ]+:.*?## .*$$' $(MAKEFILE_LIST) | \
sort | \
awk 'BEGIN {FS = ":.*?## "}; \
{printf $(HELP_FORMAT), $$1, $$2}'
@echo ""
@echo "This host will build the following targets if 'make release' is invoked:"
@echo $(ALL_TARGETS) | sed 's/^/ /'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment