From 6f3eff710681ba79fd764a5d21243597a6a89c35 Mon Sep 17 00:00:00 2001 From: gshapiro Date: Tue, 15 May 2001 16:01:40 +0000 Subject: 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 --- etc/mail/Makefile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'etc/mail') diff --git a/etc/mail/Makefile b/etc/mail/Makefile index b04c73a..930efee 100644 --- a/etc/mail/Makefile +++ b/etc/mail/Makefile @@ -25,11 +25,13 @@ # # ------------------------------------------------------------------------ # -# This makefile uses `freebsd.mc' as the default .mc file. This can +# This makefile uses `.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 '.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 -- cgit v1.1