diff options
author | Adam Spragg <adam@spra.gg> | 2022-03-15 15:40:19 +0000 |
---|---|---|
committer | Adam Spragg <adam@spra.gg> | 2022-03-15 15:40:19 +0000 |
commit | a532b42072fb93b2103ee875e77526408af3854e (patch) | |
tree | 7aa2e238c5dfb25653b97336dee7b9189bd759be /makefile | |
parent | 3b9bb2497e1c809ec3b5f7db40dd32c689e7ac47 (diff) |
Support "DESTDIR=" for "make install" and "make uninstall"
Diffstat (limited to 'makefile')
-rw-r--r-- | makefile | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -1,7 +1,6 @@ PREFIX=/usr/local SBINDIR=$(PREFIX)/sbin -SYSDDIR=$(PREFIX)/lib/systemd/system SED_SHELL:= SED_SHELL+=s:^SBINDIR=.*:SBINDIR=$(SBINDIR):; @@ -20,6 +19,9 @@ all: .PHONY: install +install: DESTDIR=$(PREFIX) +install: SBINDIR=$(DESTDIR)/sbin +install: SYSDDIR=$(DESTDIR)/lib/systemd/system install: install -d '$(SBINDIR)' install -m 755 -t '$(SBINDIR)' adu-download @@ -36,6 +38,9 @@ install: .PHONY: uninstall +uninstall: DESTDIR=$(PREFIX) +uninstall: SBINDIR=$(DESTDIR)/sbin +uninstall: SYSDDIR=$(DESTDIR)/lib/systemd/system uninstall: systemctl --now disable adu-download.timer rm -f '$(SYSDDIR)/system-update.target.wants/adu-upgrade.service' |