1# $FreeBSD$ 2# 3# Doing a make install builds /usr/share/examples 4 5DIRS!= for i in *; do \ 6 if test -d $$i -a $$i != CVS -a \ 7 $$i != ipfilter -a $$i != smbfs; then \ 8 echo $$i; \ 9 fi; \ 10 done 11 12DDIR= ${DESTDIR}/usr/share/examples 13 14NOOBJ= noobj 15 16# Define SHARED to indicate whether you want symbolic links to the system 17# source (``symlinks''), or a separate copy (``copies''); (latter useful 18# in environments where it's not possible to keep /sys publicly readable) 19SHARED?= copies 20 21all clean cleandir depend lint tags: 22 23beforeinstall: etc-examples ${SHARED} 24 25.for dir in ${DIRS} 26FILES!= find -L ${dir} \( -name CVS -prune \) -o -type f -print 27.for file in ${FILES} 28copies:: 29 ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${file} ${DDIR}/${file} 30.endfor 31.endfor 32 33.for dir in ${DIRS} 34symlinks:: 35 rm -rf ${DDIR}/${dir}; ln -s ${.CURDIR}/${dir} ${DDIR} 36.endfor 37 38etc-examples: 39.if ${SHARED} != "symlinks" 40 (cd ${.CURDIR}/../../etc; ${MAKE} etc-examples) 41.endif 42 43.if ${SHARED} != "symlinks" 44SUBDIR= ipfilter smbfs 45.endif 46 47.include <bsd.subdir.mk> 48