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 36e6c77250SGregory Neil Shapiro# Additional .cf files to build 37e6c77250SGregory Neil Shapiro.if defined(SENDMAIL_ADDITIONAL_MC) 38e6c77250SGregory Neil ShapiroALL+= ${SENDMAIL_ADDITIONAL_MC:S/.mc$/.cf/g} 39e6c77250SGregory Neil Shapiro.endif 40e6c77250SGregory Neil Shapiro 4176bfe4c3SPeter WemmCLEANFILES+=$(ALL) 4276bfe4c3SPeter Wemm 4376bfe4c3SPeter Wemmall: $(ALL) 4476bfe4c3SPeter Wemm 4576bfe4c3SPeter Wemmdepend: 4676bfe4c3SPeter Wemm 4725219d25SGregory Neil Shapiro.if defined(INSTALL_CF) 4825219d25SGregory Neil Shapiroinstall: ${INSTALL_CF} 4925219d25SGregory Neil Shapiro.if (defined(SENDMAIL_MC) && defined(SENDMAIL_CF)) 5025219d25SGregory Neil Shapiro @echo ">>> ERROR: Both SENDMAIL_CF and SENDMAIL_MC can not be set" 5125219d25SGregory Neil Shapiro @false 5225219d25SGregory Neil Shapiro.endif 5325219d25SGregory Neil Shapiro ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 ${INSTALL_CF} \ 548bdd91e3SDavid E. O'Brien ${DESTDIR}/etc/mail/sendmail.cf 5525219d25SGregory Neil Shapiro.else 5625219d25SGregory Neil Shapiroinstall: 5776bfe4c3SPeter Wemm.endif 5876bfe4c3SPeter Wemm 5976bfe4c3SPeter Wemm# Helper for src/etc/Makefile 60e10536edSGregory Neil Shapirodistribution: freebsd.cf freebsd.mc 6125219d25SGregory Neil Shapiro.if (defined(SENDMAIL_MC) && defined(SENDMAIL_CF)) 6225219d25SGregory Neil Shapiro @echo ">>> ERROR: Both SENDMAIL_CF and SENDMAIL_MC can not be set" 6325219d25SGregory Neil Shapiro @false 6425219d25SGregory Neil Shapiro.endif 65e10536edSGregory Neil Shapiro ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/freebsd.mc \ 66e10536edSGregory Neil Shapiro ${DESTDIR}/etc/mail/freebsd.mc 67e10536edSGregory Neil Shapiro ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 freebsd.cf \ 68e10536edSGregory Neil Shapiro ${DESTDIR}/etc/mail/freebsd.cf 6925219d25SGregory Neil Shapiro.if defined(INSTALL_CF) 7025219d25SGregory Neil Shapiro ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 ${INSTALL_CF} \ 7125219d25SGregory Neil Shapiro ${DESTDIR}/etc/mail/sendmail.cf 7225219d25SGregory Neil Shapiro.else 7376bfe4c3SPeter Wemm ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 freebsd.cf \ 748bdd91e3SDavid E. O'Brien ${DESTDIR}/etc/mail/sendmail.cf 7525219d25SGregory Neil Shapiro.endif 76e4e1027aSGregory Neil Shapiro ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \ 77e4e1027aSGregory Neil Shapiro ${DESTDIR}/var/log/sendmail.st 7876bfe4c3SPeter Wemm 7976bfe4c3SPeter Wemm# this is overkill, but.... 8076bfe4c3SPeter WemmM4FILES!= find ${CFDIR} -type f -name '*.m4' -print 8176bfe4c3SPeter Wemm 8276bfe4c3SPeter Wemm$(ALL): $(M4FILES) 8376bfe4c3SPeter Wemm 8476bfe4c3SPeter Wemm.include <bsd.prog.mk> 85