Makefile revision 13537
1#	$Id: Makefile,v 1.18 1995/12/11 03:03:24 peter Exp $
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 ${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