You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
908 B

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