Skip to content

Commit

Permalink
updaate makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
zhexuany committed Dec 11, 2017
1 parent a7fbd3d commit d437692
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ ifeq "$(GOPATH)" ""
endif

CURDIR := $(shell pwd)
path_to_add := $(addsuffix /bin,$(subst :,/bin:,$(CURDIR)/vendor:$(GOPATH)))
path_to_add := $(addsuffix /bin,$(subst :,/bin:,$(GOPATH)))
export PATH := $(path_to_add):$(PATH)

GO := go
GOBUILD := GOPATH=$(CURDIR)/vendor:$(GOPATH) CGO_ENABLED=0 $(GO) build $(BUILD_FLAG)
GOTEST := GOPATH=$(CURDIR)/vendor:$(GOPATH) CGO_ENABLED=1 $(GO) test -p 3
OVERALLS := GOPATH=$(CURDIR)/vendor:$(GOPATH) CGO_ENABLED=1 overalls
GOBUILD := GOPATH=$(GOPATH) CGO_ENABLED=0 $(GO) build $(BUILD_FLAG)
GOTEST := GOPATH=$(GOPATH) CGO_ENABLED=1 $(GO) test -p 3
OVERALLS := GOPATH=$(GOPATH) CGO_ENABLED=1 overalls
GOVERALLS := goveralls

ARCH := "`uname -s`"
Expand All @@ -41,7 +41,7 @@ default: server buildsucc
buildsucc:
@echo Build TiDB Server successfully!

all: dev update server benchkv
all: dev server benchkv

dev: checklist parserlib test check

Expand Down Expand Up @@ -90,7 +90,7 @@ goword:

errcheck:
go get github.com/kisielk/errcheck
@ GOPATH=$(CURDIR)/vendor:$(GOPATH) errcheck -blank $(PACKAGES) | grep -v "_test\.go" | awk '{print} END{if(NR>0) {exit 1}}'
@ GOPATH=$(GOPATH) errcheck -blank $(PACKAGES) | grep -v "_test\.go" | awk '{print} END{if(NR>0) {exit 1}}'

clean:
$(GO) clean -i ./...
Expand Down Expand Up @@ -135,7 +135,7 @@ tikv_integration_test: parserlib
RACE_FLAG =
ifeq ("$(WITH_RACE)", "1")
RACE_FLAG = -race
GOBUILD = GOPATH=$(CURDIR)/vendor:$(GOPATH) CGO_ENABLED=1 $(GO) build
GOBUILD = GOPATH=$(GOPATH) CGO_ENABLED=1 $(GO) build
endif

server: parserlib
Expand All @@ -155,16 +155,16 @@ benchdb:
$(GOBUILD) -ldflags '$(LDFLAGS)' -o bin/benchdb cmd/benchdb/main.go

update:
which dep >/dev/null || curl -L -s https://github.com/golang/dep/releases/download/v0.3.1/dep-linux-amd64 -o $GOPATH/bin/dep
chmod +x $GOPATH/bin/dep
which dep 2>/dev/null || curl -L -s https://github.com/golang/dep/releases/download/v0.3.2/dep-linux-amd64 -o $(GOPATH)/bin/dep
which dep 2>/dev/null || chmod +x $(GOPATH)/bin/dep
ifdef PKG
dep ensure -add ${PKG}
else
dep ensure -update
endif
@echo "removing test files"
dep ensure
dep prune
bash ./hack/clean_vendor.sh

checklist:
cat checklist.md
Expand Down

0 comments on commit d437692

Please sign in to comment.