about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Linux.mk5
-rw-r--r--Makefile9
2 files changed, 10 insertions, 4 deletions
diff --git a/Linux.mk b/Linux.mk
index ac69498..0ceea94 100644
--- a/Linux.mk
+++ b/Linux.mk
@@ -3,3 +3,8 @@ LDLIBS = -lcrypt -lpthread
 LDLIBS += ${LIBRESSL_PREFIX}/lib/libtls.a
 LDLIBS += ${LIBRESSL_PREFIX}/lib/libssl.a
 LDLIBS += ${LIBRESSL_PREFIX}/lib/libcrypto.a
+
+MANDIR = ${PREFIX}/share/man
+ETCDIR = /etc
+RCS =
+DIRS =
diff --git a/Makefile b/Makefile
index 265781e..12ae05a 100644
--- a/Makefile
+++ b/Makefile
@@ -45,14 +45,15 @@ install: ${BINS} ${MANS} ${RCS}
 	install -d ${PREFIX}/bin ${MANDIR}/man1 ${ETCDIR}/rc.d
 	install ${BINS} ${PREFIX}/bin
 	install -m 644 ${MANS} ${MANDIR}/man1
-	install ${RCS} ${ETCDIR}/rc.d
-	install -d ${DIRS}
+	if [ -n '${RCS}' ]; then install -d ${ETCDIR}/rc.d; fi
+	if [ -n '${RCS}' ]; then install ${RCS} ${ETCDIR}/rc.d; fi
+	if [ -n '${DIRS}' ]; then install -d ${DIRS}; fi
 
 uninstall:
 	rm -f ${BINS:%=${PREFIX}/bin/%}
 	rm -f ${MANS:%=${MANDIR}/man1/%}
-	rm -f ${RCS:%=${ETCDIR}/%}
-	rmdir ${DIRS}
+	if [ -n '${RCS}' ]; then rm -f ${RCS:%=${ETCDIR}/%}; fi
+	if [ -n '${DIRS}' ]; then rmdir ${DIRS}; fi
 
 localhost.crt:
 	printf "[dn]\nCN=localhost\n[req]\ndistinguished_name=dn\n[EXT]\nsubjectAltName=DNS:localhost\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth" \