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

View file

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