Skip to content

Instantly share code, notes, and snippets.

@asaaki
Created May 21, 2024 16:04
Show Gist options
  • Save asaaki/61a1cd0a8b1d24dbb5f536afc72014fb to your computer and use it in GitHub Desktop.
Save asaaki/61a1cd0a8b1d24dbb5f536afc72014fb to your computer and use it in GitHub Desktop.
Makefile help
hello: ## sends greetings
@echo "Hello!"
help: ## prints the help
@echo "# Makefile Help #"
@grep -E '^[a-zA-Z0-9_-]+:.*##' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":([^:])*?## "}; {split($$1,m,/:/); if (!m[2]) m[2]=$$1; printf "\033[36m%-30s\033[0m %s\n", m[2], $$2}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment