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