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