Skip to content

Instantly share code, notes, and snippets.

@emersion
Created December 24, 2017 10:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save emersion/8d40b01c7baf5dd15ba2227bc3ed74d6 to your computer and use it in GitHub Desktop.
Save emersion/8d40b01c7baf5dd15ba2227bc3ed74d6 to your computer and use it in GitHub Desktop.
Fuck GOPATH
PKGNAME = github.com/emersion/fuckgopath
GOPATH = $(realpath .go)
PKGPATH = .go/src/$(PKGNAME)
all: fuckgopath
.go:
mkdir -p $(dir $(PKGPATH))
ln -fTrs $(realpath .) $(PKGPATH)
fuckgopath: .go
env GOPATH=$(GOPATH) go build -o $@ ./cmd/$@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment