From 1c9c88786486a9d99b5365e65dfa370c6ccee0b6 Mon Sep 17 00:00:00 2001 From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Tue, 6 Oct 2020 01:40:30 +0200 Subject: [PATCH] Avoid install's -D flag to create directories The -D flag is not supported by all install implementations. For example, it is not present in FreeBSD's versions of install. Let's use mkdir instead. --- Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index bec0b3a..d57f0d4 100644 --- a/Makefile +++ b/Makefile @@ -33,9 +33,12 @@ ${TARBALL}: rm -rf ${DIST_DIR} install: - install -D tenshi ${DESTDIR}${bindir}/tenshi - [ -f ${DESTDIR}${sysconfdir}/tenshi/tenshi.conf ] || \ - install -g root -m 0644 -D tenshi.conf ${DESTDIR}${sysconfdir}/tenshi/tenshi.conf + mkdir -p ${DESTDIR}${bindir} + install tenshi ${DESTDIR}${bindir}/tenshi + if [ ! -f ${DESTDIR}${sysconfdir}/tenshi/tenshi.conf ]; then \ + mkdir -p ${DESTDIR}${sysconfdir}/tenshi && \ + install -g root -m 0644 tenshi.conf ${DESTDIR}${sysconfdir}/tenshi/tenshi.conf; \ + fi install -d ${DESTDIR}${docdir} install -m 0644 ${DOCS} ${DESTDIR}${docdir}/ [ -d ${DESTDIR}${mandir}/man8 ] || \