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