forked from twitchtv/twirp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
51 lines (36 loc) · 1.39 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
RETOOL=$(CURDIR)/_tools/bin/retool
PATH := ${PWD}/bin:${PWD}/ENV/bin:${PATH}
.DEFAULT_GOAL := all
all: setup test_all
.PHONY: test test_all test_core test_clients test_go_client test_python_client generate
# Phony commands:
generate:
PATH=$(CURDIR)/_tools/bin:$(PATH) GOBIN="${PWD}/bin" go install -v ./protoc-gen-...
$(RETOOL) do go generate ./...
test_all: setup test_core test_clients
test_core: generate
$(RETOOL) do errcheck -blank ./internal/twirptest
go test -race $(shell go list ./... | grep -v /vendor/ | grep -v /_tools/)
test_clients: test_go_client test_python_client
test_go_client: generate build/clientcompat build/gocompat
./build/clientcompat -client ./build/gocompat
test_python_client: generate build/clientcompat build/pycompat
./build/clientcompat -client ./build/pycompat
setup:
./install_proto.bash
GOPATH=$(CURDIR)/_tools go install github.com/twitchtv/retool/...
$(RETOOL) build
# Actual files for testing clients:
./build:
mkdir build
./build/gocompat: ./build
go build -o build/gocompat ./clientcompat/gocompat
./build/clientcompat: ./build
go build -o build/clientcompat ./clientcompat
./build/venv: ./build
virtualenv ./build/venv
./build/venv/bin/pycompat.py: ./build/venv
./build/venv/bin/pip install --upgrade ./clientcompat/pycompat
./build/pycompat: ./build/venv/bin/pycompat.py
cp ./clientcompat/pycompat/pycompat.sh ./build/pycompat
chmod +x ./build/pycompat