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