# Makefile
- We recommend creating a Makefile in every project, with unified commands
make dev
,make test
. Makefile
is a recommended file name.- Target name separated by
-
, e.g.,run-tests
. Begin with the verb:apply-
,create-
,install-
. - We write environment variables in uppercase, e.g.,
PROJECT_PATH
. - Local variables in bottomcase with
_
delimiter, e.g.,build_dir = $(PROJECT_PATH)/build
. - Add
make help
command:
help: ## Display this help
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n\nTargets:\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-10s\033[0m %s\n", $$1, $$2 }' $(MAKEFILE_LIST)
test: ## Run tests
go test ./..