Skip to content

Commit

Permalink
Merge pull request #130 from insionng/master
Browse files Browse the repository at this point in the history
add make command shell
  • Loading branch information
ngaut committed Sep 15, 2015
2 parents 3946e7e + 86b74f0 commit 3bf5e14
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions make.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
@echo off
::go build option
set TiDBBuildTS=%date:~0,10% %time:~1,7%
for /f "delims=" %%i in ('git rev-parse HEAD') do (set TiDBGitHash=%%i)
set LDFLAGS="-X github.com/pingcap/tidb/util/printer.TiDBBuildTS=%TiDBBuildTS% -X github.com/pingcap/tidb/util/printer.TiDBGitHash=%TiDBGitHash%"

:: godep
go get github.com/tools/godep

@echo [Parser]
go get github.com/qiuyesuifeng/goyacc
go get github.com/qiuyesuifeng/golex
type nul >>temp.XXXXXX & copy temp.XXXXXX +,,
goyacc -o nul -xegen "temp.XXXXXX" parser/parser.y
goyacc -o parser/parser.go -xe "temp.XXXXXX" parser/parser.y
DEL /F /A /Q temp.XXXXXX
DEL /F /A /Q y.output

golex -o parser/scanner.go parser/scanner.l


@echo [Build]
godep go build -ldflags '%LDFLAGS%'

@echo [Install]
godep go install ./...


@echo [Test]
godep go test -cover ./...

::done
@echo [Done]

0 comments on commit 3bf5e14

Please sign in to comment.