Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (41 loc) · 1.44 KB
/
Copy pathMakefile
File metadata and controls
48 lines (41 loc) · 1.44 KB
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
SHELL := /bin/bash
PROTO_DIR := pkg/tpackmodel/proto
GO_OUT := pkg/tpackmodel/proto
.PHONY: proto-gen build test clean tidy
proto-gen:
# tpack.proto → Go
protoc \
--go_out=$(GO_OUT) --go_opt=paths=source_relative \
-I $(PROTO_DIR) \
$(PROTO_DIR)/tpack.proto
# model_service.proto → Go
protoc \
--go_out=$(PROTO_DIR) --go_opt=paths=source_relative \
--go-grpc_out=$(PROTO_DIR) --go-grpc_opt=paths=source_relative \
-I $(PROTO_DIR) \
$(PROTO_DIR)/model_service.proto
tidy:
cd pkg/tpackmodel && go mod tidy
cd exporter/tpackexporter && go mod tidy
cd receiver/tpackreceiver && go mod tidy
cd cmd/otelcol-tpack && go mod tidy
cd cmd/tpack-eval && go mod tidy
# `build` deliberately does not depend on `tidy`: `go mod tidy` needs network
# access and rewrites go.mod/go.sum, which would leave a fresh checkout dirty.
# Run `make tidy` explicitly when adding or removing dependencies.
build:
cd pkg/tpackmodel && go build ./...
cd exporter/tpackexporter && go build ./...
cd receiver/tpackreceiver && go build ./...
cd cmd/tpack-eval && go build ./...
test:
cd pkg/tpackmodel && go test -v -count=1 ./...
cd exporter/tpackexporter && go test -v -count=1 ./...
cd receiver/tpackreceiver && go test -v -count=1 ./...
cd cmd/tpack-eval && go test -v -count=1 ./...
clean:
rm -f $(GO_OUT)/*.pb.go
cd pkg/tpackmodel && go clean
cd exporter/tpackexporter && go clean
cd receiver/tpackreceiver && go clean
cd cmd/tpack-eval && go clean