Make Makefile more POSIXly portable

This breaks out of tree builds though
This commit is contained in:
Drew DeVault 2018-02-13 23:06:37 -05:00
parent 25f21b55bd
commit 18493180bd
1 changed files with 2 additions and 2 deletions

View File

@ -1,13 +1,13 @@
PKGNAME = git.sr.ht/~sircmpwn/aerc2
GOPATH = $(realpath .go)
GOPATH = $(shell pwd)/.go
PKGPATH = .go/src/$(PKGNAME)
all: aerc
.go:
mkdir -p $(dir $(PKGPATH))
ln -fTrs $(realpath .) $(PKGPATH)
ln -fs $(shell dirname $(GOPATH)) $(PKGPATH)
get: .go
env GOPATH=$(GOPATH) go get -d ./...