Allows using tilde or relative paths in $PREFIX, while still passing the
correctly expanded Prefix and ShareDir to the Go variables.
Signed-off-by: kt programs <ktprograms@gmail.com>
---
There is a possibility that this will not work on BSD (due to abspath
not being available), but I do not have access to a BSD system to test.
I noticed CI only builds on Alpine, Arch, Debian, and Fedora.
Can we add in one of the BSDs? Not sure if 4 is the limit for
how much you can have in .builds/
Fixed 'Recursive variable 'PREFIX' references itself (eventually)' error
(it didn't show up in my testing because I _had_ declared PREFIX).
Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/Makefile b/Makefile
index 25a3047..ff6648a 100644
--- a/Makefile+++ b/Makefile
@@ -5,6 +5,7 @@
VERSION?=`git describe --long --tags --dirty 2>/dev/null || echo 0.7.1`
VPATH=doc
PREFIX?=/usr/local
+PREFIX:=$(abspath $(PREFIX))
NACK, this will only work with GNU make. I know this it not perfect but
you can do:
make install PREFIX=$HOME/.local
or
make install PREFIX=$PWD/relpath