176bfe4c3SPeter Wemm# @(#)Makefile 8.19 (Berkeley) 1/14/97 29b7a44a6SPeter Wemm# $FreeBSD$ 376bfe4c3SPeter Wemm 476bfe4c3SPeter WemmM4= m4 576bfe4c3SPeter WemmCFDIR= ${.CURDIR}/../../contrib/sendmail/cf 676bfe4c3SPeter WemmCHMOD= chmod 776bfe4c3SPeter WemmROMODE= 444 876bfe4c3SPeter WemmRM= rm -f 976bfe4c3SPeter Wemm 1076bfe4c3SPeter Wemm.SUFFIXES: .mc .cf 1176bfe4c3SPeter Wemm 1276bfe4c3SPeter Wemm.mc.cf: 1376bfe4c3SPeter Wemm $(RM) ${.TARGET} 1476bfe4c3SPeter Wemm (cd ${.CURDIR} && \ 1576bfe4c3SPeter Wemm $(M4) -D_CF_DIR_=${CFDIR}/ ${CFDIR}/m4/cf.m4 ${@:R}.mc) > ${.TARGET} 1676bfe4c3SPeter Wemm $(CHMOD) $(ROMODE) ${.TARGET} 1776bfe4c3SPeter Wemm 1876bfe4c3SPeter WemmALL= freebsd.cf 1976bfe4c3SPeter Wemm 2025219d25SGregory Neil Shapiro# Local SENDMAIL_MC or SENDMAIL_CF may be set in /etc/make.conf. 2125219d25SGregory Neil Shapiro# Warning! If set, this causes 'make install' to always copy it 2225219d25SGregory Neil Shapiro# over /etc/mail/sendmail.cf!!! 2376bfe4c3SPeter Wemm# Caveat emptor! Be sure you want this before you enable it. 2425219d25SGregory Neil Shapiro.if defined(SENDMAIL_MC) 2525219d25SGregory Neil ShapiroINSTALL_CF= ${SENDMAIL_MC:R}.cf 2625219d25SGregory Neil Shapiro.else 2776bfe4c3SPeter Wemm.if defined(SENDMAIL_CF) 2825219d25SGregory Neil ShapiroINSTALL_CF= ${SENDMAIL_CF} 2925219d25SGregory Neil Shapiro.endif 3025219d25SGregory Neil Shapiro.endif 3125219d25SGregory Neil Shapiro 3225219d25SGregory Neil Shapiro.if defined(INSTALL_CF) 3325219d25SGregory Neil ShapiroALL+= ${INSTALL_CF} 3476bfe4c3SPeter Wemm.endif 3576bfe4c3SPeter Wemm 3676bfe4c3SPeter WemmCLEANFILES+=$(ALL) 3776bfe4c3SPeter Wemm 3876bfe4c3SPeter Wemmall: $(ALL) 3976bfe4c3SPeter Wemm 4076bfe4c3SPeter Wemmdepend: 4176bfe4c3SPeter Wemm 4225219d25SGregory Neil Shapiro.if defined(INSTALL_CF) 4325219d25SGregory Neil Shapiroinstall: ${INSTALL_CF} 4425219d25SGregory Neil Shapiro.if (defined(SENDMAIL_MC) && defined(SENDMAIL_CF)) 4525219d25SGregory Neil Shapiro @echo ">>> ERROR: Both SENDMAIL_CF and SENDMAIL_MC can not be set" 4625219d25SGregory Neil Shapiro @false 4725219d25SGregory Neil Shapiro.endif 4825219d25SGregory Neil Shapiro ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 ${INSTALL_CF} \ 498bdd91e3SDavid E. O'Brien ${DESTDIR}/etc/mail/sendmail.cf 5025219d25SGregory Neil Shapiro.else 5125219d25SGregory Neil Shapiroinstall: 5276bfe4c3SPeter Wemm.endif 5376bfe4c3SPeter Wemm 5476bfe4c3SPeter Wemm# Helper for src/etc/Makefile 55e10536edSGregory Neil Shapirodistribution: freebsd.cf freebsd.mc 5625219d25SGregory Neil Shapiro.if (defined(SENDMAIL_MC) && defined(SENDMAIL_CF)) 5725219d25SGregory Neil Shapiro @echo ">>> ERROR: Both SENDMAIL_CF and SENDMAIL_MC can not be set" 5825219d25SGregory Neil Shapiro @false 5925219d25SGregory Neil Shapiro.endif 60e10536edSGregory Neil Shapiro ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/freebsd.mc \ 61e10536edSGregory Neil Shapiro ${DESTDIR}/etc/mail/freebsd.mc 62e10536edSGregory Neil Shapiro ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 freebsd.cf \ 63e10536edSGregory Neil Shapiro ${DESTDIR}/etc/mail/freebsd.cf 6425219d25SGregory Neil Shapiro.if defined(INSTALL_CF) 6525219d25SGregory Neil Shapiro ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 ${INSTALL_CF} \ 6625219d25SGregory Neil Shapiro ${DESTDIR}/etc/mail/sendmail.cf 6725219d25SGregory Neil Shapiro.else 6876bfe4c3SPeter Wemm ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 freebsd.cf \ 698bdd91e3SDavid E. O'Brien ${DESTDIR}/etc/mail/sendmail.cf 7025219d25SGregory Neil Shapiro.endif 71e4e1027aSGregory Neil Shapiro ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \ 72e4e1027aSGregory Neil Shapiro ${DESTDIR}/var/log/sendmail.st 7376bfe4c3SPeter Wemm 7476bfe4c3SPeter Wemm# this is overkill, but.... 7576bfe4c3SPeter WemmM4FILES!= find ${CFDIR} -type f -name '*.m4' -print 7676bfe4c3SPeter Wemm 7776bfe4c3SPeter Wemm$(ALL): $(M4FILES) 7876bfe4c3SPeter Wemm 7976bfe4c3SPeter Wemm.include <bsd.prog.mk> 80