From 643ac6a4815af8bd2dd06c12d3feed492b64c327 Mon Sep 17 00:00:00 2001 From: Adam Spragg Date: Thu, 17 Mar 2022 15:32:01 +0000 Subject: Do not notify systemd if `DESTDIR` differs from `PREFIX` And document it, along with other installation instructions. --- makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'makefile') diff --git a/makefile b/makefile index 3704027..a6dcfd6 100644 --- a/makefile +++ b/makefile @@ -34,9 +34,9 @@ install: install -m 644 -t '$(SYSDDIR)' adu-download.timer install -m 644 -t '$(SYSDDIR)' adu-upgrade.service ln -sf '$(SYSDDIR)/adu-upgrade.service' '$(SYSDDIR)/system-update.target.wants/adu-upgrade.service' - systemctl daemon-reload - #systemctl --now preset adu-download.timer - systemctl --now enable adu-download.timer + [ x'$(DESTDIR)' != x'$(PREFIX)' ] || systemctl daemon-reload + #[ x'$(DESTDIR)' != x'$(PREFIX)' ] || systemctl --now preset adu-download.timer + [ x'$(DESTDIR)' != x'$(PREFIX)' ] || systemctl --now enable adu-download.timer .PHONY: uninstall @@ -44,14 +44,14 @@ uninstall: DESTDIR=$(PREFIX) uninstall: SBINDIR=$(DESTDIR)/sbin uninstall: SYSDDIR=$(DESTDIR)/lib/systemd/system uninstall: - systemctl --now disable adu-download.timer + [ x'$(DESTDIR)' != x'$(PREFIX)' ] || systemctl --now disable adu-download.timer rm -f '$(SYSDDIR)/system-update.target.wants/adu-upgrade.service' rm -f '$(SYSDDIR)/adu-upgrade.service' rm -f '$(SYSDDIR)/adu-download.timer' rm -f '$(SYSDDIR)/adu-download.service' rm -f '$(SBINDIR)/adu-upgrade' rm -f '$(SBINDIR)/adu-download' - systemctl daemon-reload + [ x'$(DESTDIR)' != x'$(PREFIX)' ] || systemctl daemon-reload .PHONY: clean -- cgit v1.2.1