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