Last active
January 28, 2020 21:54
-
-
Save johnhof/25679a9f8f612ff22666cb8a51197c4f to your computer and use it in GitHub Desktop.
My preferred base makefile cobbled together from: https://tech.davis-hansson.com/p/make https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SHELL := bash | |
.ONESHELL: | |
.SHELLFLAGS := -eu -o pipefail -c | |
.DELETE_ON_ERROR: | |
MAKEFLAGS += --no-builtin-rules | |
.PHONY: help | |
help: ## Lists targets and their descriptions | |
@##grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | |
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | cut -d: -f2- | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | |
.PHONY: init | |
init: ## Initializes the project directory | |
pre-commit install | |
.PHONY: clean | |
clean: ## Clears out project directory generated files |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment