Skip to content

Commit

Permalink
Makefile: Change make server to make, Change make to make dev (pingca…
Browse files Browse the repository at this point in the history
  • Loading branch information
shenli authored Jul 29, 2016
1 parent 470e7c2 commit 7bf53ff
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
bin
/interpreter/interpreter
/interpreter/test
/parser/parser.go
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ FROM golang:1.6
COPY . /go/src/github.com/pingcap/tidb

RUN cd /go/src/github.com/pingcap/tidb && \
make parser && make server && \
mv tidb-server/tidb-server /tidb-server && \
make && \
mv bin/tidb-server /tidb-server && \
make clean

EXPOSE 4000
Expand Down
10 changes: 6 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,11 @@ 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 golex
.PHONY: all build install update parser clean todo test gotest interpreter server goyacc golex dev

all: parser build test check
all: server

dev: parser build test check

build:
rm -rf vendor && ln -s _vendor/vendor vendor
Expand Down Expand Up @@ -132,10 +134,10 @@ interpreter:
server: parser
ifeq ($(TARGET), "")
rm -rf vendor && ln -s _vendor/vendor vendor
@cd tidb-server && $(GO) build -ldflags '$(LDFLAGS)'
$(GO) build -ldflags '$(LDFLAGS)' -o bin/tidb-server tidb-server/main.go
rm -rf vendor
else
rm -rf vendor && ln -s _vendor/vendor vendor
@cd tidb-server && $(GO) build -ldflags '$(LDFLAGS)' -o '$(TARGET)'
$(GO) build -ldflags '$(LDFLAGS)' -o '$(TARGET)' tidb-server/main.go
rm -rf vendor
endif
4 changes: 2 additions & 2 deletions docs/QUICKSTART.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ Press `Ctrl+C` to quit.
#### __Run as MySQL protocol server__

```
make server
cd tidb-server && ./tidb-server
make
cd bin && ./tidb-server
```

In case you want to compile a specific location:
Expand Down

0 comments on commit 7bf53ff

Please sign in to comment.