summaryrefslogtreecommitdiffstats
path: root/etc/Makefile
diff options
context:
space:
mode:
authorjb <jb@FreeBSD.org>1998-12-10 05:34:11 +0000
committerjb <jb@FreeBSD.org>1998-12-10 05:34:11 +0000
commitb5cf8d2577a9765e858bb8f3e4f26a73f68ee587 (patch)
treef2555131bb5e37070fcc7a4ff1f04717b4548eba /etc/Makefile
parent3e9f8a5d64d6121ee52e602908a9e59084338daf (diff)
downloadFreeBSD-src-b5cf8d2577a9765e858bb8f3e4f26a73f68ee587.zip
FreeBSD-src-b5cf8d2577a9765e858bb8f3e4f26a73f68ee587.tar.gz
Add logic to check if any of the BIN1 files do not already exist in
${DESTDIR}/etc and an install target to install the missing ones. This allows new files like pam.conf to be installed by the first installworld after the file is added, but avoid clobbering files that might be customized. This should save some support questions.
Diffstat (limited to 'etc/Makefile')
-rw-r--r--etc/Makefile24
1 files changed, 23 insertions, 1 deletions
diff --git a/etc/Makefile b/etc/Makefile
index 3e09565..e57bb1c 100644
--- a/etc/Makefile
+++ b/etc/Makefile
@@ -1,5 +1,5 @@
# from: @(#)Makefile 5.11 (Berkeley) 5/21/91
-# $Id: Makefile,v 1.179 1998/10/08 06:12:04 markm Exp $
+# $Id: Makefile,v 1.180 1998/11/20 23:20:00 jdp Exp $
SUBDIR= sendmail
@@ -149,4 +149,26 @@ distrib-dirs:
rm -rf POSIX; \
ln -s C POSIX
+#
+# Check for missing files in ${DESTDIR}/etc.
+#
+_etc_missing=
+.for _f in ${BIN1}
+_g=${_f:T}
+.if !exists(${DESTDIR}/etc/$(_g))
+_etc_missing+=$(_f)
+.endif
+.endfor
+
+#
+# Install only those files which don't exist in the destination
+# directory. This will install new files, but not update existing
+# (possibly customized) files.
+#
+install:
+.if (${_etc_missing} != "")
+ ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${_etc_missing} \
+ ${DESTDIR}/etc
+.endif
+
.include <bsd.prog.mk>
OpenPOWER on IntegriCloud