aboutsummaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorGregory Neil Shapiro <gshapiro@FreeBSD.org>2001-02-22 04:11:52 +0000
committerGregory Neil Shapiro <gshapiro@FreeBSD.org>2001-02-22 04:11:52 +0000
commit25219d25e645543aca8f15daca2001bdd306bef6 (patch)
treee22ac2e0a3df1c3392170730136f76ec4f20faf1 /etc
parente10536edc17f25007ac0a68aff2a9ec00f722988 (diff)
downloadsrc-25219d25e645543aca8f15daca2001bdd306bef6.tar.gz
src-25219d25e645543aca8f15daca2001bdd306bef6.zip
Add a new make knob, SENDMAIL_MC, which is meant to replace SENDMAIL_CF as
users should be configuring via m4 now. If set, use m4 to create the .cf file. Also, if either SENDMAIL_MC or SENDMAIL_CF is set, 'make install' or 'make distribution' in src/etc/sendmail/ will install the appropriate .cf as /etc/mail/sendmail.cf. This fixes some mergemaster problems. PR: conf/13016
Notes
Notes: svn path=/head/; revision=72846
Diffstat (limited to 'etc')
-rw-r--r--etc/defaults/make.conf8
-rw-r--r--etc/sendmail/Makefile40
2 files changed, 40 insertions, 8 deletions
diff --git a/etc/defaults/make.conf b/etc/defaults/make.conf
index 41ad7bf38cda..f909dfd37081 100644
--- a/etc/defaults/make.conf
+++ b/etc/defaults/make.conf
@@ -324,6 +324,14 @@ BDECFLAGS= -W -Wall -ansi -pedantic -Wbad-function-cast -Wcast-align \
#
#
# sendmail
+#
+# The following sets the default m4 configuration file to use at
+# install time. Use with caution as a make install will overwrite
+# any existing /etc/mail/sendmail.cf. Note that SENDMAIL_CF is now
+# deprecated.
+#
+#SENDMAIL_MC=freebsd.mc
+#
# Setting the following variables modifes the build environment for
# sendmail and its related utilities. For example, SASL support can be
# added with settings such as:
diff --git a/etc/sendmail/Makefile b/etc/sendmail/Makefile
index 2c6b128a6e0f..7a8957e73b4b 100644
--- a/etc/sendmail/Makefile
+++ b/etc/sendmail/Makefile
@@ -17,11 +17,20 @@ RM= rm -f
ALL= freebsd.cf
-# Local sendmail.cf, may be set in /etc/make.conf. Warning! If set, this
-# causes 'make install' to always copy it over /etc/mail/sendmail.cf!!!
+# Local SENDMAIL_MC or SENDMAIL_CF may be set in /etc/make.conf.
+# Warning! If set, this causes 'make install' to always copy it
+# over /etc/mail/sendmail.cf!!!
# Caveat emptor! Be sure you want this before you enable it.
+.if defined(SENDMAIL_MC)
+INSTALL_CF= ${SENDMAIL_MC:R}.cf
+.else
.if defined(SENDMAIL_CF)
-ALL+= ${SENDMAIL_CF}
+INSTALL_CF= ${SENDMAIL_CF}
+.endif
+.endif
+
+.if defined(INSTALL_CF)
+ALL+= ${INSTALL_CF}
.endif
CLEANFILES+=$(ALL)
@@ -30,22 +39,37 @@ all: $(ALL)
depend:
-install:
-.if defined(SENDMAIL_CF)
- ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 ${SENDMAIL_CF} \
+.if defined(INSTALL_CF)
+install: ${INSTALL_CF}
+.if (defined(SENDMAIL_MC) && defined(SENDMAIL_CF))
+ @echo ">>> ERROR: Both SENDMAIL_CF and SENDMAIL_MC can not be set"
+ @false
+.endif
+ ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 ${INSTALL_CF} \
${DESTDIR}/etc/mail/sendmail.cf
+.else
+install:
.endif
# Helper for src/etc/Makefile
distribution: freebsd.cf freebsd.mc
+.if (defined(SENDMAIL_MC) && defined(SENDMAIL_CF))
+ @echo ">>> ERROR: Both SENDMAIL_CF and SENDMAIL_MC can not be set"
+ @false
+.endif
${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/freebsd.mc \
${DESTDIR}/etc/mail/freebsd.mc
${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 freebsd.cf \
${DESTDIR}/etc/mail/freebsd.cf
+.if defined(INSTALL_CF)
+ ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 ${INSTALL_CF} \
+ ${DESTDIR}/etc/mail/sendmail.cf
+.else
${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 644 freebsd.cf \
${DESTDIR}/etc/mail/sendmail.cf
- ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
- ${DESTDIR}/var/log/sendmail.st
+.endif
+ ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \
+ ${DESTDIR}/var/log/sendmail.st
# this is overkill, but....
M4FILES!= find ${CFDIR} -type f -name '*.m4' -print