]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/blob - share/examples/Makefile
MFstable/10 r278556:
[FreeBSD/stable/9.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         ibcs2 \
18         indent \
19         ipfw \
20         jails \
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/gnats-supfile \
56         cvsup/stable-supfile \
57         cvsup/standard-supfile \
58         diskless/ME \
59         diskless/README.BOOTP \
60         diskless/README.TEMPLATING \
61         diskless/clone_root \
62         drivers/README \
63         drivers/make_device_driver.sh \
64         drivers/make_pseudo_driver.sh \
65         etc/README.examples \
66         etc/bsd-style-copyright \
67         etc/make.conf \
68         find_interface/Makefile \
69         find_interface/README \
70         find_interface/find_interface.c \
71         ibcs2/README \
72         ibcs2/hello.uu \
73         indent/indent.pro \
74         ipfw/change_rules.sh \
75         jails/README \
76         kld/Makefile \
77         kld/cdev/Makefile \
78         kld/cdev/README \
79         kld/cdev/module/Makefile \
80         kld/cdev/module/cdev.c \
81         kld/cdev/module/cdev.h \
82         kld/cdev/module/cdevmod.c \
83         kld/cdev/test/Makefile \
84         kld/cdev/test/testcdev.c \
85         kld/dyn_sysctl/Makefile \
86         kld/dyn_sysctl/README \
87         kld/dyn_sysctl/dyn_sysctl.c \
88         kld/firmware/Makefile \
89         kld/firmware/README \
90         kld/firmware/fwconsumer/Makefile \
91         kld/firmware/fwconsumer/fw_consumer.c \
92         kld/firmware/fwimage/Makefile \
93         kld/firmware/fwimage/firmware.img.uu \
94         kld/khelp/Makefile \
95         kld/khelp/README \
96         kld/khelp/h_example.c \
97         kld/syscall/Makefile \
98         kld/syscall/module/Makefile \
99         kld/syscall/module/syscall.c \
100         kld/syscall/test/Makefile \
101         kld/syscall/test/call.c \
102         libvgl/Makefile \
103         libvgl/demo.c \
104         mdoc/POSIX-copyright \
105         mdoc/deshallify.sh \
106         mdoc/example.1 \
107         mdoc/example.3 \
108         mdoc/example.4 \
109         mdoc/example.9 \
110         netgraph/ether.bridge \
111         netgraph/frame_relay \
112         netgraph/ngctl \
113         netgraph/raw \
114         netgraph/udp.tunnel \
115         netgraph/virtual.chain \
116         netgraph/virtual.lan \
117         nwclient/dot.nwfsrc \
118         nwclient/nwfs.sh.sample \
119         perfmon/Makefile \
120         perfmon/README \
121         perfmon/perfmon.c \
122         portal/README \
123         portal/portal.conf \
124         ppi/Makefile \
125         ppi/ppilcd.c \
126         ppp/chap-auth \
127         ppp/login-auth \
128         ppp/ppp.conf.sample \
129         ppp/ppp.conf.span-isp \
130         ppp/ppp.conf.span-isp.working \
131         ppp/ppp.linkdown.sample \
132         ppp/ppp.linkdown.span-isp \
133         ppp/ppp.linkdown.span-isp.working \
134         ppp/ppp.linkup.sample \
135         ppp/ppp.linkup.span-isp \
136         ppp/ppp.linkup.span-isp.working \
137         ppp/ppp.secret.sample \
138         ppp/ppp.secret.span-isp \
139         ppp/ppp.secret.span-isp.working \
140         printing/README \
141         printing/diablo-if-net \
142         printing/hpdf \
143         printing/hpif \
144         printing/hpof \
145         printing/hprf \
146         printing/hpvf \
147         printing/if-simple \
148         printing/if-simpleX \
149         printing/ifhp \
150         printing/make-ps-header \
151         printing/netprint \
152         printing/psdf \
153         printing/psdfX \
154         printing/psif \
155         printing/pstf \
156         printing/pstfX \
157         ses/Makefile \
158         ses/Makefile.inc \
159         ses/getencstat/Makefile \
160         ses/getencstat/getencstat.0 \
161         ses/sesd/Makefile \
162         ses/sesd/sesd.0 \
163         ses/setencstat/Makefile \
164         ses/setencstat/setencstat.0 \
165         ses/setobjstat/Makefile \
166         ses/setobjstat/setobjstat.0 \
167         ses/srcs/chpmon.c \
168         ses/srcs/eltsub.c \
169         ses/srcs/eltsub.h \
170         ses/srcs/getencstat.c \
171         ses/srcs/getnobj.c \
172         ses/srcs/getobjmap.c \
173         ses/srcs/getobjstat.c \
174         ses/srcs/inienc.c \
175         ses/srcs/sesd.c \
176         ses/srcs/setencstat.c \
177         ses/srcs/setobjstat.c \
178         scsi_target/Makefile \
179         scsi_target/scsi_target.c \
180         scsi_target/scsi_target.h \
181         scsi_target/scsi_target.8 \
182         scsi_target/scsi_cmds.c \
183         sunrpc/Makefile \
184         sunrpc/dir/Makefile \
185         sunrpc/dir/dir.x \
186         sunrpc/dir/dir_proc.c \
187         sunrpc/dir/rls.c \
188         sunrpc/msg/Makefile \
189         sunrpc/msg/msg.x \
190         sunrpc/msg/msg_proc.c \
191         sunrpc/msg/printmsg.c \
192         sunrpc/msg/rprintmsg.c \
193         sunrpc/sort/Makefile \
194         sunrpc/sort/rsort.c \
195         sunrpc/sort/sort.x \
196         sunrpc/sort/sort_proc.c
197
198 BINDIR= ${SHAREDIR}/examples
199
200 NO_OBJ=
201
202 .if ${MK_HAST} != "no"
203 LDIRS+=         hast
204 XFILES+=        hast/ucarp.sh \
205                 hast/ucarp_down.sh \
206                 hast/ucarp_up.sh \
207                 hast/vip-down.sh \
208                 hast/vip-up.sh
209 .endif
210
211 # Define SHARED to indicate whether you want symbolic links to the system
212 # source (``symlinks''), or a separate copy (``copies''); (latter useful
213 # in environments where it's not possible to keep /sys publicly readable)
214 SHARED?=        copies
215
216 beforeinstall: ${SHARED} etc-examples
217 .ORDER: ${SHARED} etc-examples
218
219 copies:
220 .for i in ${LDIRS}
221         if [ -L ${DESTDIR}${BINDIR}/$i ]; then \
222                 rm -f ${DESTDIR}${BINDIR}/$i; \
223         fi
224 .endfor
225         mtree -deU ${MTREE_FOLLOWS_SYMLINKS} \
226             -f ${.CURDIR}/../../etc/mtree/BSD.usr.dist -p ${DESTDIR}/usr
227 .for file in ${XFILES}
228         ${INSTALL} -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} \
229                 ${.CURDIR}/${file} ${DESTDIR}${BINDIR}/${file}
230 .endfor
231
232 symlinks:
233 .for i in ${LDIRS}
234         rm -rf ${DESTDIR}${BINDIR}/$i
235         ln -s ${.CURDIR}/$i ${DESTDIR}${BINDIR}/$i
236 .endfor
237
238 etc-examples:
239 .if ${SHARED} != "symlinks"
240         (cd ${.CURDIR}/../../etc; ${MAKE} etc-examples)
241 .endif
242
243 .if ${SHARED} != "symlinks"
244 SUBDIR= smbfs
245 .if ${MK_IPFILTER} != "no"
246 SUBDIR+=ipfilter
247 .endif
248 .if ${MK_PF} != "no"
249 SUBDIR+=pf
250 .endif
251 .endif
252
253 .include <bsd.subdir.mk>