Skip to content

Commit

Permalink
Makefile: able to specify binary location
Browse files Browse the repository at this point in the history
- remove unexpected binary
  • Loading branch information
unknwon committed Sep 17, 2015
1 parent 12b3d40 commit b9078ef
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ GO=godep go
LDFLAGS += -X "github.com/pingcap/tidb/util/printer.TiDBBuildTS=$(shell date -u '+%Y-%m-%d %I:%M:%S')"
LDFLAGS += -X "github.com/pingcap/tidb/util/printer.TiDBGitHash=$(shell git rev-parse HEAD)"

TARGET = ""

.PHONY: godep deps all build install parser clean todo test tidbtest mysqltest gotest interpreter

all: godep parser build test check
Expand Down Expand Up @@ -82,4 +84,8 @@ interpreter:
@cd interpreter && $(GO) build -ldflags '$(LDFLAGS)'

server:
ifeq ($(TARGET), "")
@cd tidb-server && $(GO) build -ldflags '$(LDFLAGS)'
else
@cd tidb-server && $(GO) build -ldflags '$(LDFLAGS)' -o '$(TARGET)'
endif
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ See [USAGE.md](./docs/USAGE.md) for detailed instructions to use TiDB as library
make server
cd tidb-server && ./tidb-server
```

In case you want to compile a specific location:

```
make server TARGET=$GOPATH/bin/tidb-server
```

The default server port is `4000` and can be changed by flag `-P <port>`.

Run `./tidb-server -h` to see more flag options.
Expand Down
Binary file removed tidb-server/tidb-server
Binary file not shown.

0 comments on commit b9078ef

Please sign in to comment.