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.
This commit is contained in:
jb 1998-12-10 05:34:11 +00:00
parent 3e9f8a5d64
commit b5cf8d2577

View File

@ -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>