forked from CodisLabs/codis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (27 loc) · 932 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
all: build
build: build-version godep build-proxy build-config build-server
godep:
@go get -u github.com/tools/godep
GO15VENDOREXPERIMENT=0 GOPATH=`godep path` godep restore
build-version:
@bash genver.sh
build-proxy:
GOPATH=`godep path`:$$GOPATH go build -o bin/codis-proxy ./cmd/proxy
build-config:
GOPATH=`godep path`:$$GOPATH go build -o bin/codis-config ./cmd/cconfig
@rm -rf bin/assets && cp -r cmd/cconfig/assets bin/
build-server:
@mkdir -p bin
make -j4 -C extern/redis-2.8.21/
@rm -f bin/codis-server
@cp -f extern/redis-2.8.21/src/redis-server bin/codis-server
clean:
@rm -rf bin
@rm -f *.rdb *.out *.log *.dump deploy.tar
@rm -f extern/Dockerfile
@rm -f sample/log/*.log sample/nohup.out
@if [ -d test ]; then cd test && rm -f *.out *.log *.rdb; fi
distclean: clean
@make --no-print-directory --quiet -C extern/redis-2.8.21 clean
gotest:
GOPATH=`godep path`:$$GOPATH go test ./pkg/... ./cmd/...