Makefile revision 107215
1# $FreeBSD: head/share/examples/Makefile 107215 2002-11-24 23:57:07Z njl $
2#
3# Doing a make install builds /usr/share/examples
4
5LDIRS=	BSD_daemon \
6	FreeBSD_version \
7	IPv6 \
8	atm \
9	bootforth \
10	cvsup \
11	diskless \
12	drivers \
13	etc \
14	find_interface \
15	ibcs2 \
16	ipfw \
17	isdn \
18	kld \
19	libvgl \
20	mdoc \
21	meteor \
22	netgraph \
23	nwclient \
24	perfmon \
25	portal \
26	ppi \
27	ppp \
28	pppd \
29	printing \
30	ses \
31	scsi_target \
32	slattach \
33	sliplogin \
34	startslip \
35	sunrpc \
36	worm
37
38XFILES=	BSD_daemon/FreeBSD.pfa \
39	BSD_daemon/README \
40	BSD_daemon/beastie.eps \
41	BSD_daemon/beastie.fig \
42	BSD_daemon/eps.patch \
43	BSD_daemon/poster.sh \
44	FreeBSD_version/FreeBSD_version.c \
45	FreeBSD_version/Makefile \
46	FreeBSD_version/README \
47	IPv6/USAGE \
48	atm/NOTES \
49	atm/README \
50	atm/Startup \
51	atm/atm-config.sh \
52	atm/atm-sockets.txt \
53	atm/cpcs-design.txt \
54	atm/fore-microcode.txt \
55	atm/sscf-design.txt \
56	atm/sscop-design.txt \
57	bootforth/README \
58	bootforth/boot.4th \
59	bootforth/frames.4th \
60	bootforth/loader.rc \
61	bootforth/menu.4th \
62	bootforth/menuconf.4th \
63	bootforth/screen.4th \
64	cvsup/README \
65	cvsup/cvs-supfile \
66	cvsup/doc-supfile \
67	cvsup/gnats-supfile \
68	cvsup/ports-supfile \
69	cvsup/refuse \
70	cvsup/refuse.README \
71	cvsup/stable-supfile \
72	cvsup/standard-supfile \
73	cvsup/www-supfile \
74	diskless/ME \
75	diskless/README.BOOTP \
76	diskless/README.TEMPLATING \
77	diskless/clone_root \
78	drivers/README \
79	drivers/make_device_driver.sh \
80	drivers/make_pseudo_driver.sh \
81	etc/README.examples \
82	etc/bsd-style-copyright \
83	etc/make.conf \
84	find_interface/Makefile \
85	find_interface/README \
86	find_interface/find_interface.c \
87	ibcs2/README \
88	ibcs2/hello.uu \
89	ipfw/change_rules.sh \
90	isdn/FAQ \
91	isdn/KERNEL \
92	isdn/Overview \
93	isdn/README \
94	isdn/ROADMAP \
95	isdn/ReleaseNotes \
96	isdn/Resources \
97	isdn/SupportedCards \
98	isdn/ThankYou \
99	isdn/contrib/README \
100	isdn/contrib/anleitung.ppp \
101	isdn/contrib/answer.c \
102	isdn/contrib/answer.sh \
103	isdn/contrib/convert.sh \
104	isdn/contrib/hplay.c \
105	isdn/contrib/i4b-ppp-newbie.txt \
106	isdn/contrib/isdnctl \
107	isdn/contrib/isdnd_acct \
108	isdn/contrib/isdnd_acct.pl \
109	isdn/contrib/isdntelmux.c \
110	isdn/contrib/mrtg-isp0.sh \
111	isdn/i4brunppp/Makefile \
112	isdn/i4brunppp/README \
113	isdn/i4brunppp/i4brunppp-isdnd.rc \
114	isdn/i4brunppp/i4brunppp.8 \
115	isdn/i4brunppp/i4brunppp.c \
116	isdn/v21/Makefile \
117	isdn/v21/README \
118	isdn/v21/v21modem.c \
119	kld/Makefile \
120	kld/cdev/Makefile \
121	kld/cdev/README \
122	kld/cdev/module/Makefile \
123	kld/cdev/module/cdev.c \
124	kld/cdev/module/cdev.h \
125	kld/cdev/module/cdevmod.c \
126	kld/cdev/test/Makefile \
127	kld/cdev/test/testcdev.c \
128	kld/dyn_sysctl/Makefile \
129	kld/dyn_sysctl/README \
130	kld/dyn_sysctl/dyn_sysctl.c \
131	kld/syscall/Makefile \
132	kld/syscall/module/Makefile \
133	kld/syscall/module/syscall.c \
134	kld/syscall/test/Makefile \
135	kld/syscall/test/call.c \
136	libvgl/Makefile \
137	libvgl/demo.c \
138	mdoc/example.1 \
139	mdoc/example.3 \
140	mdoc/example.4 \
141	meteor/README \
142	meteor/rgb16.c \
143	meteor/rgb24.c \
144	meteor/test-n.c \
145	meteor/yuvpk.c \
146	meteor/yuvpl.c \
147	netgraph/ether.bridge \
148	netgraph/frame_relay \
149	netgraph/ngctl \
150	netgraph/raw \
151	netgraph/udp.tunnel \
152	nwclient/dot.nwfsrc \
153	nwclient/nwfs.sh.sample \
154	perfmon/Makefile \
155	perfmon/README \
156	perfmon/perfmon.c \
157	portal/README \
158	portal/portal.conf \
159	ppi/Makefile \
160	ppi/ppilcd.c \
161	ppp/chap-auth \
162	ppp/isdnd.rc \
163	ppp/login-auth \
164	ppp/ppp.conf.isdn \
165	ppp/ppp.conf.sample \
166	ppp/ppp.conf.span-isp \
167	ppp/ppp.conf.span-isp.working \
168	ppp/ppp.linkdown.sample \
169	ppp/ppp.linkdown.span-isp \
170	ppp/ppp.linkdown.span-isp.working \
171	ppp/ppp.linkup.sample \
172	ppp/ppp.linkup.span-isp \
173	ppp/ppp.linkup.span-isp.working \
174	ppp/ppp.secret.sample \
175	ppp/ppp.secret.span-isp \
176	ppp/ppp.secret.span-isp.working \
177	pppd/auth-down.sample \
178	pppd/auth-up.sample \
179	pppd/chap-secrets.sample \
180	pppd/chat.sh.sample \
181	pppd/ip-down.sample \
182	pppd/ip-up.sample \
183	pppd/options.sample \
184	pppd/pap-secrets.sample \
185	pppd/ppp.deny.sample \
186	pppd/ppp.shells.sample \
187	printing/README \
188	printing/diablo-if-net \
189	printing/hpdf \
190	printing/hpif \
191	printing/hpof \
192	printing/hprf \
193	printing/hpvf \
194	printing/if-simple \
195	printing/if-simpleX \
196	printing/ifhp \
197	printing/make-ps-header \
198	printing/netprint \
199	printing/psdf \
200	printing/psdfX \
201	printing/psif \
202	printing/pstf \
203	printing/pstfX \
204	ses/Makefile \
205	ses/Makefile.inc \
206	ses/getencstat/Makefile \
207	ses/getencstat/getencstat.0 \
208	ses/sesd/Makefile \
209	ses/sesd/sesd.0 \
210	ses/setencstat/Makefile \
211	ses/setencstat/setencstat.0 \
212	ses/setobjstat/Makefile \
213	ses/setobjstat/setobjstat.0 \
214	ses/srcs/chpmon.c \
215	ses/srcs/eltsub.c \
216	ses/srcs/getencstat.c \
217	ses/srcs/getnobj.c \
218	ses/srcs/getobjmap.c \
219	ses/srcs/getobjstat.c \
220	ses/srcs/inienc.c \
221	ses/srcs/sesd.c \
222	ses/srcs/setencstat.c \
223	ses/srcs/setobjstat.c \
224	scsi_target/Makefile \
225	scsi_target/scsi_target.c \
226	scsi_target/scsi_target.h \
227	scsi_target/scsi_target.8 \
228	scsi_target/scsi_cmds.c \
229	slattach/unit-command.sh \
230	sliplogin/slip.hosts \
231	sliplogin/slip.login \
232	sliplogin/slip.logout \
233	sliplogin/slip.slparms \
234	startslip/sldown.sh \
235	startslip/slip.sh \
236	startslip/slup.sh \
237	sunrpc/Makefile \
238	sunrpc/dir/Makefile \
239	sunrpc/dir/dir.x \
240	sunrpc/dir/dir_proc.c \
241	sunrpc/dir/rls.c \
242	sunrpc/msg/Makefile \
243	sunrpc/msg/msg.x \
244	sunrpc/msg/msg_proc.c \
245	sunrpc/msg/printmsg.c \
246	sunrpc/msg/rprintmsg.c \
247	sunrpc/sort/Makefile \
248	sunrpc/sort/rsort.c \
249	sunrpc/sort/sort.x \
250	sunrpc/sort/sort_proc.c \
251	worm/README \
252	worm/makecdfs.sh
253
254BINDIR= ${SHAREDIR}/examples
255
256NOOBJ=  noobj
257
258# Define SHARED to indicate whether you want symbolic links to the system
259# source (``symlinks''), or a separate copy (``copies''); (latter useful
260# in environments where it's not possible to keep /sys publicly readable)
261SHARED?=	copies
262
263beforeinstall: ${SHARED} etc-examples
264.ORDER: ${SHARED} etc-examples
265
266copies:
267.for i in ${LDIRS}
268	if [ -L ${DESTDIR}${BINDIR}/$i ]; then \
269		rm -f ${DESTDIR}${BINDIR}/$i; \
270	fi
271.endfor
272	mtree -deU ${MTREE_FOLLOWS_SYMLINKS} \
273	    -f ${.CURDIR}/../../etc/mtree/BSD.usr.dist -p ${DESTDIR}/usr
274.for file in ${XFILES}
275	${INSTALL} -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} \
276		${.CURDIR}/${file} ${DESTDIR}${BINDIR}/${file}
277.endfor
278
279symlinks:
280.for i in ${LDIRS}
281	rm -rf ${DESTDIR}${BINDIR}/$i
282	ln -s ${.CURDIR}/$i ${DESTDIR}${BINDIR}/$i
283.endfor
284
285etc-examples:
286.if ${SHARED} != "symlinks"
287	(cd ${.CURDIR}/../../etc; ${MAKE} etc-examples)
288.endif
289
290.if ${SHARED} != "symlinks"
291SUBDIR=	smbfs
292.if !defined(NO_IPFILTER)
293SUBDIR+=ipfilter
294.endif
295.endif
296
297.include <bsd.subdir.mk>
298