Skip to content

Commit

Permalink
[parser] Makefile: fix 'make test' (pingcap#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
tiancaiamao authored and xhebox committed Oct 8, 2021
1 parent d3e957e commit be8dfaa
Show file tree
Hide file tree
Showing 4 changed files with 272 additions and 3 deletions.
5 changes: 4 additions & 1 deletion parser/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ LINUX:="Linux"

all: parser.go

test: parser.go
GO111MODULE=on go test ./...

parser.go: parser.y
make parser

Expand All @@ -26,7 +29,7 @@ parser: bin/goyacc
@awk 'BEGIN{print "// Code generated by goyacc DO NOT EDIT."} {print $0}' parser.go > tmp_parser.go && mv tmp_parser.go parser.go;

bin/goyacc: goyacc/main.go
go build -o bin/goyacc goyacc/main.go
GO111MODULE=on go build -o bin/goyacc goyacc/main.go

clean:
go clean -i ./...
Expand Down
16 changes: 16 additions & 0 deletions parser/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module github.com/pingcap/parser

require (
github.com/cznic/mathutil v0.0.0-20181021201202-eba54fb065b7
github.com/cznic/parser v0.0.0-20160622100904-31edd927e5b1
github.com/cznic/sortutil v0.0.0-20150617083342-4c7342852e65
github.com/cznic/strutil v0.0.0-20171016134553-529a34b1c186
github.com/cznic/y v0.0.0-20170802143616-045f81c6662a
github.com/pingcap/check v0.0.0-20171206051426-1c287c953996
github.com/pingcap/errors v0.11.0
github.com/pingcap/tidb v0.0.0-20181105182855-379ee5b1915a
github.com/pingcap/tipb v0.0.0-20181012112600-11e33c750323
github.com/sirupsen/logrus v1.2.0
golang.org/x/net v0.0.0-20181029044818-c44066c5c816
golang.org/x/text v0.3.0
)
Loading

0 comments on commit be8dfaa

Please sign in to comment.