GNUmakefile 406 B

1234567891011121314151617181920212223
  1. DIR?=./autorest/
  2. default: build
  3. build: fmt
  4. go install $(DIR)
  5. test:
  6. go test $(DIR) || exit 1
  7. vet:
  8. @echo "go vet ."
  9. @go vet $(DIR)... ; if [ $$? -eq 1 ]; then \
  10. echo ""; \
  11. echo "Vet found suspicious constructs. Please check the reported constructs"; \
  12. echo "and fix them if necessary before submitting the code for review."; \
  13. exit 1; \
  14. fi
  15. fmt:
  16. gofmt -w $(DIR)
  17. .PHONY: build test vet fmt