-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (24 loc) · 868 Bytes
/
Makefile
File metadata and controls
33 lines (24 loc) · 868 Bytes
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
SOURCES = $(shell find ./tracers -name '*.go' )
TRACERS ?= instana basic jaeger lightstep
PLUGINS = $(shell for t in $(TRACERS); do echo build/tracing_$$t.so; done )
CURRENT_VERSION = $(shell git tag | sort -V | tail -n1)
VERSION ?= $(CURRENT_VERSION)
COMMIT_HASH = $(shell git rev-parse --short HEAD)
XGOPATH = $(HOME)/go
default: plugins
plugins: $(PLUGINS) checks
checks: vet fmt tests
tests:
go test -run LoadPlugin
vet: $(SOURCES)
go vet $(shell for t in $(TRACERS); do echo ./tracers/$$t/...; done )
fmt: $(SOURCES)
@if [ "$$(gofmt -d $(SOURCES))" != "" ]; then false; else true; fi
test:
go test -v
$(PLUGINS): $(SOURCES)
mkdir -p build/
MODULE=$(shell basename $@ .so | sed -e 's/tracing_//' ); \
go build -buildmode=plugin -o $@ tracers/$$MODULE/$$MODULE.go
clean:
rm -rf build