blynn / nex

Lexer for Go
http://cs.stanford.edu/~blynn/nex/
GNU General Public License v3.0
416 stars 47 forks source link

Add a Makefile, update README. #34

Closed dragonsinth closed 8 years ago

dragonsinth commented 8 years ago

I found it somewhat difficult to get things setup correctly to test. If you don't like the ideas here, another possibility is to update the testing doc like so:

GOPATH=`pwd` go build nex.go main.go
GOPATH=`pwd` go test test/nex_test.go 
drewwells commented 8 years ago

Those two lines work without setting GOPATH, if you are setup correctly. Same for the make targets.

go get github.com/blynn/nex will install the library in the correct location for go tools to work. There's more info about GOPATH here: https://github.com/golang/go/wiki/GOPATH

dragonsinth commented 8 years ago

Dunno if it's a go 1.5 thing, but I couldn't get the basic dev cycle to work without setting GOPATH, at least not on a git clone. (go get works just fine). I basically just threw together this Makefile to make the common tasks super easy, and thought I'd share if you were interested. :)