Skip to content

Instantly share code, notes, and snippets.

@samialdury
Last active March 17, 2024 08:03
Show Gist options
  • Save samialdury/bae013d6c42864594b88417f183e4c7b to your computer and use it in GitHub Desktop.
Save samialdury/bae013d6c42864594b88417f183e4c7b to your computer and use it in GitHub Desktop.
Makefile `help` target
.DEFAULT_GOAL := help
##@ Misc
.PHONY: help
help: ## Display this help
@awk 'BEGIN {FS = ":.*##"; printf "Usage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment