From a7158e1cb22168982083b6df5d3eca2b9c6a973e Mon Sep 17 00:00:00 2001 From: Justin Cormack Date: Mon, 30 Oct 2017 14:39:59 +0000 Subject: [PATCH] Add a build target which works when GOPATH is not set or correct Getting Homebrew to work with a GOPATH is horrible... Signed-off-by: Justin Cormack --- Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c62dc7cde..9c5487544 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,14 @@ dist/moby dist/moby-$(GOOS): $(DEPS) --ldflags "-X main.GitCommit=$(GIT_COMMIT) -X main.Version=$(VERSION)" \ -o $@ ./cmd/moby +.PHONY: nogopath +nogopath: + rm -rf src/github.com + mkdir -p src/github.com/moby + ln -s $(CURDIR) $(CURDIR)/src/github.com/moby/tool + cd src/github.com/moby/tool && GOPATH=$(CURDIR) $(MAKE) dist/moby + rm -rf src/github.com + .PHONY: lint lint: ifndef GOMETALINTER @@ -35,4 +43,4 @@ install: dist/moby .PHONY: clean clean: - rm -rf dist + rm -rf dist src/github.com