Created
January 13, 2017 19:44
-
-
Save killercup/f2a87adcbdb7bb97c03721c087b561a2 to your computer and use it in GitHub Desktop.
Auto Makefile CLI help
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
ARGS = $(filter-out $@,$(MAKECMDGOALS)) | |
MAKEFLAGS += --silent | |
PROJECTNAME = foobar | |
.PHONY: help | |
.DEFAULT_GOAL := help | |
help: | |
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | |
list: | |
help | |
#### | |
# Actual targets | |
#### | |
build: ## This is the documentation | |
echo "done." | |
#### | |
# Argument fix workaround | |
###ä | |
%: | |
@: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment