Skip to content

Commit 7a6770e

Browse files
authored
Makefile: use variable for Go (#120)
1 parent c5cf84a commit 7a6770e

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

Makefile

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
11
.PHONY: all build test tidy clean
22

3+
GO := go
4+
35
default: build
46

57
build:
6-
go build -o mysql-tester ./src
8+
$(GO) build -o mysql-tester ./src
79

810
debug:
9-
go build -gcflags="all=-N -l" -o mysql-tester ./src
11+
$(GO) build -gcflags="all=-N -l" -o mysql-tester ./src
1012

1113
test: build
12-
go test -cover ./...
14+
$(GO) test -cover ./...
1315
#./mysql-tester -check-error
1416

1517
tidy:
16-
go mod tidy
18+
$(GO) mod tidy
1719

1820
clean:
19-
go clean -i ./...
21+
$(GO) clean -i ./...
2022
rm -rf mysql-tester
2123

2224
gen_perror: generate_perror/main.go
23-
go build -o gen_perror ./generate_perror
25+
$(GO) build -o gen_perror ./generate_perror

0 commit comments

Comments
 (0)