Makefile revision 72843
1#	@(#)Makefile	8.19 (Berkeley) 1/14/97
2# $FreeBSD: head/etc/sendmail/Makefile 72843 2001-02-22 03:55:08Z gshapiro $
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
40distribution: freebsd.cf
41	${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 freebsd.cf \
42		${DESTDIR}/etc/mail/sendmail.cf
43	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \ 
44		${DESTDIR}/var/log/sendmail.st 
45
46# this is overkill, but....
47M4FILES!= find ${CFDIR} -type f -name '*.m4' -print
48
49$(ALL):  $(M4FILES)
50
51.include <bsd.prog.mk>
52