Makefile revision 54351
1176998Sphk# $FreeBSD: head/share/examples/Makefile 54351 1999-12-09 09:35:36Z marcel $ 2176998Sphk# 3176998Sphk# Doing a make install builds /usr/share/examples 4176998Sphk 5176998SphkDIRS!= for i in *; do if test -d $$i -a $$i != CVS; then echo $$i; fi; done 6176998Sphk 7176998SphkDDIR= ${DESTDIR}/usr/share/examples 8176998Sphk 9176998SphkNOOBJ= noobj 10176998Sphk 11176998Sphk# Define SHARED to indicate whether you want symbolic links to the system 12176998Sphk# source (``symlinks''), or a separate copy (``copies''); (latter useful 13176998Sphk# in environments where it's not possible to keep /sys publicly readable) 14176998SphkSHARED?= copies 15176998Sphk 16176998Sphkall clean cleandir depend lint tags: 17176998Sphk 18176998Sphkbeforeinstall: etc-examples ${SHARED} 19176998Sphk 20176998Sphk.for dir in ${DIRS} 21176998SphkFILES!= find -L ${dir} \( -name CVS -prune \) -o -type f -print 22176998Sphk.for file in ${FILES} 23176998Sphkcopies:: 24176998Sphk ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${file} ${DDIR}/${file} 25176998Sphk.endfor 26176998Sphk.endfor 27176998Sphk 28176998Sphk.for dir in ${DIRS} 29176998Sphksymlinks:: 30176998Sphk rm -rf ${DDIR}/${dir}; ln -s ${.CURDIR}/${dir} ${DDIR} 31176998Sphk.endfor 32176998Sphk 33176998Sphketc-examples: 34176998Sphk.if ${SHARED} != "symlinks" 35176998Sphk (cd ${.CURDIR}/../../etc; ${MAKE} etc-examples) 36176998Sphk.endif 37176998Sphk 38176998Sphk.include <bsd.prog.mk> 39176998Sphk