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:
John Birrell 1998-12-10 05:34:11 +00:00
parent 4dd5dcaecd
commit e151cd1901
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=41647

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>