Makefile revision 80176
1# @(#)Makefile 8.19 (Berkeley) 1/14/97 2# $FreeBSD: head/etc/sendmail/Makefile 80176 2001-07-23 02:19:02Z gshapiro $ 3 4M4= m4 5CHMOD= chmod 6ROMODE= 444 7RM= rm -f 8 9SENDMAIL_DIR= ${.CURDIR}/../../contrib/sendmail 10SMDIR= ${SENDMAIL_DIR}/src 11CFDIR= ${SENDMAIL_DIR}/cf 12 13SENDMAIL_M4_FLAGS+= -D_FFR_TLS_O_T 14 15# this is overkill, but.... 16M4FILES!= find ${CFDIR} -type f -name '*.m4' -print 17 18.SUFFIXES: .mc .cf 19 20.mc.cf: ${M4FILES} 21 ${RM} ${.TARGET} 22 (cd ${.CURDIR} && \ 23 ${M4} -D_CF_DIR_=${CFDIR}/ ${SENDMAIL_M4_FLAGS} \ 24 ${CFDIR}/m4/cf.m4 ${@:R}.mc) > ${.TARGET} 25 ${CHMOD} ${ROMODE} ${.TARGET} 26 27ALL= freebsd.cf 28 29# Local SENDMAIL_MC or SENDMAIL_CF may be set in /etc/make.conf. 30# Warning! If set, this causes 'make install' to always copy it 31# over /etc/mail/sendmail.cf!!! 32# Caveat emptor! Be sure you want this before you enable it. 33.if defined(SENDMAIL_MC) 34INSTALL_CF= ${SENDMAIL_MC:R}.cf 35.else 36.if defined(SENDMAIL_CF) 37INSTALL_CF= ${SENDMAIL_CF} 38.endif 39.endif 40 41DEST_CF= ${DESTDIR}/etc/mail/sendmail.cf 42 43ALL+= ${INSTALL_CF} 44 45# Additional .cf files to build 46.if defined(SENDMAIL_ADDITIONAL_MC) 47ALL+= ${SENDMAIL_ADDITIONAL_MC:S/.mc$/.cf/g} 48.endif 49 50CLEANFILES+= ${ALL} 51 52all: ${ALL} 53 54depend: 55 56install: ${INSTALL_CF} 57.if (defined(SENDMAIL_MC) && defined(SENDMAIL_CF)) 58 @echo ">>> ERROR: Both SENDMAIL_CF and SENDMAIL_MC can not be set" 59 @false 60.endif 61.if defined(INSTALL_CF) 62.if ${INSTALL_CF} != ${DEST_CF} 63 ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 ${INSTALL_CF} \ 64 ${DEST_CF} 65.endif 66.endif 67 68# Helper for src/etc/Makefile 69distribution: freebsd.cf freebsd.mc ${INSTALL_CF} 70.if (defined(SENDMAIL_MC) && defined(SENDMAIL_CF)) 71 @echo ">>> ERROR: Both SENDMAIL_CF and SENDMAIL_MC can not be set" 72 @false 73.endif 74 ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/freebsd.mc \ 75 ${DESTDIR}/etc/mail/freebsd.mc 76 ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 freebsd.cf \ 77 ${DESTDIR}/etc/mail/freebsd.cf 78.if defined(INSTALL_CF) 79.if ${INSTALL_CF} != ${DEST_CF} 80 ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 ${INSTALL_CF} \ 81 ${DEST_CF} 82.endif 83.else 84 ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 freebsd.cf \ 85 ${DEST_CF} 86.endif 87 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 ${SMDIR}/helpfile \ 88 ${DESTDIR}/etc/mail/helpfile 89 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \ 90 ${DESTDIR}/var/log/sendmail.st 91 92.include <bsd.prog.mk> 93