Makefile revision 54836
1#	@(#)Makefile	8.19 (Berkeley) 1/14/97
2# $FreeBSD: head/etc/sendmail/Makefile 54836 1999-12-19 19:55:19Z obrien $
3
4M4=	m4
5CFDIR=	${.CURDIR}/../../contrib/sendmail/cf
6CHMOD=	chmod
7ROMODE=	444
8RM=	rm -f
9
10.SUFFIXES:  .mc .cf
11
12.mc.cf:
13	$(RM) ${.TARGET}
14	(cd ${.CURDIR} && \
15	    $(M4) -D_CF_DIR_=${CFDIR}/ ${CFDIR}/m4/cf.m4 ${@:R}.mc) > ${.TARGET}
16	$(CHMOD) $(ROMODE) ${.TARGET}
17
18ALL=	freebsd.cf
19
20# Local sendmail.cf, may be set in /etc/make.conf.  Warning! If set, this
21# causes 'make install' to always copy it over /etc/mail/sendmail.cf!!!
22# Caveat emptor!  Be sure you want this before you enable it.
23.if defined(SENDMAIL_CF)
24ALL+=	${SENDMAIL_CF}
25.endif
26
27CLEANFILES+=$(ALL)
28
29all: $(ALL)
30
31depend:
32
33install:
34.if defined(SENDMAIL_CF)
35	${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 ${SENDMAIL_CF} \
36		${DESTDIR}/etc/mail/sendmail.cf
37.endif
38
39# Helper for src/etc/Makefile
40etc-sendmail.cf: freebsd.cf
41	${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 freebsd.cf \
42		${DESTDIR}/etc/mail/sendmail.cf
43
44# this is overkill, but....
45M4FILES!= find ${CFDIR} -type f -name '*.m4' -print
46
47$(ALL):  $(M4FILES)
48
49.include <bsd.prog.mk>
50