Refactor makefile so that it can be used piecewise.

This is motivated by my efforts to build a debian package.

You're assuming that the go tree is installed in the place where it was
compiled.  For the CI systems this is going to be incorrect, since we're
pulling down a copy to the local working directory.  $GOROOT exists for
doing stuff like this.

That said, I've updated it to set $GO based on another variable if $GOROOT
is not set.





On Thu, Oct 16, 2014 at 10:11 AM, Peter Bourgon <notifications@github.com>
wrote:

> In Makefile:
>
> > @@ -1,33 +1,41 @@
> > -GOOS     := $(shell go env GOOS)
> > -GOARCH   := $(shell go env GOARCH)
> > +.PHONY: default clean build test archive dep
> > +
> > +GO := $(GOROOT)/bin/go
>
> $GOROOT is typically baked into the Go binary and not explicitly set. If
> it's set on your laptop, you're probably misconfigured. What's your go env
> ?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/soundcloud/harpoon/pull/94/files#r18942494>.
>



-- 
- Jeff Younker - jmy@soundcloud.com - +49 (0) 171 5641365 -