summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-07-27 16:00:07 -0400
committerJune McEnroe <june@causal.agency>2019-07-27 16:00:07 -0400
commit2eb8d3abbb7fbe8972c0535446ecfcfadffb3eea (patch)
treebd93a6211c82aff2abcb186b53e220d573bf5917
parentRewrite Makefile once more with more organization (diff)
downloadsrc-2eb8d3abbb7fbe8972c0535446ecfcfadffb3eea.tar.gz
src-2eb8d3abbb7fbe8972c0535446ecfcfadffb3eea.zip
Rewrite port makefiles consistently
Diffstat (limited to '')
-rw-r--r--port/caesar/Makefile15
-rw-r--r--port/cgram/Makefile12
-rw-r--r--port/file2c/Makefile12
3 files changed, 29 insertions, 10 deletions
diff --git a/port/caesar/Makefile b/port/caesar/Makefile
index cf939acb..01205b16 100644
--- a/port/caesar/Makefile
+++ b/port/caesar/Makefile
@@ -1,3 +1,6 @@
+PREFIX = ~/.local
+MANDIR = ${PREFIX}/share/man
+
 LDLIBS = -lm
 
 all: caesar rot13
@@ -6,7 +9,11 @@ clean:
 	rm -f caesar rot13
 
 install: caesar rot13 caesar.6
-	mkdir -p ~/.local/bin ~/.local/share/man/man6
-	cp caesar rot13 ~/.local/bin
-	cp caesar.6 ~/.local/share/man/man6
-	cp caesar.6 ~/.local/share/man/man6/rot13.6
+	install -d ${PREFIX}/bin ${MANDIR}/man6
+	install caesar rot13 ${PREFIX}/bin
+	install -m 644 caesar.6 ${MANDIR}/man6/caesar.6
+	install -m 644 caesar.6 ${MANDIR}/man6/rot13.6
+
+uninstall:
+	rm -f ${PREFIX}/bin/caesar ${PREFIX}/bin/rot13
+	rm -f ${MANDIR}/man6/caesar.6 ${MANDIR}/man6/rot13.6
diff --git a/port/cgram/Makefile b/port/cgram/Makefile
index 1a0b10c1..02f11eec 100644
--- a/port/cgram/Makefile
+++ b/port/cgram/Makefile
@@ -1,3 +1,6 @@
+PREFIX = ~/.local
+MANDIR = ${PREFIX}/share/man
+
 LDLIBS = -lcurses
 
 cgram:
@@ -6,6 +9,9 @@ clean:
 	rm -f cgram
 
 install: cgram cgram.6
-	mkdir -p ~/.local/bin ~/.local/share/man/man6
-	cp cgram ~/.local/bin
-	cp cgram.6 ~/.local/share/man/man6
+	install -d ${PREFIX}/bin ${MANDIR}/man6
+	install cgram ${PREFIX}/bin
+	install -m 644 cgram.6 ${MANDIR}/man6
+
+uninstall:
+	rm -f ${PREFIX}/bin/cgram ${MANDIR}/man6/cgram.6
diff --git a/port/file2c/Makefile b/port/file2c/Makefile
index 5917b82d..09f6b5d0 100644
--- a/port/file2c/Makefile
+++ b/port/file2c/Makefile
@@ -1,9 +1,15 @@
+PREFIX = ~/.local
+MANDIR = ${PREFIX}/share/man
+
 file2c:
 
 clean:
 	rm -f file2c
 
 install: file2c file2c.1
-	mkdir -p ~/.local/bin ~/.local/share/man/man1
-	cp file2c ~/.local/bin
-	cp file2c.1 ~/.local/share/man/man1
+	install -d ${PREFIX}/bin ${MANDIR}/man1
+	install file2c ${PREFIX}/bin
+	install -m 644 file2c.1 ${MANDIR}/man1
+
+uninstall:
+	rm -f ${PREFIX}/bin/file2c ${MANDIR}/man1/file2c.1