#	BSDI Makefile,v 1.3 1995/12/06 18:29:52 sanders Exp
#
#  Configuration files are created using "m4 file.mc > file.cf";
#  this may be easier than tweaking the Makefile.  You do need to
#  have a fairly modern M4 available (GNU m4 works).  On SunOS, use
#  /usr/5bin/m4.

.include "../Makefile.inc"

M4=	/usr/bin/m4
RM=	/bin/rm -f
MAIN=	bsdi.cf
MISC=	chez.cs.cf clientproto.cf cs-hpux10.cf cs-hpux9.cf \
	cs-osf1.cf cs-solaris2.cf cs-sunos4.1.cf cs-ultrix4.cf \
	cyrusproto.cf generic-bsd4.4.cf generic-hpux10.cf \
	generic-hpux9.cf generic-osf1.cf generic-solaris2.cf \
	generic-sunos4.1.cf generic-ultrix4.cf huginn.cs.cf mail.cs.cf \
	mail.eecs.cf mailspool.cs.cf python.cs.cf s2k-osf1.cf \
	s2k-ultrix4.cf tcpproto.cf ucbarpa.cf ucbvax.cf uucpproto.cf \
	vangogh.cs.cf
ALL=	${MAIN}
CLEANFILES= ${ALL}

.SUFFIXES:  .mc .cf
.mc.cf:
	${RM} $@
	(cd ${.CURDIR} && ${M4} ${@:R}.mc > obj/$@)

all: ${ALL}

depend:

beforeinstall:
	install -c -o root -g wheel -m 644 ${MAIN} \
		${DESTDIR}/etc/sendmail.cf.dist
	(cd ${.CURDIR} && install -c -o ${BINOWN} -g ${BINGRP} -m 444 \
		${MAIN:.cf=.mc} ${MISC:.cf=.mc} ${DESTDIR}${CFDIR}/cf)

# this is overkill, but....
M4FILES=\
    ${.CURDIR}/../domain/generic.m4 \
    ${.CURDIR}/../feature/allmasquerade.m4 \
    ${.CURDIR}/../feature/always_add_domain.m4 \
    ${.CURDIR}/../feature/bestmx_is_local.m4 \
    ${.CURDIR}/../feature/bitdomain.m4 \
    ${.CURDIR}/../feature/domaintable.m4 \
    ${.CURDIR}/../feature/local_procmail.m4 \
    ${.CURDIR}/../feature/mailertable.m4 \
    ${.CURDIR}/../feature/masquerade_envelope.m4 \
    ${.CURDIR}/../feature/nocanonify.m4 \
    ${.CURDIR}/../feature/nodns.m4 \
    ${.CURDIR}/../feature/notsticky.m4 \
    ${.CURDIR}/../feature/nouucp.m4 \
    ${.CURDIR}/../feature/nullclient.m4 \
    ${.CURDIR}/../feature/redirect.m4 \
    ${.CURDIR}/../feature/smrsh.m4 \
    ${.CURDIR}/../feature/stickyhost.m4 \
    ${.CURDIR}/../feature/use_ct_file.m4 \
    ${.CURDIR}/../feature/use_cw_file.m4 \
    ${.CURDIR}/../feature/uucpdomain.m4 \
    ${.CURDIR}/../m4/cf.m4 \
    ${.CURDIR}/../m4/cfhead.m4 \
    ${.CURDIR}/../m4/nullrelay.m4 \
    ${.CURDIR}/../m4/proto.m4 \
    ${.CURDIR}/../m4/version.m4 \
    ${.CURDIR}/../mailer/cyrus.m4 \
    ${.CURDIR}/../mailer/fax.m4 \
    ${.CURDIR}/../mailer/local.m4 \
    ${.CURDIR}/../mailer/mail11.m4 \
    ${.CURDIR}/../mailer/phquery.m4 \
    ${.CURDIR}/../mailer/pop.m4 \
    ${.CURDIR}/../mailer/procmail.m4 \
    ${.CURDIR}/../mailer/smtp.m4 \
    ${.CURDIR}/../mailer/usenet.m4 \
    ${.CURDIR}/../mailer/uucp.m4 \
    ${.CURDIR}/../ostype/bsd4.4.m4 \
    ${.CURDIR}/../ostype/bsdi1.0.m4 \
    ${.CURDIR}/../ostype/bsdi2.0.m4 \
    ${.CURDIR}/../ostype/unknown.m4

${ALL}:  ${M4FILES}

.include <bsd.prog.mk>
