Skip to content

Instantly share code, notes, and snippets.

@SithEngineer
Created March 12, 2022 17:01
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 SithEngineer/bcae880586e0f9a4f75859ca29307d50 to your computer and use it in GitHub Desktop.
Save SithEngineer/bcae880586e0f9a4f75859ca29307d50 to your computer and use it in GitHub Desktop.
A Makefile that documents itself.
.DEFAULT_GOAL := help
.PHONY: help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
cmd-a: ## Run command A
@echo "Command A executed"
cmd-b: ## Run command B
@echo "Command B executed"
cmd-all: cmd-a cmd-b ## Run all the commands
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment