Makefile revision 50476
150476Speter# $FreeBSD: head/share/examples/Makefile 50476 1999-08-28 00:22:10Z peter $ 21987Swollman# 31987Swollman# Doing a make install builds /usr/share/examples 41987Swollman 513537SbdeDIRS!= for i in *; do if test -d $$i -a $$i != CVS; then echo $$i; fi; done 64257Sphk 713537SbdeDDIR= ${DESTDIR}/usr/share/examples 84257Sphk 92365SbdeNOOBJ= noobj 101987Swollman 111987Swollman# Define SHARED to indicate whether you want symbolic links to the system 121987Swollman# source (``symlinks''), or a separate copy (``copies''); (latter useful 131987Swollman# in environments where it's not possible to keep /sys publicly readable) 141987SwollmanSHARED?= copies 151987Swollman 162365Sbdeall clean cleandir depend lint tags: 172365Sbde 1848185Ssheldonhbeforeinstall: etc-examples ${SHARED} 191987Swollman 2013537Sbde.for dir in ${DIRS} 2118074SjkhFILES!= find -L ${dir} \( -name CVS -prune \) -o -type f -print 2213537Sbde.for file in ${FILES} 2313537Sbdecopies:: 2421159Sbde ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${file} ${DDIR}/${file} 2513537Sbde.endfor 2613537Sbde.endfor 271987Swollman 2813537Sbde.for dir in ${DIRS} 2913537Sbdesymlinks:: 3013537Sbde rm -rf ${DDIR}/${dir}; ln -s ${.CURDIR}/${dir} ${DDIR} 3113537Sbde.endfor 321987Swollman 3348185Ssheldonhetc-examples: 3448277Ssheldonh.if ${SHARED} != "symlinks" 3548185Ssheldonh (cd ${.CURDIR}/../../etc; ${MAKE} etc-examples) 3648277Ssheldonh.endif 3748185Ssheldonh 381987Swollman.include <bsd.prog.mk> 39