Skip to content

Instantly share code, notes, and snippets.

@lee-pai-long
Created June 23, 2017 12:52
Show Gist options
  • Save lee-pai-long/75650ff2278645d206bf1f294ac581d2 to your computer and use it in GitHub Desktop.
Save lee-pai-long/75650ff2278645d206bf1f294ac581d2 to your computer and use it in GitHub Desktop.
Default makefile with just a help target
# Include all local tasks.
include tasks/*.mk
# Add color to help printing.
PRINT = '{printf "\033[36m%-16s\033[0m : %s\n", $$1, $$2}'
help: ## Show this message.
@echo "usage: make [task]\n" \
&& echo "available tasks:" \
&& awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / '$(PRINT) $(MAKEFILE_LIST)
# Declare tasks as phony targets
.PHONY: help
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment