freebsd-dev/etc/sendmail/Makefile
Gregory Neil Shapiro f4843be999 New make knob, SENDMAIL_M4_FLAGS, modifies the flags passed to m4 when
building a .cf file from a .mc file.

Include -D_FFR_TLS_O_T to enable tls policy control since the sendmail binary
build enables that FFR as well.

PR:		conf/28361
MFC after:	1 week
2001-07-23 01:33:54 +00:00

87 lines
2.2 KiB
Makefile

# @(#)Makefile 8.19 (Berkeley) 1/14/97
# $FreeBSD$
M4= m4
CHMOD= chmod
ROMODE= 444
RM= rm -f
SENDMAIL_DIR= ${.CURDIR}/../../contrib/sendmail
SMDIR= ${SENDMAIL_DIR}/src
CFDIR= ${SENDMAIL_DIR}/cf
SENDMAIL_M4_FLAGS+= -D_FFR_TLS_O_T
# this is overkill, but....
M4FILES!= find ${CFDIR} -type f -name '*.m4' -print
.SUFFIXES: .mc .cf
.mc.cf: ${M4FILES}
${RM} ${.TARGET}
(cd ${.CURDIR} && \
${M4} -D_CF_DIR_=${CFDIR}/ ${SENDMAIL_M4_FLAGS} \
${CFDIR}/m4/cf.m4 ${@:R}.mc) > ${.TARGET}
${CHMOD} ${ROMODE} ${.TARGET}
ALL= 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
# over /etc/mail/sendmail.cf!!!
# Caveat emptor! Be sure you want this before you enable it.
.if defined(SENDMAIL_MC)
INSTALL_CF= ${SENDMAIL_MC:R}.cf
.else
.if defined(SENDMAIL_CF)
INSTALL_CF= ${SENDMAIL_CF}
.endif
.endif
ALL+= ${INSTALL_CF}
# Additional .cf files to build
.if defined(SENDMAIL_ADDITIONAL_MC)
ALL+= ${SENDMAIL_ADDITIONAL_MC:S/.mc$/.cf/g}
.endif
CLEANFILES+= ${ALL}
all: ${ALL}
depend:
install: ${INSTALL_CF}
.if (defined(SENDMAIL_MC) && defined(SENDMAIL_CF))
@echo ">>> ERROR: Both SENDMAIL_CF and SENDMAIL_MC can not be set"
@false
.endif
.if defined(INSTALL_CF)
${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 ${INSTALL_CF} \
${DESTDIR}/etc/mail/sendmail.cf
.endif
# Helper for src/etc/Makefile
distribution: freebsd.cf freebsd.mc ${INSTALL_CF}
.if (defined(SENDMAIL_MC) && defined(SENDMAIL_CF))
@echo ">>> ERROR: Both SENDMAIL_CF and SENDMAIL_MC can not be set"
@false
.endif
${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/freebsd.mc \
${DESTDIR}/etc/mail/freebsd.mc
${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 freebsd.cf \
${DESTDIR}/etc/mail/freebsd.cf
.if defined(INSTALL_CF)
${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 ${INSTALL_CF} \
${DESTDIR}/etc/mail/sendmail.cf
.else
${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 freebsd.cf \
${DESTDIR}/etc/mail/sendmail.cf
.endif
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${SMDIR}/helpfile \
${DESTDIR}/etc/mail/helpfile
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
${DESTDIR}/var/log/sendmail.st
.include <bsd.prog.mk>