Skip to content

Commit

Permalink
*: vendor tool migrate to glide (pingcap#1743)
Browse files Browse the repository at this point in the history
* *: vendor tool migrate to glide
* update github.com/gogo/protobuf vendor
* update several packages
  • Loading branch information
tiancaiamao authored Sep 21, 2016
1 parent 3afc26d commit c4e008a
Show file tree
Hide file tree
Showing 391 changed files with 110,815 additions and 15,536 deletions.
24 changes: 18 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ LDFLAGS += -X "github.com/pingcap/tidb/util/printer.TiDBGitHash=$(shell git rev-

TARGET = ""

.PHONY: all build install update parser clean todo test gotest interpreter server goyacc dev benchkv
.PHONY: all build install update parser clean todo test gotest interpreter server dev benchkv check

default: server buildsucc

Expand All @@ -45,11 +45,10 @@ TEMP_FILE = temp_parser_file

goyacc:
rm -rf vendor && ln -s _vendor/vendor vendor
$(GO) build -o bin/goyacc github.com/pingcap/tidb/parser/goyacc
$(GO) build -o bin/goyacc parser/goyacc/main.go
rm -rf vendor

parser: goyacc
rm -rf parser/scanner.go
bin/goyacc -o /dev/null -xegen $(TEMP_FILE) parser/parser.y
bin/goyacc -o parser/parser.go -xe $(TEMP_FILE) parser/parser.y 2>&1 | egrep "(shift|reduce)/reduce" | awk '{print} END {if (NR > 0) {print "Find conflict in parser.y. Please check y.output for more information."; system("rm -f $(TEMP_FILE)"); exit 1;}}'
rm -f $(TEMP_FILE)
Expand Down Expand Up @@ -122,7 +121,7 @@ interpreter:
@cd interpreter && $(GO) build -ldflags '$(LDFLAGS)'
rm -rf vendor

server: parser
server: parser
ifeq ($(TARGET), "")
rm -rf vendor && ln -s _vendor/vendor vendor
$(GO) build -ldflags '$(LDFLAGS)' -o bin/tidb-server tidb-server/main.go
Expand All @@ -133,9 +132,22 @@ else
rm -rf vendor
endif

benchkv:
benchkv:
rm -rf vendor && ln -s _vendor/vendor vendor
$(GO) build -ldflags '$(LDFLAGS)' -o bin/benchkv benchkv/main.go
rm -rf vendor


update:
which glide >/dev/null || curl https://glide.sh/get | sh
which glide-vc || go get -v -u github.com/sgotti/glide-vc
rm -r vendor && mv _vendor/vendor vendor || true
rm -rf _vendor
ifdef PKG
glide get -s -v --skip-test ${PKG}
else
glide update -s -v --skip-test
endif
@echo "removing test files"
glide vc --only-code --no-tests
mkdir -p _vendor
mv vendor _vendor/vendor
Loading

0 comments on commit c4e008a

Please sign in to comment.