aboutsummaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'makefile')
-rw-r--r--makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/makefile b/makefile
index b128988..c8ff8f2 100644
--- a/makefile
+++ b/makefile
@@ -1,5 +1,7 @@
PREFIX=/usr/local
+include prefix.mk
+
SBINDIR=$(PREFIX)/sbin
SED_SHELL:=
@@ -10,7 +12,7 @@ SED_SYSD+=s:^ExecStart=.*/\([^/]\+\)$$:ExecStart=$(SBINDIR)/\1:;
.PHONY: all
-all:
+all: prefix.mk
sed -i -e '$(SED_SHELL)' adu-download
sed -i -e '$(SED_SHELL)' adu-upgrade
sed -i -e '$(SED_SYSD)' adu-download.service
@@ -51,3 +53,7 @@ uninstall:
rm -f '$(SBINDIR)/adu-download'
systemctl daemon-reload
+
+.PHONY: prefix.mk
+prefix.mk:
+ @echo 'PREFIX=$(PREFIX)' >$@