xref: /freebsd/share/sendmail/Makefile (revision a5921bc3653e2e286715e6fe8d473ec0d02da38c)
131923af7SGregory Neil Shapiro# $FreeBSD$
231923af7SGregory Neil Shapiro#
331923af7SGregory Neil Shapiro# Doing a make install builds /usr/share/sendmail/
431923af7SGregory Neil Shapiro
5*a5921bc3SGlen BarberPACKAGE=	sendmail
6*a5921bc3SGlen BarberFILESGROUPS+=	SM
731923af7SGregory Neil ShapiroSENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail
831923af7SGregory Neil ShapiroCFDIR=	cf
9b5ff185eSBaptiste DaroussinCFPACKAGE=	sendmail
102227a3e9SRemko LodderCFDIRS!=	(cd ${SENDMAIL_DIR}; find -L ${CFDIR} \( \( -name CVS -o -name .svn \) -prune \) -o -type d -print)
112227a3e9SRemko LodderCFFILES!=	(cd ${SENDMAIL_DIR}; find -L ${CFDIR} \( \( -name CVS -o -name .svn \) -prune \) -o -type f -print)
12*a5921bc3SGlen BarberSMFILES= 	${CFFILES}
13*a5921bc3SGlen BarberSMFILESDIR=	${DDIR}
1431923af7SGregory Neil Shapiro
157d8f797bSBryan DreweryDDIR=	${DESTDIR}${SHAREDIR}/sendmail
1631923af7SGregory Neil Shapiro
1731923af7SGregory Neil Shapiro# Define SHARED to indicate whether you want symbolic links to the system
1831923af7SGregory Neil Shapiro# source (``symlinks''), or a separate copy (``copies'')
1931923af7SGregory Neil ShapiroSHARED?=	copies
2031923af7SGregory Neil Shapiro
2131923af7SGregory Neil Shapiroall clean cleandir depend lint tags:
2231923af7SGregory Neil Shapiro
2331923af7SGregory Neil Shapirobeforeinstall: ${SHARED}
24b7d28affSBryan DreweryMETA_TARGETS+=	copies symlinks
2531923af7SGregory Neil Shapiro
2694086ceaSBryan Drewerycopies:
27f4c5766bSGregory Neil Shapiro	if [ -L ${DDIR}/${CFDIR} ]; then rm -f ${DDIR}/${CFDIR}; fi
2831923af7SGregory Neil Shapiro.for dir in ${CFDIRS}
29*a5921bc3SGlen Barber	${INSTALL} -T package=${PACKAGE:Usendmail} ${TAGS_ARGS} -o ${BINOWN} -g ${BINGRP} -m 755 -d ${DDIR}/${dir}
3031923af7SGregory Neil Shapiro.endfor
3131923af7SGregory Neil Shapiro.for file in ${CFFILES}
32*a5921bc3SGlen Barber	${INSTALL} -T package=${PACKAGE:Usendmail} ${TAGS_ARGS} -o ${BINOWN} -g ${BINGRP} -m 444 ${SENDMAIL_DIR}/${file} ${DDIR}/${file}
3331923af7SGregory Neil Shapiro.endfor
3431923af7SGregory Neil Shapiro
3594086ceaSBryan Drewerysymlinks:
3631923af7SGregory Neil Shapiro	rm -rf ${DDIR}/${CFDIR}; ln -s ${SENDMAIL_DIR}/${CFDIR} ${DDIR}/${CFDIR}
3731923af7SGregory Neil Shapiro
3831923af7SGregory Neil Shapiro.include <bsd.prog.mk>
39