]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/sendmail/Makefile
MFH
[FreeBSD/FreeBSD.git] / share / sendmail / Makefile
1 # $FreeBSD$
2 #
3 # Doing a make install builds /usr/share/sendmail/
4
5 SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail
6 CFDIR=  cf
7 CFPACKAGE=      sendmail
8 CFDIRS!=        (cd ${SENDMAIL_DIR}; find -L ${CFDIR} \( \( -name CVS -o -name .svn \) -prune \) -o -type d -print)
9 CFFILES!=       (cd ${SENDMAIL_DIR}; find -L ${CFDIR} \( \( -name CVS -o -name .svn \) -prune \) -o -type f -print)
10
11 DDIR=   ${DESTDIR}${SHAREDIR}/sendmail
12
13 # Define SHARED to indicate whether you want symbolic links to the system
14 # source (``symlinks''), or a separate copy (``copies'')
15 SHARED?=        copies
16
17 all clean cleandir depend lint tags:
18
19 beforeinstall: ${SHARED}
20 META_TARGETS+=  copies symlinks
21
22 copies: ${META_DEPS}
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
31 symlinks: ${META_DEPS}
32         rm -rf ${DDIR}/${CFDIR}; ln -s ${SENDMAIL_DIR}/${CFDIR} ${DDIR}/${CFDIR}
33
34 .include <bsd.prog.mk>