summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Makefile11
1 files changed, 11 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index a7ba555..eae91ce 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,5 @@
+PREFIX = /usr/local
+MANDIR = ${PREFIX}/share/man
 LIBS_PREFIX = /usr/local
 
 CFLAGS += -std=c11 -Wall -Wextra -Wpedantic
@@ -7,6 +9,7 @@ LDLIBS = -lsqlite3
 LDLIBS_litterbox = -ltls
 
 BINS = litterbox scoop unscoop
+MANS = ${BINS:=.1}
 
 -include config.mk
 
@@ -24,3 +27,11 @@ tags: *.c *.h
 
 clean:
 	rm -f tags ${BINS} ${BINS:=.o}
+
+install: ${BINS} ${MANS}
+	install -d ${PREFIX}/bin ${MANDIR}/man1
+	install ${BINS} ${PREFIX}/bin
+	for man in ${MANS}; do gzip -c $$man > ${MANDIR}/man1/$$man.gz; done
+
+uninstall:
+	rm -f ${BINS:%=${PREFIX}/bin/%} ${MANS:%=${MANDIR}/man1/%.gz}
relative to the text above it. Not sure if it's worth fixing somehow. 2019-02-17Always split spans after newlinesJune McEnroe Simplifies ANSI and IRC output code, and prepares for line numbered output. 2019-02-15Color format specifiers light cyan in vimJune McEnroe 2019-02-15Highlight Interp as yellowJune McEnroe 2019-02-15Highlight strings in sh command substitutionsJune McEnroe 2019-02-15Add nmap gpJune McEnroe 2019-02-14Avoid newline when copying URL to pasteboardJune McEnroe 2019-02-13Add forgotten "sixth" book of H2G2June McEnroe