]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/blob - share/examples/Makefile
MFC r201213:
[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         cvsup \
12         diskless \
13         drivers \
14         etc \
15         find_interface \
16         ibcs2 \
17         ipfw \
18         kld \
19         libvgl \
20         mdoc \
21         netgraph \
22         nwclient \
23         perfmon \
24         portal \
25         ppi \
26         ppp \
27         printing \
28         ses \
29         scsi_target \
30         sunrpc
31
32 XFILES= BSD_daemon/FreeBSD.pfa \
33         BSD_daemon/README \
34         BSD_daemon/beastie.eps \
35         BSD_daemon/beastie.fig \
36         BSD_daemon/eps.patch \
37         BSD_daemon/poster.sh \
38         FreeBSD_version/FreeBSD_version.c \
39         FreeBSD_version/Makefile \
40         FreeBSD_version/README \
41         IPv6/USAGE \
42         bootforth/README \
43         bootforth/boot.4th \
44         bootforth/frames.4th \
45         bootforth/loader.rc \
46         bootforth/menu.4th \
47         bootforth/menuconf.4th \
48         bootforth/screen.4th \
49         cvsup/README \
50         cvsup/cvs-supfile \
51         cvsup/doc-supfile \
52         cvsup/gnats-supfile \
53         cvsup/ports-supfile \
54         cvsup/refuse \
55         cvsup/refuse.README \
56         cvsup/stable-supfile \
57         cvsup/standard-supfile \
58         cvsup/www-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         ibcs2/README \
73         ibcs2/hello.uu \
74         ipfw/change_rules.sh \
75         kld/Makefile \
76         kld/cdev/Makefile \
77         kld/cdev/README \
78         kld/cdev/module/Makefile \
79         kld/cdev/module/cdev.c \
80         kld/cdev/module/cdev.h \
81         kld/cdev/module/cdevmod.c \
82         kld/cdev/test/Makefile \
83         kld/cdev/test/testcdev.c \
84         kld/dyn_sysctl/Makefile \
85         kld/dyn_sysctl/README \
86         kld/dyn_sysctl/dyn_sysctl.c \
87         kld/firmware/Makefile \
88         kld/firmware/README \
89         kld/firmware/fwconsumer/Makefile \
90         kld/firmware/fwconsumer/fw_consumer.c \
91         kld/firmware/fwimage/Makefile \
92         kld/firmware/fwimage/firmware.img \
93         kld/syscall/Makefile \
94         kld/syscall/module/Makefile \
95         kld/syscall/module/syscall.c \
96         kld/syscall/test/Makefile \
97         kld/syscall/test/call.c \
98         libvgl/Makefile \
99         libvgl/demo.c \
100         mdoc/POSIX-copyright \
101         mdoc/deshallify.sh \
102         mdoc/example.1 \
103         mdoc/example.3 \
104         mdoc/example.4 \
105         mdoc/example.9 \
106         netgraph/ether.bridge \
107         netgraph/frame_relay \
108         netgraph/ngctl \
109         netgraph/raw \
110         netgraph/udp.tunnel \
111         nwclient/dot.nwfsrc \
112         nwclient/nwfs.sh.sample \
113         perfmon/Makefile \
114         perfmon/README \
115         perfmon/perfmon.c \
116         portal/README \
117         portal/portal.conf \
118         ppi/Makefile \
119         ppi/ppilcd.c \
120         ppp/chap-auth \
121         ppp/login-auth \
122         ppp/ppp.conf.sample \
123         ppp/ppp.conf.span-isp \
124         ppp/ppp.conf.span-isp.working \
125         ppp/ppp.linkdown.sample \
126         ppp/ppp.linkdown.span-isp \
127         ppp/ppp.linkdown.span-isp.working \
128         ppp/ppp.linkup.sample \
129         ppp/ppp.linkup.span-isp \
130         ppp/ppp.linkup.span-isp.working \
131         ppp/ppp.secret.sample \
132         ppp/ppp.secret.span-isp \
133         ppp/ppp.secret.span-isp.working \
134         printing/README \
135         printing/diablo-if-net \
136         printing/hpdf \
137         printing/hpif \
138         printing/hpof \
139         printing/hprf \
140         printing/hpvf \
141         printing/if-simple \
142         printing/if-simpleX \
143         printing/ifhp \
144         printing/make-ps-header \
145         printing/netprint \
146         printing/psdf \
147         printing/psdfX \
148         printing/psif \
149         printing/pstf \
150         printing/pstfX \
151         ses/Makefile \
152         ses/Makefile.inc \
153         ses/getencstat/Makefile \
154         ses/getencstat/getencstat.0 \
155         ses/sesd/Makefile \
156         ses/sesd/sesd.0 \
157         ses/setencstat/Makefile \
158         ses/setencstat/setencstat.0 \
159         ses/setobjstat/Makefile \
160         ses/setobjstat/setobjstat.0 \
161         ses/srcs/chpmon.c \
162         ses/srcs/eltsub.c \
163         ses/srcs/getencstat.c \
164         ses/srcs/getnobj.c \
165         ses/srcs/getobjmap.c \
166         ses/srcs/getobjstat.c \
167         ses/srcs/inienc.c \
168         ses/srcs/sesd.c \
169         ses/srcs/setencstat.c \
170         ses/srcs/setobjstat.c \
171         scsi_target/Makefile \
172         scsi_target/scsi_target.c \
173         scsi_target/scsi_target.h \
174         scsi_target/scsi_target.8 \
175         scsi_target/scsi_cmds.c \
176         sunrpc/Makefile \
177         sunrpc/dir/Makefile \
178         sunrpc/dir/dir.x \
179         sunrpc/dir/dir_proc.c \
180         sunrpc/dir/rls.c \
181         sunrpc/msg/Makefile \
182         sunrpc/msg/msg.x \
183         sunrpc/msg/msg_proc.c \
184         sunrpc/msg/printmsg.c \
185         sunrpc/msg/rprintmsg.c \
186         sunrpc/sort/Makefile \
187         sunrpc/sort/rsort.c \
188         sunrpc/sort/sort.x \
189         sunrpc/sort/sort_proc.c
190
191 BINDIR= ${SHAREDIR}/examples
192
193 NO_OBJ=
194
195 # Define SHARED to indicate whether you want symbolic links to the system
196 # source (``symlinks''), or a separate copy (``copies''); (latter useful
197 # in environments where it's not possible to keep /sys publicly readable)
198 SHARED?=        copies
199
200 beforeinstall: ${SHARED} etc-examples
201 .ORDER: ${SHARED} etc-examples
202
203 copies:
204 .for i in ${LDIRS}
205         if [ -L ${DESTDIR}${BINDIR}/$i ]; then \
206                 rm -f ${DESTDIR}${BINDIR}/$i; \
207         fi
208 .endfor
209         mtree -deU ${MTREE_FOLLOWS_SYMLINKS} \
210             -f ${.CURDIR}/../../etc/mtree/BSD.usr.dist -p ${DESTDIR}/usr
211 .for file in ${XFILES}
212         ${INSTALL} -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} \
213                 ${.CURDIR}/${file} ${DESTDIR}${BINDIR}/${file}
214 .endfor
215
216 symlinks:
217 .for i in ${LDIRS}
218         rm -rf ${DESTDIR}${BINDIR}/$i
219         ln -s ${.CURDIR}/$i ${DESTDIR}${BINDIR}/$i
220 .endfor
221
222 etc-examples:
223 .if ${SHARED} != "symlinks"
224         (cd ${.CURDIR}/../../etc; ${MAKE} etc-examples)
225 .endif
226
227 .if ${SHARED} != "symlinks"
228 SUBDIR= smbfs
229 .if ${MK_IPFILTER} != "no"
230 SUBDIR+=ipfilter
231 .endif
232 .if ${MK_PF} != "no"
233 SUBDIR+=pf
234 .endif
235 .endif
236
237 .include <bsd.subdir.mk>