From d7bbec76f24b6ce207501fe959da7edebe3fd5bc Mon Sep 17 00:00:00 2001 From: Gregory Neil Shapiro Date: Sun, 24 Feb 2002 02:38:23 +0000 Subject: [PATCH] Make sure we don't remove /etc/mail/sendmail.cf on make clean since this will break a running system during a buildworld. Noticed by: Alexandr Listopad MFC after: 1 week --- etc/sendmail/Makefile | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/etc/sendmail/Makefile b/etc/sendmail/Makefile index 2ff765945fa0..dd87e16bf2f4 100644 --- a/etc/sendmail/Makefile +++ b/etc/sendmail/Makefile @@ -22,7 +22,8 @@ M4FILES!= find ${CFDIR} -type f -name '*.m4' -print ${CFDIR}/m4/cf.m4 ${@:R}.mc) > ${.TARGET} ${CHMOD} ${ROMODE} ${.TARGET} -ALL= freebsd.cf +ALL= freebsd.cf +CLEANFILES+= freebsd.cf # Local SENDMAIL_MC or SENDMAIL_CF may be set in /etc/make.conf. # Warning! If set, this causes 'make install' to always copy it @@ -40,14 +41,21 @@ DEST_CF= ${DESTDIR}/etc/mail/sendmail.cf ALL+= ${INSTALL_CF} +# Make sure we don't remove /etc/mail/sendmail.cf on make clean +# since this will break a running system during a buildworld. +.if defined(INSTALL_CF) +.if ${INSTALL_CF} != ${DEST_CF} +CLEANFILES+= ${INSTALL_CF} +.endif +.endif + # Additional .cf files to build .if defined(SENDMAIL_ADDITIONAL_MC) SENDMAIL_ADDITIONAL_CF= ${SENDMAIL_ADDITIONAL_MC:S/.mc$/.cf/g} ALL+= ${SENDMAIL_ADDITIONAL_CF} +CLEANFILES+= ${SENDMAIL_ADDITIONAL_CF} .endif -CLEANFILES+= ${ALL} - all: ${ALL} depend: