]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - share/examples/Makefile
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.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         jails \
22         kld \
23         libvgl \
24         mdoc \
25         netgraph \
26         nwclient \
27         perfmon \
28         portal \
29         ppi \
30         ppp \
31         printing \
32         ses \
33         scsi_target \
34         sunrpc
35
36 XFILES= 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         bootforth/README \
47         bootforth/boot.4th \
48         bootforth/frames.4th \
49         bootforth/loader.rc \
50         bootforth/menu.4th \
51         bootforth/menuconf.4th \
52         bootforth/screen.4th \
53         csh/dot.cshrc \
54         cvsup/README \
55         cvsup/cvs-supfile \
56         cvsup/gnats-supfile \
57         cvsup/stable-supfile \
58         cvsup/standard-supfile \
59         diskless/ME \
60         diskless/README.BOOTP \
61         diskless/README.TEMPLATING \
62         diskless/clone_root \
63         drivers/README \
64         drivers/make_device_driver.sh \
65         drivers/make_pseudo_driver.sh \
66         etc/README.examples \
67         etc/bsd-style-copyright \
68         etc/make.conf \
69         find_interface/Makefile \
70         find_interface/README \
71         find_interface/find_interface.c \
72         hast/ucarp.sh \
73         hast/ucarp_down.sh \
74         hast/ucarp_up.sh \
75         hast/vip-down.sh \
76         hast/vip-up.sh \
77         ibcs2/README \
78         ibcs2/hello.uu \
79         indent/indent.pro \
80         ipfw/change_rules.sh \
81         jails/README \
82         kld/Makefile \
83         kld/cdev/Makefile \
84         kld/cdev/README \
85         kld/cdev/module/Makefile \
86         kld/cdev/module/cdev.c \
87         kld/cdev/module/cdev.h \
88         kld/cdev/module/cdevmod.c \
89         kld/cdev/test/Makefile \
90         kld/cdev/test/testcdev.c \
91         kld/dyn_sysctl/Makefile \
92         kld/dyn_sysctl/README \
93         kld/dyn_sysctl/dyn_sysctl.c \
94         kld/firmware/Makefile \
95         kld/firmware/README \
96         kld/firmware/fwconsumer/Makefile \
97         kld/firmware/fwconsumer/fw_consumer.c \
98         kld/firmware/fwimage/Makefile \
99         kld/firmware/fwimage/firmware.img.uu \
100         kld/khelp/Makefile \
101         kld/khelp/README \
102         kld/khelp/h_example.c \
103         kld/syscall/Makefile \
104         kld/syscall/module/Makefile \
105         kld/syscall/module/syscall.c \
106         kld/syscall/test/Makefile \
107         kld/syscall/test/call.c \
108         libvgl/Makefile \
109         libvgl/demo.c \
110         mdoc/POSIX-copyright \
111         mdoc/deshallify.sh \
112         mdoc/example.1 \
113         mdoc/example.3 \
114         mdoc/example.4 \
115         mdoc/example.9 \
116         netgraph/ether.bridge \
117         netgraph/frame_relay \
118         netgraph/ngctl \
119         netgraph/raw \
120         netgraph/udp.tunnel \
121         netgraph/virtual.chain \
122         netgraph/virtual.lan \
123         nwclient/dot.nwfsrc \
124         nwclient/nwfs.sh.sample \
125         perfmon/Makefile \
126         perfmon/README \
127         perfmon/perfmon.c \
128         portal/README \
129         portal/portal.conf \
130         ppi/Makefile \
131         ppi/ppilcd.c \
132         ppp/chap-auth \
133         ppp/login-auth \
134         ppp/ppp.conf.sample \
135         ppp/ppp.conf.span-isp \
136         ppp/ppp.conf.span-isp.working \
137         ppp/ppp.linkdown.sample \
138         ppp/ppp.linkdown.span-isp \
139         ppp/ppp.linkdown.span-isp.working \
140         ppp/ppp.linkup.sample \
141         ppp/ppp.linkup.span-isp \
142         ppp/ppp.linkup.span-isp.working \
143         ppp/ppp.secret.sample \
144         ppp/ppp.secret.span-isp \
145         ppp/ppp.secret.span-isp.working \
146         printing/README \
147         printing/diablo-if-net \
148         printing/hpdf \
149         printing/hpif \
150         printing/hpof \
151         printing/hprf \
152         printing/hpvf \
153         printing/if-simple \
154         printing/if-simpleX \
155         printing/ifhp \
156         printing/make-ps-header \
157         printing/netprint \
158         printing/psdf \
159         printing/psdfX \
160         printing/psif \
161         printing/pstf \
162         printing/pstfX \
163         ses/Makefile \
164         ses/Makefile.inc \
165         ses/getencstat/Makefile \
166         ses/getencstat/getencstat.0 \
167         ses/sesd/Makefile \
168         ses/sesd/sesd.0 \
169         ses/setencstat/Makefile \
170         ses/setencstat/setencstat.0 \
171         ses/setobjstat/Makefile \
172         ses/setobjstat/setobjstat.0 \
173         ses/srcs/chpmon.c \
174         ses/srcs/eltsub.c \
175         ses/srcs/eltsub.h \
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>