ostap / comp

a tool for querying files in various formats
MIT License
43 stars 2 forks source link

Building the tool #38

Open soveran opened 8 years ago

soveran commented 8 years ago

I'm using this makefile:

y.output:
    go tool yacc -o src/comp/y.go -p "comp_" src/comp/grammar.y

test: comp
    go test comp

comp: y.output
    go build ./src/comp

I think it may be useful to have it in the repo. Regardless, I think the go build ./src/comp step is missing in the README. I can submit a pull request either for adding that step to the README, or to provide a makefile with the corresponding modifications to the README.

ostap commented 8 years ago

It has been a while since I last looked at it. From what I understand, go tools evolved and the whole step of changing the GOPATH can be eliminated. This, however, involves changing the commands above:

$ echo $GOPATH
/home/ostap/gopath
$ pwd
/home/ostap/comp
$ go tool yacc -o src/comp/y.go -p "comp_" src/comp/grammar.y
$ go build -o comp src/comp/*.go
$ go test src/comp/*.go

I will gladly accept a pull request with the Makefile and a README update.

soveran commented 8 years ago

The tests don't pass for me, but I will send you the PR anyway so you can check what could be happening.

ostap commented 8 years ago

Indeed. It is related to #26. I temporarily disabled the tests which reproduce the issue.