diff options
author | Ruslan Ermilov <ru@FreeBSD.org> | 2004-01-22 17:51:02 +0000 |
---|---|---|
committer | Ruslan Ermilov <ru@FreeBSD.org> | 2004-01-22 17:51:02 +0000 |
commit | bee2fe7236bc50719d68149951a4f952ef4f5dcd (patch) | |
tree | 5d44a71eef47a2438ed250dedf2de1de96ee9866 /etc/sendmail | |
parent | acf7d97237409acab7930c7845d407a8543a7ae9 (diff) |
Catch up with etc/Makefile,v 1.324 -- split "install" and "distribution"
targets, have "distribution" always install original (as from the release
media) files, whether SENDMAIL_MC is set or not. Do error handling the
make(1) way.
Reviewed by: gshapiro
Approved by: gshapiro
Notes
Notes:
svn path=/head/; revision=124839
Diffstat (limited to 'etc/sendmail')
-rw-r--r-- | etc/sendmail/Makefile | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/etc/sendmail/Makefile b/etc/sendmail/Makefile index 79cd3940e6ed..b79e722a4bf4 100644 --- a/etc/sendmail/Makefile +++ b/etc/sendmail/Makefile @@ -31,7 +31,9 @@ CLEANFILES= freebsd.cf freebsd.submit.cf # 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) +.if defined(SENDMAIL_MC) && defined(SENDMAIL_CF) +.error Both SENDMAIL_MC and SENDMAIL_CF cannot be set. +.elif defined(SENDMAIL_MC) INSTALL_CF= ${SENDMAIL_MC:T:R}.cf ALL+= ${INSTALL_CF} CLEANFILES+= ${SENDMAIL_MC:T:R}.cf @@ -60,12 +62,7 @@ ${mc:T:R}.cf: ${mc} all: ${ALL} -install distribution: -.if defined(SENDMAIL_MC) && defined(SENDMAIL_CF) - @echo ">>> ERROR: Both SENDMAIL_MC and SENDMAIL_CF cannot be set" - @false -.endif -.if make(distribution) +distribution: ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ ${.CURDIR}/freebsd.mc freebsd.cf ${DESTDIR}/etc/mail ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ @@ -74,26 +71,24 @@ install distribution: ${SMDIR}/helpfile ${DESTDIR}/etc/mail ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 640 \ /dev/null ${DESTDIR}/var/log/sendmail.st -.endif + ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ + freebsd.cf ${DEST_CF} + ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ + freebsd.submit.cf ${DEST_SUBMIT_CF} + +install: .if defined(INSTALL_CF) && ${INSTALL_CF} != ${DEST_CF} ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ ${INSTALL_CF} ${DEST_CF} -.elif make(distribution) - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ - freebsd.cf ${DEST_CF} .endif -.if defined(SENDMAIL_ADDITIONAL_CF) && make(install) +.if defined(SENDMAIL_ADDITIONAL_CF) ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ ${SENDMAIL_ADDITIONAL_CF} ${DESTDIR}/etc/mail .endif -.if !defined(SENDMAIL_SET_USER_ID) -.if defined(INSTALL_SUBMIT_CF) && ${INSTALL_SUBMIT_CF} != ${DEST_SUBMIT_CF} +.if !defined(SENDMAIL_SET_USER_ID) && \ + defined(INSTALL_SUBMIT_CF) && ${INSTALL_SUBMIT_CF} != ${DEST_SUBMIT_CF} ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ ${INSTALL_SUBMIT_CF} ${DEST_SUBMIT_CF} -.elif make(distribution) - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ - freebsd.submit.cf ${DEST_SUBMIT_CF} -.endif .endif .include <bsd.prog.mk> |