Makefile revision 234978
1# $FreeBSD: stable/9/share/examples/Makefile 234978 2012-05-03 19:55:36Z eadler $
2#
3# Doing a make install builds /usr/share/examples
4
5.include <bsd.own.mk>
6
7LDIRS=	BSD_daemon \
8	FreeBSD_version \
9	IPv6 \
10	bootforth \
11	csh \
12	cvsup \
13	diskless \
14	drivers \
15	etc \
16	find_interface \
17	hast \
18	ibcs2 \
19	indent \
20	ipfw \
21	jails \
22	kld \
23	libvgl \
24	mdoc \
25	netgraph \
26	nwclient \
27	perfmon \
28	portal \
29	ppi \
30	ppp \
31	printing \
32	ses \
33	scsi_target \
34	sunrpc
35
36XFILES=	BSD_daemon/FreeBSD.pfa \
37	BSD_daemon/README \
38	BSD_daemon/beastie.eps \
39	BSD_daemon/beastie.fig \
40	BSD_daemon/eps.patch \
41	BSD_daemon/poster.sh \
42	FreeBSD_version/FreeBSD_version.c \
43	FreeBSD_version/Makefile \
44	FreeBSD_version/README \
45	IPv6/USAGE \
46	bootforth/README \
47	bootforth/boot.4th \
48	bootforth/frames.4th \
49	bootforth/loader.rc \
50	bootforth/menu.4th \
51	bootforth/menuconf.4th \
52	bootforth/screen.4th \
53	csh/dot.cshrc \
54	cvsup/README \
55	cvsup/cvs-supfile \
56	cvsup/doc-supfile \
57	cvsup/gnats-supfile \
58	cvsup/ports-supfile \
59	cvsup/refuse \
60	cvsup/refuse.README \
61	cvsup/stable-supfile \
62	cvsup/standard-supfile \
63	cvsup/www-supfile \
64	diskless/ME \
65	diskless/README.BOOTP \
66	diskless/README.TEMPLATING \
67	diskless/clone_root \
68	drivers/README \
69	drivers/make_device_driver.sh \
70	drivers/make_pseudo_driver.sh \
71	etc/README.examples \
72	etc/bsd-style-copyright \
73	etc/make.conf \
74	find_interface/Makefile \
75	find_interface/README \
76	find_interface/find_interface.c \
77	hast/ucarp.sh \
78	hast/ucarp_down.sh \
79	hast/ucarp_up.sh \
80	hast/vip-down.sh \
81	hast/vip-up.sh \
82	ibcs2/README \
83	ibcs2/hello.uu \
84	indent/indent.pro \
85	ipfw/change_rules.sh \
86	jails/README \
87	kld/Makefile \
88	kld/cdev/Makefile \
89	kld/cdev/README \
90	kld/cdev/module/Makefile \
91	kld/cdev/module/cdev.c \
92	kld/cdev/module/cdev.h \
93	kld/cdev/module/cdevmod.c \
94	kld/cdev/test/Makefile \
95	kld/cdev/test/testcdev.c \
96	kld/dyn_sysctl/Makefile \
97	kld/dyn_sysctl/README \
98	kld/dyn_sysctl/dyn_sysctl.c \
99	kld/firmware/Makefile \
100	kld/firmware/README \
101	kld/firmware/fwconsumer/Makefile \
102	kld/firmware/fwconsumer/fw_consumer.c \
103	kld/firmware/fwimage/Makefile \
104	kld/firmware/fwimage/firmware.img.uu \
105	kld/khelp/Makefile \
106	kld/khelp/README \
107	kld/khelp/h_example.c \
108	kld/syscall/Makefile \
109	kld/syscall/module/Makefile \
110	kld/syscall/module/syscall.c \
111	kld/syscall/test/Makefile \
112	kld/syscall/test/call.c \
113	libvgl/Makefile \
114	libvgl/demo.c \
115	mdoc/POSIX-copyright \
116	mdoc/deshallify.sh \
117	mdoc/example.1 \
118	mdoc/example.3 \
119	mdoc/example.4 \
120	mdoc/example.9 \
121	netgraph/ether.bridge \
122	netgraph/frame_relay \
123	netgraph/ngctl \
124	netgraph/raw \
125	netgraph/udp.tunnel \
126	netgraph/virtual.chain \
127	netgraph/virtual.lan \
128	nwclient/dot.nwfsrc \
129	nwclient/nwfs.sh.sample \
130	perfmon/Makefile \
131	perfmon/README \
132	perfmon/perfmon.c \
133	portal/README \
134	portal/portal.conf \
135	ppi/Makefile \
136	ppi/ppilcd.c \
137	ppp/chap-auth \
138	ppp/login-auth \
139	ppp/ppp.conf.sample \
140	ppp/ppp.conf.span-isp \
141	ppp/ppp.conf.span-isp.working \
142	ppp/ppp.linkdown.sample \
143	ppp/ppp.linkdown.span-isp \
144	ppp/ppp.linkdown.span-isp.working \
145	ppp/ppp.linkup.sample \
146	ppp/ppp.linkup.span-isp \
147	ppp/ppp.linkup.span-isp.working \
148	ppp/ppp.secret.sample \
149	ppp/ppp.secret.span-isp \
150	ppp/ppp.secret.span-isp.working \
151	printing/README \
152	printing/diablo-if-net \
153	printing/hpdf \
154	printing/hpif \
155	printing/hpof \
156	printing/hprf \
157	printing/hpvf \
158	printing/if-simple \
159	printing/if-simpleX \
160	printing/ifhp \
161	printing/make-ps-header \
162	printing/netprint \
163	printing/psdf \
164	printing/psdfX \
165	printing/psif \
166	printing/pstf \
167	printing/pstfX \
168	ses/Makefile \
169	ses/Makefile.inc \
170	ses/getencstat/Makefile \
171	ses/getencstat/getencstat.0 \
172	ses/sesd/Makefile \
173	ses/sesd/sesd.0 \
174	ses/setencstat/Makefile \
175	ses/setencstat/setencstat.0 \
176	ses/setobjstat/Makefile \
177	ses/setobjstat/setobjstat.0 \
178	ses/srcs/chpmon.c \
179	ses/srcs/eltsub.c \
180	ses/srcs/eltsub.h \
181	ses/srcs/getencstat.c \
182	ses/srcs/getnobj.c \
183	ses/srcs/getobjmap.c \
184	ses/srcs/getobjstat.c \
185	ses/srcs/inienc.c \
186	ses/srcs/sesd.c \
187	ses/srcs/setencstat.c \
188	ses/srcs/setobjstat.c \
189	scsi_target/Makefile \
190	scsi_target/scsi_target.c \
191	scsi_target/scsi_target.h \
192	scsi_target/scsi_target.8 \
193	scsi_target/scsi_cmds.c \
194	sunrpc/Makefile \
195	sunrpc/dir/Makefile \
196	sunrpc/dir/dir.x \
197	sunrpc/dir/dir_proc.c \
198	sunrpc/dir/rls.c \
199	sunrpc/msg/Makefile \
200	sunrpc/msg/msg.x \
201	sunrpc/msg/msg_proc.c \
202	sunrpc/msg/printmsg.c \
203	sunrpc/msg/rprintmsg.c \
204	sunrpc/sort/Makefile \
205	sunrpc/sort/rsort.c \
206	sunrpc/sort/sort.x \
207	sunrpc/sort/sort_proc.c
208
209BINDIR= ${SHAREDIR}/examples
210
211NO_OBJ=
212
213# Define SHARED to indicate whether you want symbolic links to the system
214# source (``symlinks''), or a separate copy (``copies''); (latter useful
215# in environments where it's not possible to keep /sys publicly readable)
216SHARED?=	copies
217
218beforeinstall: ${SHARED} etc-examples
219.ORDER: ${SHARED} etc-examples
220
221copies:
222.for i in ${LDIRS}
223	if [ -L ${DESTDIR}${BINDIR}/$i ]; then \
224		rm -f ${DESTDIR}${BINDIR}/$i; \
225	fi
226.endfor
227	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} \
228	    -f ${.CURDIR}/../../etc/mtree/BSD.usr.dist -p ${DESTDIR}/usr
229.for file in ${XFILES}
230	${INSTALL} -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} \
231		${.CURDIR}/${file} ${DESTDIR}${BINDIR}/${file}
232.endfor
233
234symlinks:
235.for i in ${LDIRS}
236	rm -rf ${DESTDIR}${BINDIR}/$i
237	ln -s ${.CURDIR}/$i ${DESTDIR}${BINDIR}/$i
238.endfor
239
240etc-examples:
241.if ${SHARED} != "symlinks"
242	(cd ${.CURDIR}/../../etc; ${MAKE} etc-examples)
243.endif
244
245.if ${SHARED} != "symlinks"
246SUBDIR=	smbfs
247.if ${MK_IPFILTER} != "no"
248SUBDIR+=ipfilter
249.endif
250.if ${MK_PF} != "no"
251SUBDIR+=pf
252.endif
253.endif
254
255.include <bsd.subdir.mk>
256