166940Sgshapiro# $FreeBSD$
266940Sgshapiro#
366940Sgshapiro# Doing a make install builds /usr/share/sendmail/
466940Sgshapiro
566940SgshapiroSENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail
666940SgshapiroCFDIR=	cf
7179460SremkoCFDIRS!=	(cd ${SENDMAIL_DIR}; find -L ${CFDIR} \( \( -name CVS -o -name .svn \) -prune \) -o -type d -print)
8179460SremkoCFFILES!=	(cd ${SENDMAIL_DIR}; find -L ${CFDIR} \( \( -name CVS -o -name .svn \) -prune \) -o -type f -print)
966940Sgshapiro
1066940SgshapiroDDIR=	${DESTDIR}/usr/share/sendmail
1166940Sgshapiro
12139103SruNO_OBJ=
1366940Sgshapiro
1466940Sgshapiro# Define SHARED to indicate whether you want symbolic links to the system
1566940Sgshapiro# source (``symlinks''), or a separate copy (``copies'')
1666940SgshapiroSHARED?=	copies
1766940Sgshapiro
1866940Sgshapiroall clean cleandir depend lint tags:
1966940Sgshapiro
2066940Sgshapirobeforeinstall: ${SHARED}
2166940Sgshapiro
2266940Sgshapirocopies::
23114775Sgshapiro	if [ -L ${DDIR}/${CFDIR} ]; then rm -f ${DDIR}/${CFDIR}; fi
2466940Sgshapiro.for dir in ${CFDIRS}
2577406Sgshapiro	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 -d ${DDIR}/${dir}
2666940Sgshapiro.endfor
2766940Sgshapiro.for file in ${CFFILES}
28100872Sru	${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 ${SENDMAIL_DIR}/${file} ${DDIR}/${file}
2966940Sgshapiro.endfor
3066940Sgshapiro
3166940Sgshapirosymlinks::
3266940Sgshapiro	rm -rf ${DDIR}/${CFDIR}; ln -s ${SENDMAIL_DIR}/${CFDIR} ${DDIR}/${CFDIR}
3366940Sgshapiro
3466940Sgshapiro.include <bsd.prog.mk>
35