From 21f4a5f1da9a75df05d1c90f00efee1ce0245256 Mon Sep 17 00:00:00 2001 From: Stephen Smith Date: Wed, 28 Oct 2020 14:11:37 -0400 Subject: [PATCH] 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. --- Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index c0917e5..a0f7a15 100644 --- a/Makefile +++ b/Makefile @@ -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 @@ -56,4 +56,4 @@ help: Makefile @echo " Choose a command run in "$(PROJECTNAME)":" @echo @sed -n 's/^##//p' $< | column -t -s ':' | sed -e 's/^/ /' - @echo \ No newline at end of file + @echo