]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/blob - share/examples/Makefile
MFC r233429,r233435,r233437,r234077,r234133,r234135,r234159,r234823:
[FreeBSD/stable/8.git] / share / examples / Makefile
1 # $FreeBSD$
2 #
3 # Doing a make install builds /usr/share/examples
4
5 .include <bsd.own.mk>
6
7 LDIRS=  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         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
35 XFILES= 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         csh/dot.cshrc \
53         cvsup/README \
54         cvsup/cvs-supfile \
55         cvsup/doc-supfile \
56         cvsup/gnats-supfile \
57         cvsup/ports-supfile \
58         cvsup/refuse \
59         cvsup/refuse.README \
60         cvsup/stable-supfile \
61         cvsup/standard-supfile \
62         cvsup/www-supfile \
63         diskless/ME \
64         diskless/README.BOOTP \
65         diskless/README.TEMPLATING \
66         diskless/clone_root \
67         drivers/README \
68         drivers/make_device_driver.sh \
69         drivers/make_pseudo_driver.sh \
70         etc/README.examples \
71         etc/bsd-style-copyright \
72         etc/make.conf \
73         find_interface/Makefile \
74         find_interface/README \
75         find_interface/find_interface.c \
76         hast/ucarp.sh \
77         hast/ucarp_down.sh \
78         hast/ucarp_up.sh \
79         hast/vip-down.sh \
80         hast/vip-up.sh \
81         ibcs2/README \
82         ibcs2/hello.uu \
83         indent/indent.pro \
84         ipfw/change_rules.sh \
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         nwclient/dot.nwfsrc \
125         nwclient/nwfs.sh.sample \
126         perfmon/Makefile \
127         perfmon/README \
128         perfmon/perfmon.c \
129         portal/README \
130         portal/portal.conf \
131         ppi/Makefile \
132         ppi/ppilcd.c \
133         ppp/chap-auth \
134         ppp/login-auth \
135         ppp/ppp.conf.sample \
136         ppp/ppp.conf.span-isp \
137         ppp/ppp.conf.span-isp.working \
138         ppp/ppp.linkdown.sample \
139         ppp/ppp.linkdown.span-isp \
140         ppp/ppp.linkdown.span-isp.working \
141         ppp/ppp.linkup.sample \
142         ppp/ppp.linkup.span-isp \
143         ppp/ppp.linkup.span-isp.working \
144         ppp/ppp.secret.sample \
145         ppp/ppp.secret.span-isp \
146         ppp/ppp.secret.span-isp.working \
147         printing/README \
148         printing/diablo-if-net \
149         printing/hpdf \
150         printing/hpif \
151         printing/hpof \
152         printing/hprf \
153         printing/hpvf \
154         printing/if-simple \
155         printing/if-simpleX \
156         printing/ifhp \
157         printing/make-ps-header \
158         printing/netprint \
159         printing/psdf \
160         printing/psdfX \
161         printing/psif \
162         printing/pstf \
163         printing/pstfX \
164         ses/Makefile \
165         ses/Makefile.inc \
166         ses/getencstat/Makefile \
167         ses/getencstat/getencstat.0 \
168         ses/sesd/Makefile \
169         ses/sesd/sesd.0 \
170         ses/setencstat/Makefile \
171         ses/setencstat/setencstat.0 \
172         ses/setobjstat/Makefile \
173         ses/setobjstat/setobjstat.0 \
174         ses/srcs/chpmon.c \
175         ses/srcs/eltsub.c \
176         ses/srcs/getencstat.c \
177         ses/srcs/getnobj.c \
178         ses/srcs/getobjmap.c \
179         ses/srcs/getobjstat.c \
180         ses/srcs/inienc.c \
181         ses/srcs/sesd.c \
182         ses/srcs/setencstat.c \
183         ses/srcs/setobjstat.c \
184         scsi_target/Makefile \
185         scsi_target/scsi_target.c \
186         scsi_target/scsi_target.h \
187         scsi_target/scsi_target.8 \
188         scsi_target/scsi_cmds.c \
189         sunrpc/Makefile \
190         sunrpc/dir/Makefile \
191         sunrpc/dir/dir.x \
192         sunrpc/dir/dir_proc.c \
193         sunrpc/dir/rls.c \
194         sunrpc/msg/Makefile \
195         sunrpc/msg/msg.x \
196         sunrpc/msg/msg_proc.c \
197         sunrpc/msg/printmsg.c \
198         sunrpc/msg/rprintmsg.c \
199         sunrpc/sort/Makefile \
200         sunrpc/sort/rsort.c \
201         sunrpc/sort/sort.x \
202         sunrpc/sort/sort_proc.c
203
204 BINDIR= ${SHAREDIR}/examples
205
206 NO_OBJ=
207
208 # Define SHARED to indicate whether you want symbolic links to the system
209 # source (``symlinks''), or a separate copy (``copies''); (latter useful
210 # in environments where it's not possible to keep /sys publicly readable)
211 SHARED?=        copies
212
213 beforeinstall: ${SHARED} etc-examples
214 .ORDER: ${SHARED} etc-examples
215
216 copies:
217 .for i in ${LDIRS}
218         if [ -L ${DESTDIR}${BINDIR}/$i ]; then \
219                 rm -f ${DESTDIR}${BINDIR}/$i; \
220         fi
221 .endfor
222         mtree -deU ${MTREE_FOLLOWS_SYMLINKS} \
223             -f ${.CURDIR}/../../etc/mtree/BSD.usr.dist -p ${DESTDIR}/usr
224 .for file in ${XFILES}
225         ${INSTALL} -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} \
226                 ${.CURDIR}/${file} ${DESTDIR}${BINDIR}/${file}
227 .endfor
228
229 symlinks:
230 .for i in ${LDIRS}
231         rm -rf ${DESTDIR}${BINDIR}/$i
232         ln -s ${.CURDIR}/$i ${DESTDIR}${BINDIR}/$i
233 .endfor
234
235 etc-examples:
236 .if ${SHARED} != "symlinks"
237         (cd ${.CURDIR}/../../etc; ${MAKE} etc-examples)
238 .endif
239
240 .if ${SHARED} != "symlinks"
241 SUBDIR= smbfs
242 .if ${MK_IPFILTER} != "no"
243 SUBDIR+=ipfilter
244 .endif
245 .if ${MK_PF} != "no"
246 SUBDIR+=pf
247 .endif
248 .endif
249
250 .include <bsd.subdir.mk>