summary refs log tree commit diff
path: root/bin
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2021-02-10 17:38:33 -0500
committerJune McEnroe <june@causal.agency>2021-02-10 17:38:33 -0500
commit27a93eddafd39c6be2a61d7ff553700c5857f768 (patch)
treeb95540d57f2b29568c440f5af54b674af74da8fe /bin
parentColour battery level red when critical (diff)
downloadsrc-27a93eddafd39c6be2a61d7ff553700c5857f768.tar.gz
src-27a93eddafd39c6be2a61d7ff553700c5857f768.zip
Add install targets to bin
Motivated by OpenBSD's default rules not setting copied shell scripts
executable. install(1) does.
Diffstat (limited to '')
-rw-r--r--bin/Makefile29
1 files changed, 29 insertions, 0 deletions
diff --git a/bin/Makefile b/bin/Makefile
index 11e73078..42165827 100644
--- a/bin/Makefile
+++ b/bin/Makefile
@@ -51,6 +51,11 @@ BINS_LINUX += psfed
 BINS_TLS += relay
 
 BINS_ALL = ${BINS} ${BINS_BSD} ${BINS_LINUX} ${BINS_TLS}
+
+MANS = ${BINS:%=man1/%.1}
+MANS_BSD = ${BINS_BSD:%=man1/%.1}
+MANS_LINUX = ${BINS_LINUX:%=man1/%.1}
+MANS_TLS = ${BINS_TLS:%=man1/%.1}
 MANS_ALL = ${BINS_ALL:%=man1/%.1}
 
 any: meta ${BINS}
@@ -117,6 +122,30 @@ unlink:
 	rm -f ${BINS_ALL:%=${PREFIX}/bin/%}
 	rm -f ${MANS_ALL:%=${MANDIR}/%}
 
+install: ${BINS} ${MANS}
+	install -d ${PREFIX}/bin ${MANDIR}/man1
+	install ${BINS} ${PREFIX}/bin
+	install -m 644 ${MANS} ${MANDIR}/man1
+
+install-bsd: ${BINS_BSD} ${MANS_BSD}
+	install -d ${PREFIX}/bin ${MANDIR}/man1
+	install ${BINS_BSD} ${PREFIX}/bin
+	install -m 644 ${MANS_BSD} ${MANDIR}/man1
+
+install-linux: ${BINS_LINUX} ${MANS_BSD}
+	install -d ${PREFIX}/bin ${MANDIR}/man1
+	install ${BINS_LINUX} ${PREFIX}/bin
+	install -m 644 ${MANS_LINUX} ${MANDIR}/man1
+
+install-tls: ${BINS_TLS} ${MANS_BSD}
+	install -d ${PREFIX}/bin ${MANDIR}/man1
+	install ${BINS_TLS} ${PREFIX}/bin
+	install -m 644 ${MANS_TLS} ${MANDIR}/man1
+
+uninstall:
+	rm -f ${BINS_ALL:%=${PREFIX}/bin/%}
+	rm -f ${MANS_ALL:%=${MANDIR}/%}
+
 HTMLS = index.html ${BINS_ALL:=.html} png.html
 WEBROOT = /usr/local/www/causal.agency