Last active
August 5, 2019 04:47
-
-
Save shootacean/c73052bd42d0d8f664722fec1b7e7e4b to your computer and use it in GitHub Desktop.
go makefile quick Start
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
# ref: https://frasco.io/golang-dont-afraid-of-makefiles-785f3ec7eb32 | |
GOCMD=go | |
GOBUILD=$(GOCMD) build | |
GOCLEAN=$(GOCMD) clean | |
GOTEST=$(GOCMD) test | |
GOGET=$(GOCMD) get | |
BINARY_NAME=mybinary | |
BINARY_UNIX=$(BINARY_NAME)_unix | |
all: test build | |
lint: | |
$(GOCMD) vet ./...; golint -min_confidence=0 ./... | |
build: | |
$(GOBUILD) -o $(BINARY_NAME) -v | |
test: | |
$(GOTEST) -v ./... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment