forked from bookingcom/carbonapi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
50 lines (34 loc) · 975 Bytes
/
Copy pathMakefile
File metadata and controls
50 lines (34 loc) · 975 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
PKGCONF = PKG_CONFIG_PATH="/opt/X11/lib/pkgconfig"
else
PKGCONF =
endif
GO ?= go
VERSION ?= $(shell git rev-parse --short HEAD)
PKG_CARBONAPI=github.com/bookingcom/carbonapi/cmd/carbonapi
PKG_CARBONZIPPER=github.com/bookingcom/carbonapi/cmd/carbonzipper
GCFLAGS :=
debug: GCFLAGS += -gcflags=all='-l -N'
LDFLAGS = -ldflags '-X main.BuildVersion=$(VERSION)'
TAGS := -tags cairo
nocairo: TAGS =
### Targets ###
all: build
nocairo: build
.PHONY: debug
debug: build
build:
$(PKGCONF) $(GO) build -mod vendor $(TAGS) $(LDFLAGS) $(GCFLAGS) $(PKG_CARBONAPI)
$(PKGCONF) $(GO) build -mod vendor $(TAGS) $(LDFLAGS) $(GCFLAGS) $(PKG_CARBONZIPPER)
vet:
go vet -composites=false ./...
lint:
golangci-lint run
check: test vet
test:
$(PKGCONF) $(GO) test ./... -v -race -coverprofile=coverage.txt -covermode=atomic
clean:
rm -f carbonapi carbonzipper
authors:
git log --format="%an" | sort | uniq > AUTHORS.txt