aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Riedstra <mitch@riedstra.dev>2026-01-18 14:04:32 +0000
committerMitchell Riedstra <mitch@riedstra.dev>2026-01-18 14:15:42 +0000
commit69d46e02c9a669bad895b79405043d2f6bf66365 (patch)
treef4bcd4042034582314ace8ff00f8053d60839a19
parent4d904b84fbfbaf753122db3dc173a9bbcd971c28 (diff)
downloaddpw-master.tar.gz
dpw-master.tar.xz
Allow DESTDIR to be specified in the makefileHEADv0.1master
-rw-r--r--Makefile14
1 files changed, 8 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index baffd11..56607f7 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,4 @@
+DESTDIR ?= /
PREFIX ?= /usr/local
all:
@@ -6,11 +7,12 @@ all:
@echo " uninstall"
install:
- install -m 755 dpw $(PREFIX)/bin/dpw
- install -m 755 dpw-gpg $(PREFIX)/bin/dpw-gpg
- install -m 755 dpw-age $(PREFIX)/bin/dpw-age
- install -m 755 dpw-menu $(PREFIX)/bin/dpw-menu
+ install -m 755 -D dpw $(DESTDIR)/$(PREFIX)/bin/dpw
+ install -m 755 -D dpw-gpg $(DESTDIR)/$(PREFIX)/bin/dpw-gpg
+ install -m 755 -D dpw-age $(DESTDIR)/$(PREFIX)/bin/dpw-age
+ install -m 755 -D dpw-menu $(DESTDIR)/$(PREFIX)/bin/dpw-menu
uninstall:
- rm "$(PREFIX)/bin/dpw" "$(PREFIX)/bin/dpw-gpg" "$(PREFIX)/bin/dpw-menu" \
- "$(PREFIX)/bin/dpw-menu"
+ rm "$(DESTDIR)/$(PREFIX)/bin/dpw" "$(DESTDIR)/$(PREFIX)/bin/dpw-gpg" \
+ "$(DESTDIR)/$(PREFIX)/bin/dpw-age" \
+ "$(DESTDIR)/$(PREFIX)/bin/dpw-menu"