2012-11-07 04:01:10 +00:00
|
|
|
CLEAN_GOPATH := $(shell echo $(GOPATH) | tr ":" "\n" | grep -v '^$$' | grep -v $(PWD) | tr "\n" ":")
|
|
|
|
GOPATH := $(PWD):$(CLEAN_GOPATH)
|
2012-11-11 14:42:18 +00:00
|
|
|
PACKAGES := meatballhat.com/sylvilagus-conntest
|
2012-11-07 04:01:10 +00:00
|
|
|
|
|
|
|
export GOPATH
|
|
|
|
|
|
|
|
|
|
|
|
test: build
|
|
|
|
go test $(PACKAGES)
|
|
|
|
|
2012-11-11 13:15:14 +00:00
|
|
|
build: deps
|
2012-11-07 04:01:10 +00:00
|
|
|
go install $(PACKAGES)
|
|
|
|
|
|
|
|
deps:
|
|
|
|
go list -f '{{range .Imports}}{{.}} {{end}}' $(PACKAGES) | xargs go get
|
|
|
|
|
|
|
|
fmt:
|
|
|
|
go fmt $(PACKAGES)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -v bin/*
|
2012-11-11 02:24:16 +00:00
|
|
|
find pkg -name '*.a' -exec rm -v {} \;
|
2012-11-07 04:01:10 +00:00
|
|
|
|
|
|
|
env:
|
|
|
|
@echo GOPATH=$(GOPATH)
|
|
|
|
@echo PACKAGES=$(PACKAGES)
|
|
|
|
|
|
|
|
.PHONY: all clean env fmt
|