Make the default .mc file be hostname.mc if SENDMAIL_MC make.conf knob

is not set.  This allows admins to create a per-machine configuration file
while leaving the freebsd.mc template pristine.  Provide a rule to create
`hostname`.mc from freebsd.mc if it doesn't exist.

PR:		misc/26299
MFC after:	8 days
This commit is contained in:
Gregory Neil Shapiro 2001-05-15 16:01:40 +00:00
parent a00856a88c
commit f3850b5461

View File

@ -25,11 +25,13 @@
#
# ------------------------------------------------------------------------
#
# This makefile uses `freebsd.mc' as the default .mc file. This can
# This makefile uses `<HOSTNAME>.mc' as the default .mc file. This can
# be changed by defining SENDMAIL_MC in /etc/make.conf, e.g.:
#
# SENDMAIL_MC=/etc/mail/myconfig.mc
#
# If '<HOSTNAME>.mc' does not exist, it is created using 'freebsd.mc'
# as a template.
# ------------------------------------------------------------------------
#
# The Makefile knows about the following maps:
@ -37,7 +39,14 @@
# uucpdomain, virtusertable
#
SENDMAIL_MC?= freebsd.mc
.ifndef SENDMAIL_MC
SENDMAIL_MC!= hostname
SENDMAIL_MC:= ${SENDMAIL_MC}.mc
${SENDMAIL_MC}: freebsd.mc
cp freebsd.mc ${SENDMAIL_MC}
.endif
INSTALL_CF= ${SENDMAIL_MC:R}.cf
SENDMAIL_ALIASES?= /etc/mail/aliases