Last active
September 16, 2025 00:38
-
-
Save damienpontifex/5b87aeb8c0091c30798e1ba47dc5a4fb to your computer and use it in GitHub Desktop.
Makefile template
This file contains hidden or 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
.SHELLFLAGS := -o errexit -o nounset -o pipefail | |
.DELETE_ON_ERROR: | |
MAKEFLAGS += --warn-undefined-variables | |
MAKEFLAGS += --no-builtin-rules | |
.PHONY: help all fmt validate | |
## help: Display available commands and their descriptions | |
help: | |
@echo "Usage:" | |
@sed -n 's/^##//p' $(MAKEFILE_LIST) \ | |
| sort \ | |
| awk -v bold="$$(tput bold)" -v normal="$$(tput sgr0)" '{ $$1 = bold $$1 normal; print }' \ | |
| column -t -s ':' | |
all: fmt validate | |
## validate: Validate files | |
validate: | |
@echo "TODO: implement validation" | |
## fmt: Format files | |
fmt: | |
@echo "TODO: implement formatter" |
This file contains hidden or 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
# So that we don't have to setup symlinks, point to custom location instead of .git/hooks | |
git config --local core.hooksPath scripts/githooks |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment