Makefile revision 50476
150472Speter# $FreeBSD: head/share/examples/Makefile 50476 1999-08-28 00:22:10Z peter $
218140Spst#
3161281Sru# Doing a make install builds /usr/share/examples
4161281Sru
531804SbdeDIRS!=	for i in *; do if test -d $$i -a $$i != CVS; then echo $$i; fi; done
631804Sbde
731804SbdeDDIR=	${DESTDIR}/usr/share/examples
869632Sru
918140SpstNOOBJ=	noobj
1018140Spst
11104869Sru# Define SHARED to indicate whether you want symbolic links to the system
12104869Sru# source (``symlinks''), or a separate copy (``copies''); (latter useful
13104869Sru# in environments where it's not possible to keep /sys publicly readable)
1475592SruSHARED?=	copies
1569632Sru
1675592Sruall clean cleandir depend lint tags:
1718140Spst
1875592Srubeforeinstall: etc-examples ${SHARED}
1918140Spst
2075592Sru.for dir in ${DIRS}
2175592SruFILES!=	find -L ${dir} \( -name CVS -prune \) -o -type f -print
2275592Sru.for file in ${FILES}
2375592Srucopies::
2475592Sru	${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 ${file} ${DDIR}/${file}
25114412Sru.endfor
26104869Sru.endfor
2775592Sru
2875592Sru.for dir in ${DIRS}
2975592Srusymlinks::
3075592Sru	rm -rf ${DDIR}/${dir}; ln -s ${.CURDIR}/${dir} ${DDIR}
31104869Sru.endfor
32114412Sru
33151504Sruetc-examples:
3475592Sru.if ${SHARED} != "symlinks"
3575592Sru	(cd ${.CURDIR}/../../etc; ${MAKE} etc-examples)
36104869Sru.endif
37114412Sru
38151504Sru.include <bsd.prog.mk>
39114412Sru