Skip to content

Instantly share code, notes, and snippets.

@tbruyelle
Created June 13, 2017 08:05
Show Gist options
  • Save tbruyelle/6a659ba77644aca3fe18a702ca3c082c to your computer and use it in GitHub Desktop.
Save tbruyelle/6a659ba77644aca3fe18a702ca3c082c to your computer and use it in GitHub Desktop.
a go MakeFile
APP = ???
PACKAGE = github.com/???/???
BIN = $(PACKAGE)/cmd/???
TARGET = `go list $(PACKAGE)/... | grep -v vendor`
SRC_DIR = ???
default: build
include checks.mk
all: test checks build
build:
go build -v $(PACKAGE)/...
go build $(BIN)
test:
go test $(TARGET)
cover:
go test -cover $(TARGET)
run: build
./$(APP)
install: build
go install ./cmd/???
clean:
@rm ./$(APP) 2> /dev/null; true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment