1998-08-04 15:53:18 +00:00
|
|
|
# @(#)Makefile 8.19 (Berkeley) 1/14/97
|
1999-08-27 23:37:10 +00:00
|
|
|
# $FreeBSD$
|
1998-08-04 15:53:18 +00:00
|
|
|
|
2001-02-28 04:04:07 +00:00
|
|
|
M4= m4
|
|
|
|
CHMOD= chmod
|
|
|
|
ROMODE= 444
|
|
|
|
RM= rm -f
|
2001-03-01 03:50:28 +00:00
|
|
|
|
|
|
|
SENDMAIL_DIR= ${.CURDIR}/../../contrib/sendmail
|
|
|
|
SMDIR= ${SENDMAIL_DIR}/src
|
2003-09-24 04:19:26 +00:00
|
|
|
SENDMAIL_CF_DIR?=${SENDMAIL_DIR}/cf
|
1998-08-04 15:53:18 +00:00
|
|
|
|
2001-02-28 04:04:07 +00:00
|
|
|
# this is overkill, but....
|
2003-09-24 04:19:26 +00:00
|
|
|
M4FILES!= find ${SENDMAIL_CF_DIR} -type f -name '*.m4' -print
|
2001-02-28 04:04:07 +00:00
|
|
|
|
2003-07-06 18:07:06 +00:00
|
|
|
.SUFFIXES: .mc .cf
|
1998-08-04 15:53:18 +00:00
|
|
|
|
2003-07-06 18:07:06 +00:00
|
|
|
.mc.cf: ${M4FILES}
|
2001-02-28 04:04:07 +00:00
|
|
|
${RM} ${.TARGET}
|
2003-09-24 04:19:26 +00:00
|
|
|
${M4} -D_CF_DIR_=${SENDMAIL_CF_DIR}/ ${SENDMAIL_M4_FLAGS} \
|
|
|
|
${SENDMAIL_CF_DIR}/m4/cf.m4 ${.IMPSRC} > ${.TARGET}
|
2001-02-28 04:04:07 +00:00
|
|
|
${CHMOD} ${ROMODE} ${.TARGET}
|
1998-08-04 15:53:18 +00:00
|
|
|
|
2003-07-06 18:51:10 +00:00
|
|
|
DEST_CF= ${DESTDIR}/etc/mail/sendmail.cf
|
|
|
|
DEST_SUBMIT_CF= ${DESTDIR}/etc/mail/submit.cf
|
|
|
|
|
2003-09-01 03:40:33 +00:00
|
|
|
ALL= freebsd.cf freebsd.submit.cf
|
|
|
|
CLEANFILES= freebsd.cf freebsd.submit.cf
|
1998-08-04 15:53:18 +00:00
|
|
|
|
2001-02-22 04:11:52 +00:00
|
|
|
# Local SENDMAIL_MC or SENDMAIL_CF may be set in /etc/make.conf.
|
2003-07-06 18:51:10 +00:00
|
|
|
# Warning! If set, this causes 'make install' to always copy it
|
2001-02-22 04:11:52 +00:00
|
|
|
# over /etc/mail/sendmail.cf!!!
|
1998-08-04 15:53:18 +00:00
|
|
|
# Caveat emptor! Be sure you want this before you enable it.
|
2001-02-22 04:11:52 +00:00
|
|
|
.if defined(SENDMAIL_MC)
|
2003-07-06 18:51:10 +00:00
|
|
|
INSTALL_CF= ${SENDMAIL_MC:T:R}.cf
|
|
|
|
ALL+= ${INSTALL_CF}
|
2003-07-10 04:53:32 +00:00
|
|
|
CLEANFILES+= ${SENDMAIL_MC:T:R}.cf
|
2003-07-06 18:51:10 +00:00
|
|
|
${INSTALL_CF}: ${SENDMAIL_MC}
|
|
|
|
.elif defined(SENDMAIL_CF)
|
2003-07-10 04:53:32 +00:00
|
|
|
ALL+= ${SENDMAIL_CF}
|
2001-02-22 04:11:52 +00:00
|
|
|
INSTALL_CF= ${SENDMAIL_CF}
|
|
|
|
.endif
|
2002-02-24 02:38:23 +00:00
|
|
|
|
2003-07-06 18:51:10 +00:00
|
|
|
.if !defined(SENDMAIL_SET_USER_ID) && defined(SENDMAIL_SUBMIT_MC)
|
|
|
|
INSTALL_SUBMIT_CF= ${SENDMAIL_SUBMIT_MC:T:R}.cf
|
|
|
|
ALL+= ${INSTALL_SUBMIT_CF}
|
2003-07-10 04:53:32 +00:00
|
|
|
CLEANFILES+= ${INSTALL_SUBMIT_CF}
|
2003-07-06 18:51:10 +00:00
|
|
|
${INSTALL_SUBMIT_CF}: ${SENDMAIL_SUBMIT_MC}
|
2002-04-14 19:20:26 +00:00
|
|
|
.endif
|
|
|
|
|
2003-07-06 18:51:10 +00:00
|
|
|
# Additional .cf files to build.
|
2001-02-22 19:44:16 +00:00
|
|
|
.if defined(SENDMAIL_ADDITIONAL_MC)
|
2003-07-06 18:51:10 +00:00
|
|
|
SENDMAIL_ADDITIONAL_CF= ${SENDMAIL_ADDITIONAL_MC:T:S/.mc$/.cf/}
|
2001-11-20 03:41:05 +00:00
|
|
|
ALL+= ${SENDMAIL_ADDITIONAL_CF}
|
2003-07-10 04:53:32 +00:00
|
|
|
CLEANFILES+= ${SENDMAIL_ADDITIONAL_CF}
|
2003-07-06 18:51:10 +00:00
|
|
|
.for mc in ${SENDMAIL_ADDITIONAL_MC}
|
|
|
|
${mc:T:R}.cf: ${mc}
|
|
|
|
.endfor
|
2001-02-22 19:44:16 +00:00
|
|
|
.endif
|
|
|
|
|
2003-07-06 18:07:06 +00:00
|
|
|
all: ${ALL}
|
1998-08-04 15:53:18 +00:00
|
|
|
|
2003-08-10 20:48:59 +00:00
|
|
|
install distribution:
|
2003-07-06 18:51:10 +00:00
|
|
|
.if defined(SENDMAIL_MC) && defined(SENDMAIL_CF)
|
|
|
|
@echo ">>> ERROR: Both SENDMAIL_MC and SENDMAIL_CF cannot be set"
|
2001-02-22 04:11:52 +00:00
|
|
|
@false
|
|
|
|
.endif
|
2003-07-06 18:51:10 +00:00
|
|
|
.if make(distribution)
|
2002-07-29 09:40:17 +00:00
|
|
|
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
|
2003-07-06 18:51:10 +00:00
|
|
|
${.CURDIR}/freebsd.mc freebsd.cf ${DESTDIR}/etc/mail
|
|
|
|
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
|
2003-10-19 00:03:13 +00:00
|
|
|
${.CURDIR}/freebsd.submit.mc freebsd.submit.cf ${DESTDIR}/etc/mail
|
2003-07-06 18:51:10 +00:00
|
|
|
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
|
|
|
|
${SMDIR}/helpfile ${DESTDIR}/etc/mail
|
|
|
|
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 640 \
|
|
|
|
/dev/null ${DESTDIR}/var/log/sendmail.st
|
|
|
|
.endif
|
|
|
|
.if defined(INSTALL_CF) && ${INSTALL_CF} != ${DEST_CF}
|
2002-07-29 09:40:17 +00:00
|
|
|
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
|
2003-07-06 18:51:10 +00:00
|
|
|
${INSTALL_CF} ${DEST_CF}
|
|
|
|
.elif make(distribution)
|
|
|
|
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
|
|
|
|
freebsd.cf ${DEST_CF}
|
2001-07-23 02:19:02 +00:00
|
|
|
.endif
|
2003-07-06 18:51:10 +00:00
|
|
|
.if defined(SENDMAIL_ADDITIONAL_CF) && make(install)
|
|
|
|
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
|
|
|
|
${SENDMAIL_ADDITIONAL_CF} ${DESTDIR}/etc/mail
|
2002-02-17 22:09:15 +00:00
|
|
|
.endif
|
2003-07-06 18:51:10 +00:00
|
|
|
.if !defined(SENDMAIL_SET_USER_ID)
|
|
|
|
.if defined(INSTALL_SUBMIT_CF) && ${INSTALL_SUBMIT_CF} != ${DEST_SUBMIT_CF}
|
2002-07-29 09:40:17 +00:00
|
|
|
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
|
2003-07-06 18:07:06 +00:00
|
|
|
${INSTALL_SUBMIT_CF} ${DEST_SUBMIT_CF}
|
2003-07-06 18:51:10 +00:00
|
|
|
.elif make(distribution)
|
|
|
|
${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
|
2003-09-01 03:40:33 +00:00
|
|
|
freebsd.submit.cf ${DEST_SUBMIT_CF}
|
2002-04-14 19:20:26 +00:00
|
|
|
.endif
|
2001-02-22 04:11:52 +00:00
|
|
|
.endif
|
1998-08-04 15:53:18 +00:00
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|