xref: /freebsd/share/sendmail/Makefile (revision 41059135ce931c0f1014a999ffabc6bc470ce856)
1# $FreeBSD$
2#
3# Doing a make install builds /usr/share/sendmail/
4
5PACKAGE=	sendmail
6FILESGROUPS+=	SM
7SENDMAIL_DIR=	${SRCTOP}/contrib/sendmail
8CFDIR=	cf
9CFPACKAGE=	sendmail
10CFDIRS!=	(cd ${SENDMAIL_DIR}; find -L ${CFDIR} \( \( -name CVS -o -name .svn \) -prune \) -o -type d -print)
11CFFILES!=	(cd ${SENDMAIL_DIR}; find -L ${CFDIR} \( \( -name CVS -o -name .svn \) -prune \) -o -type f -print)
12SMFILES= 	${CFFILES}
13SMFILESDIR=	${DDIR}
14
15DDIR=	${DESTDIR}${SHAREDIR}/sendmail
16
17# Define SHARED to indicate whether you want symbolic links to the system
18# source (``symlinks''), or a separate copy (``copies'')
19SHARED?=	copies
20
21all clean cleandir depend lint tags:
22
23beforeinstall: ${SHARED}
24META_TARGETS+=	copies symlinks
25
26copies:
27	if [ -L ${DDIR}/${CFDIR} ]; then rm -f ${DDIR}/${CFDIR}; fi
28.for dir in ${CFDIRS}
29	${INSTALL} -T package=${PACKAGE:Usendmail} ${TAGS_ARGS} -o ${BINOWN} -g ${BINGRP} -m 755 -d ${DDIR}/${dir}
30.endfor
31.for file in ${CFFILES}
32	${INSTALL} -T package=${PACKAGE:Usendmail} ${TAGS_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 ${SENDMAIL_DIR}/${file} ${DDIR}/${file}
33.endfor
34
35symlinks:
36	rm -rf ${DDIR}/${CFDIR}; ln -s ${SENDMAIL_DIR}/${CFDIR} ${DDIR}/${CFDIR}
37
38.include <bsd.prog.mk>
39