aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Birrell <jb@FreeBSD.org>1998-12-10 05:34:11 +0000
committerJohn Birrell <jb@FreeBSD.org>1998-12-10 05:34:11 +0000
commite151cd19019334ae9caa61483e0bf520d0ad0f0f (patch)
tree06980df971b08a9c112632d4bde72680bd1fd78d
parent4dd5dcaecd4213ae5d43c6816be06b9e15b518fc (diff)
downloadsrc-e151cd19019334ae9caa61483e0bf520d0ad0f0f.tar.gz
src-e151cd19019334ae9caa61483e0bf520d0ad0f0f.zip
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.
Notes
Notes: svn path=/head/; revision=41647
-rw-r--r--etc/Makefile24
1 files changed, 23 insertions, 1 deletions
diff --git a/etc/Makefile b/etc/Makefile
index 3e09565bb76b..e57bb1c796ac 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>