1
0
Fork 0
mirror of synced 2024-12-21 06:01:08 -05:00

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
This commit is contained in:
Nicolas stig124 FORMICHELLA 2021-11-25 22:19:53 +01:00
parent 9aaefa60fe
commit 344b740d9b
No known key found for this signature in database
GPG key ID: 273140E170D76BA6

View file

@ -192,9 +192,9 @@ install:
@[ -n "$(PREFIX)" ] || { echo "PREFIX is not set"; exit 1; } @[ -n "$(PREFIX)" ] || { echo "PREFIX is not set"; exit 1; }
@{\ @{\
set -e ;\ set -e ;\
bin="$(PREFIX)/bin" ;\ bin="$(DESTDIR)$(PREFIX)/bin" ;\
doc="$(PREFIX)/share/doc/yadm" ;\ doc="$(DESTDIR)$(PREFIX)/share/doc/yadm" ;\
man="$(PREFIX)/share/man/man1" ;\ man="$(DESTDIR)$(PREFIX)/share/man/man1" ;\
install -d "$$bin" "$$doc" "$$man" ;\ install -d "$$bin" "$$doc" "$$man" ;\
install -m 0755 yadm "$$bin" ;\ install -m 0755 yadm "$$bin" ;\
install -m 0644 yadm.1 "$$man" ;\ install -m 0644 yadm.1 "$$man" ;\