#
# Makefile for Debian Linux sendmail configuration files
#
# Adapted from the original 4.4bsd Makefile
#
# Jonathan Rozes <jrozes@musketeers.tufts.edu>
#

M4= m4
INSTALL= install -m 644
#INSTALL= install -o root -g root -m 644

DESTDIR= ~/sendmail/install
MAILDIR= ${DESTDIR}/usr/src/sendmail.cf

.SUFFIXES:  .mc .cf

.mc.cf:
	${RM} obj/$@
	${M4} ${*}.mc > obj/$@
#	${INSTALL} obj/$@ ${MAILDIR}/sendmail.cf
#	@echo "Your configuration file was installed in ${MAILDIR}"
#	@echo "Please check it over and then install it as /etc/sendmail.cf"

ALL=	deb-client.cf deb-host-exposed.cf deb-host-hidden.cf \
	deb-tcp.cf deb-uucp.cf deb-local.cf

all: $(ALL)

clean:
	(cd obj ; rm -f $(ALL) core)

install: 

# this is overkill, but....
M4FILES=\
	../domain/Berkeley.m4 \
	../domain/cs.exposed.m4 \
	../domain/cs.hidden.m4 \
	../domain/eecs.hidden.m4 \
	../domain/s2k.m4 \
	../feature/allmasquerade.m4 \
	../feature/always_add_domain.m4 \
	../feature/bitdomain.m4 \
	../feature/domaintable.m4 \
	../feature/mailertable.m4 \
	../feature/nocanonify.m4 \
	../feature/nodns.m4 \
	../feature/notsticky.m4 \
	../feature/nouucp.m4 \
	../feature/nullclient.m4 \
	../feature/redirect.m4 \
	../feature/use_cw_file.m4 \
	../feature/uucpdomain.m4 \
	../hack/cssubdomain.m4 \
	../m4/cf.m4 \
	../m4/nullrelay.m4 \
	../m4/proto.m4 \
	../m4/version.m4 \
	../mailer/fax.m4 \
	../mailer/local.m4 \
	../mailer/smtp.m4 \
	../mailer/usenet.m4 \
	../mailer/uucp.m4 \
	../ostype/bsd4.3.m4 \
	../ostype/bsd4.4.m4 \
	../ostype/debian.m4 \
	../ostype/hpux.m4 \
	../ostype/linux.m4 \
	../ostype/svr4.m4 \
	../siteconfig/uucp.cogsci.m4 \
	../siteconfig/uucp.old.arpa.m4 \
	../siteconfig/uucp.ucbarpa.m4 \
	../siteconfig/uucp.ucbvax.m4 \

$(ALL):  $(M4FILES)
