github.com/jbking/gohan@v0.0.0-20151217002006-b41ccf1c2a96/Makefile (about) 1 NO_COLOR=\033[0m 2 OK_COLOR=\033[32;01m 3 ERROR_COLOR=\033[31;01m 4 WARN_COLOR=\033[33;01m 5 6 # You need v8worker https://github.com/ry/v8worker installed in your env 7 # in order to enable v8 support on extension. then set ENABLE_V8=true 8 ifeq "$(ENABLE_V8)" "true" 9 GO_BUILD=go build -tags=v8 ./... 10 else 11 GO_BUILD=go build ./... 12 endif 13 14 15 all: format lint build test 16 17 deps: 18 @echo "$(OK_COLOR)==> Installing dependencies$(NO_COLOR)" 19 godep restore 20 21 savedeps: 22 @echo "$(OK_COLOR)==> Updating all dependencies$(NO_COLOR)" 23 godep save ./... 24 25 format: 26 @echo "$(OK_COLOR)==> Formatting$(NO_COLOR)" 27 go fmt ./... 28 29 test: 30 @echo "$(OK_COLOR)==> Testing$(NO_COLOR)" 31 ENABLE_V8="$(ENABLE_V8)" ./run_test.sh 32 33 lint: 34 @echo "$(OK_COLOR)==> Linting$(NO_COLOR)" 35 golint ./... 36 go vet ./... 37 38 build: deps 39 @echo "$(OK_COLOR)==> Building$(NO_COLOR)" 40 $(GO_BUILD) 41 42 install: 43 @echo "$(OK_COLOR)==> Installing$(NO_COLOR)" 44 go install ./...