-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
45 lines (34 loc) · 915 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Go parameters
GOBUILD=go build
GOTEST=gotest
BIN=gosk
NASK=wine nask.exe
KILL_DEAD_CODE = find . -type f -name "*.go" -exec sed -i -E '/^\s*\/\/.*(remove|delete|unnecessary|dead code|no longer needed)/Id' {} +
.PHONY: all test gen
all: build test
build: dep gen
go build ./...
$(GOBUILD) -v -o $(BIN) ./cmd/gosk
test:
go install -v github.com/rakyll/gotest@latest
$(GOTEST) -v ./...
clean:
go clean
run: build
./$(BIN)
gen:
go generate ./...
fmt:
$(KILL_DEAD_CODE)
go fmt ./...
dep:
go install -v github.com/mna/pigeon@latest
go install -v github.com/Bin-Huang/newc@latest
go install -v github.com/dmarkham/enumer@latest
go mod download
go mod tidy
tool:
go install -v golang.org/x/tools/gopls@latest
go install -v github.com/go-delve/delve/cmd/dlv@latest
go install -v github.com/awalterschulze/goderive@latest
go install -v github.com/hairyhenderson/gomplate/v3/cmd/gomplate@latest