From 344b740d9b59ee55a7adbca2ff500c21161be28b Mon Sep 17 00:00:00 2001 From: Nicolas stig124 FORMICHELLA Date: Thu, 25 Nov 2021 22:19:53 +0100 Subject: [PATCH] Fix Makefile portability OBS *among others* need to copy files from the build folder to the package folder. With the old version, that wasn't possible, as it would try to install the software in the worker folder, of course something denied on public instances. Adding $(DESTDIR) before all paths ensure that you can install to another folder --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index d9020f9..3bae5e8 100644 --- a/Makefile +++ b/Makefile @@ -192,9 +192,9 @@ install: @[ -n "$(PREFIX)" ] || { echo "PREFIX is not set"; exit 1; } @{\ set -e ;\ - bin="$(PREFIX)/bin" ;\ - doc="$(PREFIX)/share/doc/yadm" ;\ - man="$(PREFIX)/share/man/man1" ;\ + bin="$(DESTDIR)$(PREFIX)/bin" ;\ + doc="$(DESTDIR)$(PREFIX)/share/doc/yadm" ;\ + man="$(DESTDIR)$(PREFIX)/share/man/man1" ;\ install -d "$$bin" "$$doc" "$$man" ;\ install -m 0755 yadm "$$bin" ;\ install -m 0644 yadm.1 "$$man" ;\