fix: Don't clobber gopath except for the target that uses the var (#11)

It seems to me that setting gopath would be undesirable since most people should have it set from setting up golang. This just moves those vars into go-compile so that it doesn't bother those who are just building a binary. It might be better to have it only set GOPATH if unset, or move it to .bashrc and friends.
This commit is contained in:
Stephen Smith 2020-10-28 14:11:37 -04:00 committed by GitHub
parent 16ad7d6f3e
commit 21f4a5f1da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,10 +10,6 @@ LDFLAGS=-X=main.Version=$(VERSION) -X=main.Build=$(BUILD) -linkmode external
# Make is verbose in Linux. Make it silent.
MAKEFLAGS += --silent
GOPATH=~/go
ORGPATH=$(GOPATH)/src/github.com/distribyted
REPOPATH=$(ORGPATH)/distribyted
## run: run from code.
run:
go run cmd/distribyted/main.go examples/conf_example.yaml
@ -36,6 +32,10 @@ go-generate:
go generate ./...
go-compile:
GOPATH=~/go
ORGPATH=$(GOPATH)/src/github.com/distribyted
REPOPATH=$(ORGPATH)/distribyted
@echo " > Compiling for several platforms..."
go install src.techknowlogick.com/xgo
docker build ./build_tools/ -t distribyted/xgo-cgofuse