1 2# NOTE: This Makefile is only necessary if you 3# plan on developing the msgp tool and library. 4# Installation can still be performed with a 5# normal `go install`. 6 7# generated integration test files 8GGEN = ./_generated/generated.go ./_generated/generated_test.go 9# generated unit test files 10MGEN = ./msgp/defgen_test.go 11 12SHELL := /bin/bash 13 14BIN = $(GOBIN)/msgp 15 16.PHONY: clean wipe install get-deps bench all 17 18$(BIN): */*.go 19 @go install ./... 20 21install: $(BIN) 22 23$(GGEN): ./_generated/def.go 24 go generate ./_generated 25 26$(MGEN): ./msgp/defs_test.go 27 go generate ./msgp 28 29test: all 30 go test -v ./msgp 31 go test -v ./_generated 32 33bench: all 34 go test -bench . ./msgp 35 go test -bench . ./_generated 36 37clean: 38 $(RM) $(GGEN) $(MGEN) 39 40wipe: clean 41 $(RM) $(BIN) 42 43get-deps: 44 go get -d -t ./... 45 46all: install $(GGEN) $(MGEN) 47 48# travis CI enters here 49travis: 50 go get -d -t ./... 51 go build -o "$${GOPATH%%:*}/bin/msgp" . 52 go generate ./msgp 53 go generate ./_generated 54 go test ./msgp 55 go test ./_generated 56