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