Makefile 892 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # where to rsync builds
  2. DIST?=dist/publish
  3. DISTSUB=2020/05
  4. test: .PHONY
  5. go test -v $(shell go list ./... | grep -v /vendor/)
  6. testrace: .PHONY
  7. go test -v -race $(shell go list ./... | grep -v /vendor/)
  8. docker-test: .PHONY
  9. # test that we don't have missing dependencies
  10. docker run --rm -v `pwd`:/go/src/github.com/abh/geodns \
  11. -v /opt/local/share/GeoIP:/opt/local/share/GeoIP \
  12. golang:1.14-alpine3.11 -- \
  13. go test ./...
  14. devel:
  15. go build -tags devel
  16. bench:
  17. go test -check.b -check.bmem
  18. TARS=$(wildcard dist/geodns-*-*.tar)
  19. push: $(TARS) install.sh
  20. rsync --exclude publish install.sh $(TARS) $(DIST)/$(DISTSUB)/
  21. $(DIST)/../push
  22. builds: linux-build linux-build-i386 freebsd-build push
  23. linux-build:
  24. GOOS=linux GOARCH=amd64 ./build
  25. linux-build-i386:
  26. GOOS=linux GOARCH=386 ./build
  27. freebsd-build:
  28. GOOS=freebsd GOARCH=amd64 ./build
  29. GOOS=freebsd GOARCH=386 ./build
  30. .PHONY: