Pre-2.0 release, MFC some driver fixes related to interrupt management.
[dragonfly.git] / etc / sendmail / Makefile
blob21436a3bae2d731b27b74644a901a2dbd8fa073f
1 # @(#)Makefile 8.19 (Berkeley) 1/14/97
2 # $FreeBSD: src/etc/sendmail/Makefile,v 1.31 2004/01/22 17:51:02 ru Exp $
3 # $DragonFly: src/etc/sendmail/Makefile,v 1.9 2007/04/14 17:43:48 gshapiro Exp $
5 M4= m4
6 CHMOD= chmod
7 ROMODE= 444
8 RM= rm -f
10 SENDMAIL_DIR= ${.CURDIR}/../../contrib/sendmail-8.14
11 SMDIR= ${SENDMAIL_DIR}/sendmail
12 SENDMAIL_CF_DIR?=${SENDMAIL_DIR}/cf
14 # this is overkill, but....
15 M4FILES!= find ${SENDMAIL_CF_DIR} -type f -name '*.m4' -print
17 .SUFFIXES: .mc .cf
19 .mc.cf: ${M4FILES}
20 ${RM} ${.TARGET}
21 ${M4} -D_CF_DIR_=${SENDMAIL_CF_DIR}/ ${SENDMAIL_M4_FLAGS} \
22 ${SENDMAIL_CF_DIR}/m4/cf.m4 ${.IMPSRC} > ${.TARGET}
23 ${CHMOD} ${ROMODE} ${.TARGET}
25 DEST_CF= ${DESTDIR}/etc/mail/sendmail.cf
26 DEST_SUBMIT_CF= ${DESTDIR}/etc/mail/submit.cf
28 ALL= dragonfly.cf dragonfly.submit.cf
29 CLEANFILES= dragonfly.cf dragonfly.submit.cf
31 # Local SENDMAIL_MC or SENDMAIL_CF may be set in /etc/make.conf.
32 # Warning! If set, this causes 'make install' to always copy it
33 # over /etc/mail/sendmail.cf!!!
34 # Caveat emptor! Be sure you want this before you enable it.
35 .if defined(SENDMAIL_MC) && defined(SENDMAIL_CF)
36 .error Both SENDMAIL_MC and SENDMAIL_CF cannot be set.
37 .elif defined(SENDMAIL_MC)
38 INSTALL_CF= ${SENDMAIL_MC:T:R}.cf
39 ALL+= ${INSTALL_CF}
40 CLEANFILES+= ${SENDMAIL_MC:T:R}.cf
41 ${INSTALL_CF}: ${SENDMAIL_MC}
42 .elif defined(SENDMAIL_CF)
43 ALL+= ${SENDMAIL_CF}
44 INSTALL_CF= ${SENDMAIL_CF}
45 .endif
47 .if !defined(SENDMAIL_SET_USER_ID) && defined(SENDMAIL_SUBMIT_MC)
48 INSTALL_SUBMIT_CF= ${SENDMAIL_SUBMIT_MC:T:R}.cf
49 ALL+= ${INSTALL_SUBMIT_CF}
50 CLEANFILES+= ${INSTALL_SUBMIT_CF}
51 ${INSTALL_SUBMIT_CF}: ${SENDMAIL_SUBMIT_MC}
52 .endif
54 # Additional .cf files to build.
55 .if defined(SENDMAIL_ADDITIONAL_MC)
56 SENDMAIL_ADDITIONAL_CF= ${SENDMAIL_ADDITIONAL_MC:T:S/.mc$/.cf/}
57 ALL+= ${SENDMAIL_ADDITIONAL_CF}
58 CLEANFILES+= ${SENDMAIL_ADDITIONAL_CF}
59 .for mc in ${SENDMAIL_ADDITIONAL_MC}
60 ${mc:T:R}.cf: ${mc}
61 .endfor
62 .endif
64 all: ${ALL}
66 distribution: dragonfly.cf dragonfly.submit.cf
67 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
68 ${.CURDIR}/dragonfly.mc dragonfly.cf ${DESTDIR}/etc/mail
69 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
70 ${.CURDIR}/dragonfly.submit.mc dragonfly.submit.cf ${DESTDIR}/etc/mail
71 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
72 ${SMDIR}/helpfile ${DESTDIR}/etc/mail
73 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 640 \
74 /dev/null ${DESTDIR}/var/log/sendmail.st
75 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
76 dragonfly.cf ${DEST_CF}
77 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
78 dragonfly.submit.cf ${DEST_SUBMIT_CF}
80 upgrade:
81 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
82 ${.CURDIR}/dragonfly.mc ${DESTDIR}/etc/mail
83 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
84 ${.CURDIR}/dragonfly.submit.mc ${DESTDIR}/etc/mail
85 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
86 ${SMDIR}/helpfile ${DESTDIR}/etc/mail
88 install:
89 .if defined(INSTALL_CF) && ${INSTALL_CF} != ${DEST_CF}
90 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
91 ${INSTALL_CF} ${DEST_CF}
92 .endif
93 .if defined(SENDMAIL_ADDITIONAL_CF)
94 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
95 ${SENDMAIL_ADDITIONAL_CF} ${DESTDIR}/etc/mail
96 .endif
97 .if !defined(SENDMAIL_SET_USER_ID) && \
98 defined(INSTALL_SUBMIT_CF) && ${INSTALL_SUBMIT_CF} != ${DEST_SUBMIT_CF}
99 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
100 ${INSTALL_SUBMIT_CF} ${DEST_SUBMIT_CF}
101 .endif
103 .include <bsd.prog.mk>