-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
29 lines (29 loc) · 742 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
GO_BIN_FILES=check_sync.go
#for race CGO_ENABLED=1
#GO_ENV=CGO_ENABLED=1
GO_ENV=CGO_ENABLED=0
#GO_BUILD=go build -ldflags '-s -w' -race
GO_BUILD=go build -ldflags '-s -w'
GO_FMT=gofmt -s -w
GO_LINT=golint -set_exit_status
GO_VET=go vet
GO_IMPORTS=goimports -w
GO_USEDEXPORTS=usedexports
BINARIES=check_sync
all: check ${BINARIES}
check_sync: check_sync.go
${GO_ENV} ${GO_BUILD} -o check_sync check_sync.go
fmt: ${GO_BIN_FILES}
${GO_FMT} ${GO_BIN_FILES}
lint: ${GO_BIN_FILES}
${GO_LINT} ${GO_BIN_FILES}
vet: ${GO_BIN_FILES}
${GO_VET} ${GO_BIN_FILES}
imports: ${GO_BIN_FILES}
${GO_IMPORTS} ${GO_BIN_FILES}
usedexports: ${GO_BIN_FILES}
${GO_USEDEXPORTS} ./...
check: fmt lint imports vet usedexports
clean:
rm -f ${BINARIES}
.PHONY: all