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
|
|
|
|
|
|
|
M4= m4
|
|
|
|
CFDIR= ${.CURDIR}/../../contrib/sendmail/cf
|
|
|
|
CHMOD= chmod
|
|
|
|
ROMODE= 444
|
|
|
|
RM= rm -f
|
|
|
|
|
|
|
|
.SUFFIXES: .mc .cf
|
|
|
|
|
|
|
|
.mc.cf:
|
|
|
|
$(RM) ${.TARGET}
|
|
|
|
(cd ${.CURDIR} && \
|
|
|
|
$(M4) -D_CF_DIR_=${CFDIR}/ ${CFDIR}/m4/cf.m4 ${@:R}.mc) > ${.TARGET}
|
|
|
|
$(CHMOD) $(ROMODE) ${.TARGET}
|
|
|
|
|
|
|
|
ALL= freebsd.cf
|
|
|
|
|
2001-02-22 04:11:52 +00:00
|
|
|
# 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!!!
|
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)
|
|
|
|
INSTALL_CF= ${SENDMAIL_MC:R}.cf
|
|
|
|
.else
|
1998-08-04 15:53:18 +00:00
|
|
|
.if defined(SENDMAIL_CF)
|
2001-02-22 04:11:52 +00:00
|
|
|
INSTALL_CF= ${SENDMAIL_CF}
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(INSTALL_CF)
|
|
|
|
ALL+= ${INSTALL_CF}
|
1998-08-04 15:53:18 +00:00
|
|
|
.endif
|
|
|
|
|
2001-02-22 19:44:16 +00:00
|
|
|
# Additional .cf files to build
|
|
|
|
.if defined(SENDMAIL_ADDITIONAL_MC)
|
|
|
|
ALL+= ${SENDMAIL_ADDITIONAL_MC:S/.mc$/.cf/g}
|
|
|
|
.endif
|
|
|
|
|
1998-08-04 15:53:18 +00:00
|
|
|
CLEANFILES+=$(ALL)
|
|
|
|
|
|
|
|
all: $(ALL)
|
|
|
|
|
|
|
|
depend:
|
|
|
|
|
2001-02-22 04:11:52 +00:00
|
|
|
.if defined(INSTALL_CF)
|
|
|
|
install: ${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 ${INSTALL_CF} \
|
1999-12-19 19:55:19 +00:00
|
|
|
${DESTDIR}/etc/mail/sendmail.cf
|
2001-02-22 04:11:52 +00:00
|
|
|
.else
|
|
|
|
install:
|
1998-08-04 15:53:18 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
# Helper for src/etc/Makefile
|
2001-02-22 04:01:16 +00:00
|
|
|
distribution: freebsd.cf freebsd.mc
|
2001-02-22 04:11:52 +00:00
|
|
|
.if (defined(SENDMAIL_MC) && defined(SENDMAIL_CF))
|
|
|
|
@echo ">>> ERROR: Both SENDMAIL_CF and SENDMAIL_MC can not be set"
|
|
|
|
@false
|
|
|
|
.endif
|
2001-02-22 04:01:16 +00:00
|
|
|
${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
|
2001-02-22 04:11:52 +00:00
|
|
|
.if defined(INSTALL_CF)
|
|
|
|
${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 ${INSTALL_CF} \
|
|
|
|
${DESTDIR}/etc/mail/sendmail.cf
|
|
|
|
.else
|
1998-08-04 15:53:18 +00:00
|
|
|
${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 freebsd.cf \
|
1999-12-19 19:55:19 +00:00
|
|
|
${DESTDIR}/etc/mail/sendmail.cf
|
2001-02-22 04:11:52 +00:00
|
|
|
.endif
|
|
|
|
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
|
|
|
|
${DESTDIR}/var/log/sendmail.st
|
1998-08-04 15:53:18 +00:00
|
|
|
|
|
|
|
# this is overkill, but....
|
|
|
|
M4FILES!= find ${CFDIR} -type f -name '*.m4' -print
|
|
|
|
|
|
|
|
$(ALL): $(M4FILES)
|
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|