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