summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorStefan Kreutz <mail@skreutz.com>2022-11-09 10:08:05 +0100
committerStefan Kreutz <mail@skreutz.com>2022-11-09 10:08:05 +0100
commit6f7a63b3b60a8094324c89d14606af26e2d417df (patch)
treef482764bf25e01b79806833508722dbfc08f2ed7 /Makefile
parentac13cb90143bee033a396acc3524c761a58bec10 (diff)
downloadtemp-postgres-6f7a63b3b60a8094324c89d14606af26e2d417df.tar
Port to GNU/Linuxtemp-postgres-0.2.0
Tested on Void Linux x86_64 glibc.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile36
1 files changed, 29 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 331966a..b28ae64 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,31 @@
-MAN= temp-postgres.1
-BINDIR= /usr/local/bin
-MANDIR= /usr/local/man/man
+# Portable makefile supporting OpenBSD and GNU/Linux.
-beforeinstall:
- ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
- ${.CURDIR}/temp-postgres.sh ${DESTDIR}${BINDIR}/temp-postgres
+PREFIX = /usr/local
+INSTALL = install
+BINDIR = bin
+BINOWN = root
+BINGRP = root
+BINMODE = 555
+MANDIR = man/man
+MANOWN = root
+MANGRP = root
+MANMODE = 444
-.include <bsd.prog.mk>
+include config.mk
+
+all:
+
+clean:
+
+lint:
+ shellcheck -a temp-postgres.sh
+ mandoc -T lint -W warning temp-postgres.1
+ -mandoc -T lint -W all temp-postgres.1
+
+install:
+ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} temp-postgres.sh ${DESTDIR}${PREFIX}/${BINDIR}/temp-postgres
+ ${INSTALL} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} temp-postgres.1 ${DESTDIR}${PREFIX}/${MANDIR}1/temp-postgres.1
+
+uninstall:
+ rm -f ${DESTDIR}${PREFIX}/${BINDIR}/temp-postgres
+ rm -f ${DESTDIR}${PREFIX}/${MANDIR}1/temp-postgres.1
Generated by cgit. See skreutz.com for my tech blog and contact information.