]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - Makefile
This commit was generated by cvs2svn to compensate for changes in r16748,
[FreeBSD/FreeBSD.git] / Makefile
1 #
2 #       $Id: Makefile,v 1.84 1996/06/22 17:58:44 pst Exp $
3 #
4 # Make command line options:
5 #       -DCLOBBER will remove /usr/include
6 #       -DMAKE_LOCAL to add ./local to the SUBDIR list
7 #       -DMAKE_PORTS to add ./ports to the SUBDIR list
8 #       -DMAKE_EBONES to build eBones (KerberosIV)
9 #
10 #       -DNOCLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir
11 #       -DNOCLEAN do not clean at all
12 #       -DNOCRYPT will prevent building of crypt versions
13 #       -DNOLKM do not build loadable kernel modules
14 #       -DNOOBJDIR do not run ``${MAKE} obj''
15 #       -DNOPROFILE do not build profiled libraries
16 #       -DNOSECURE do not go into secure subdir
17
18 # Put initial settings here.
19 SUBDIR=
20
21 # We must do include and lib first so that the perl *.ph generation
22 # works correctly as it uses the header files installed by this.
23 .if exists(include)
24 SUBDIR+= include
25 .endif
26 .if exists(lib)
27 SUBDIR+= lib
28 .endif
29
30 .if exists(bin)
31 SUBDIR+= bin
32 .endif
33 .if exists(contrib)
34 SUBDIR+= contrib
35 .endif
36 .if exists(games)
37 SUBDIR+= games
38 .endif
39 .if exists(gnu)
40 SUBDIR+= gnu
41 .endif
42 .if exists(eBones) && !defined(NOCRYPT) && defined(MAKE_EBONES)
43 SUBDIR+= eBones
44 .endif
45 .if exists(libexec)
46 SUBDIR+= libexec
47 .endif
48 .if exists(sbin)
49 SUBDIR+= sbin
50 .endif
51 .if exists(share)
52 SUBDIR+= share
53 .endif
54 .if exists(sys)
55 SUBDIR+= sys
56 .endif
57 .if exists(usr.bin)
58 SUBDIR+= usr.bin
59 .endif
60 .if exists(usr.sbin)
61 SUBDIR+= usr.sbin
62 .endif
63 .if exists(secure) && !defined(NOCRYPT) && !defined(NOSECURE)
64 SUBDIR+= secure
65 .endif
66 .if exists(lkm) && !defined(NOLKM)
67 SUBDIR+= lkm
68 .endif
69
70 # etc must be last for "distribute" to work
71 .if exists(etc) && make(distribute)
72 SUBDIR+= etc
73 .endif
74
75 # These are last, since it is nice to at least get the base system
76 # rebuilt before you do them.
77 .if defined(MAKE_LOCAL) & exists(local) & exists(local/Makefile)
78 SUBDIR+= local
79 .endif
80 .if defined(MAKE_PORTS) & exists(ports) & exists(ports/Makefile)
81 SUBDIR+= ports
82 .endif
83
84 # Handle the -DNOOBJDIR and -DNOCLEANDIR
85 .if defined(NOOBJDIR)
86 OBJDIR=
87 .else
88 OBJDIR=         obj
89 .endif
90
91 .if defined(NOCLEAN)
92 CLEANDIR=
93 WORLD_CLEANDIST=obj
94 .else
95 WORLD_CLEANDIST=cleandist
96 .if defined(NOCLEANDIR)
97 CLEANDIR=       clean
98 .else
99 CLEANDIR=       cleandir
100 .endif
101 .endif
102
103 MK_FLAGS=       -DNOMAN -DNOPROFILE
104
105 .if !target(pre-world)
106 pre-world:
107         @/usr/bin/true
108 .endif
109
110 world:  pre-world hierarchy mk $(WORLD_CLEANDIST) bootstrap include-tools includes lib-tools libraries build-tools
111         @echo "--------------------------------------------------------------"
112         @echo " Rebuilding ${DESTDIR} The whole thing"
113         @echo "--------------------------------------------------------------"
114         @echo
115         cd ${.CURDIR} && ${MAKE} depend all install
116         cd ${.CURDIR}/share/man &&              ${MAKE} makedb
117 .if target(post-world)
118         cd ${.CURDIR} && ${MAKE} post-world
119 .endif
120         @echo "make world completed on `date`"
121
122 bootstrap:
123         cd ${.CURDIR}/usr.bin/xlint && ${MAKE} ${MK_FLAGS} lint1 lint2 xlint
124         cd ${.CURDIR}/usr.bin/xlint/lint1 && ${MAKE} ${MK_FLAGS} install
125         cd ${.CURDIR}/usr.bin/xlint/lint2 && ${MAKE} ${MK_FLAGS} install
126         cd ${.CURDIR}/usr.bin/xlint/xlint && ${MAKE} ${MK_FLAGS} install
127         cd ${.CURDIR}/usr.bin/lex && ${MAKE} ${MK_FLAGS} bootstrap && \
128                 ${MAKE} ${MK_FLAGS} all install
129
130 reinstall:      hierarchy mk includes
131         @echo "--------------------------------------------------------------"
132         @echo " Reinstall ${DESTDIR} The whole thing"
133         @echo "--------------------------------------------------------------"
134         @echo
135         cd ${.CURDIR} && ${MAKE} install
136         cd ${.CURDIR}/share/man &&              ${MAKE} makedb
137
138 hierarchy:
139         @echo "--------------------------------------------------------------"
140         @echo " Making hierarchy"
141         @echo "--------------------------------------------------------------"
142         cd ${.CURDIR}/etc &&            ${MAKE} distrib-dirs
143
144 update:
145 .if defined(SUP_UPDATE)
146         @echo "--------------------------------------------------------------"
147         @echo "Running sup"
148         @echo "--------------------------------------------------------------"
149         @sup -v ${SUPFILE}
150 .if defined(SUPFILE1)
151         @sup -v ${SUPFILE1}
152 .endif
153 .if defined(SUPFILE2)
154         @sup -v ${SUPFILE2}
155 .endif
156 .endif
157 .if defined(CVS_UPDATE)
158         @echo "--------------------------------------------------------------"
159         @echo "Updating /usr/src from cvs repository" ${CVSROOT}
160         @echo "--------------------------------------------------------------"
161         cd ${.CURDIR} &&  cvs -q update -P -d
162 .endif
163
164 cleandist:
165 .if !defined(NOCLEANDIR)
166         @echo "--------------------------------------------------------------"
167         @echo " Cleaning up the source tree, and rebuilding the obj tree"
168         @echo "--------------------------------------------------------------"
169         cd ${.CURDIR} && ${MAKE} cleandir
170         cd ${.CURDIR} && ${MAKE} obj
171 .endif
172
173 installmost:
174         @echo "--------------------------------------------------------------"
175         @echo " Installing programs only"
176         @echo "--------------------------------------------------------------"
177         cd ${.CURDIR}/bin       &&      ${MAKE} ${.MAKEFLAGS} install
178         cd ${.CURDIR}/sbin      &&      ${MAKE} ${.MAKEFLAGS} install
179         cd ${.CURDIR}/libexec   &&      ${MAKE} ${.MAKEFLAGS} install
180         cd ${.CURDIR}/usr.bin   &&      ${MAKE} ${.MAKEFLAGS} install
181         cd ${.CURDIR}/usr.sbin  &&      ${MAKE} ${.MAKEFLAGS} install
182         cd ${.CURDIR}/gnu/libexec &&    ${MAKE} ${.MAKEFLAGS} install
183         cd ${.CURDIR}/gnu/usr.bin &&    ${MAKE} ${.MAKEFLAGS} install
184         cd ${.CURDIR}/gnu/usr.sbin &&   ${MAKE} ${.MAKEFLAGS} install
185 #.if defined(MAKE_EBONES) && !defined(NOCRYPT)
186 #       cd ${.CURDIR}/eBones    &&      ${MAKE} ${.MAKEFLAGS} installmost
187 #.endif
188 #.if !defined(NOSECURE) && !defined(NOCRYPT)
189 #       cd ${.CURDIR}/secure    &&      ${MAKE} ${.MAKEFLAGS} installmost
190 #.endif
191
192 most:
193         @echo "--------------------------------------------------------------"
194         @echo " Building programs only"
195         @echo "--------------------------------------------------------------"
196         cd ${.CURDIR}/bin       &&      ${MAKE} ${.MAKEFLAGS} all
197         cd ${.CURDIR}/sbin      &&      ${MAKE} ${.MAKEFLAGS} all
198         cd ${.CURDIR}/libexec   &&      ${MAKE} ${.MAKEFLAGS} all
199         cd ${.CURDIR}/usr.bin   &&      ${MAKE} ${.MAKEFLAGS} all
200         cd ${.CURDIR}/usr.sbin  &&      ${MAKE} ${.MAKEFLAGS} all
201         cd ${.CURDIR}/gnu/libexec &&    ${MAKE} ${.MAKEFLAGS} all
202         cd ${.CURDIR}/gnu/usr.bin &&    ${MAKE} ${.MAKEFLAGS} all
203         cd ${.CURDIR}/gnu/usr.sbin &&   ${MAKE} ${.MAKEFLAGS} all
204 #.if defined(MAKE_EBONES) && !defined(NOCRYPT)
205 #       cd ${.CURDIR}/eBones    &&      ${MAKE} ${.MAKEFLAGS} most
206 #.endif
207 #.if !defined(NOSECURE) && !defined(NOCRYPT)
208 #       cd ${.CURDIR}/secure    &&      ${MAKE} ${.MAKEFLAGS} most
209 #.endif
210
211 mk:
212         @echo "--------------------------------------------------------------"
213         @echo " Rebuilding ${DESTDIR}/usr/share/mk"
214         @echo "--------------------------------------------------------------"
215         cd ${.CURDIR}/share/mk &&       ${MAKE} install
216
217 includes:
218         @echo "--------------------------------------------------------------"
219         @echo " Rebuilding ${DESTDIR}/usr/include"
220         @echo "--------------------------------------------------------------"
221         @echo
222 .if defined(CLOBBER)
223         rm -rf ${DESTDIR}/usr/include/*
224         mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
225                 -p ${DESTDIR}/usr/include
226 .endif
227         cd ${.CURDIR}/include &&                ${MAKE} install
228         cd ${.CURDIR}/gnu/include &&            ${MAKE} install
229         cd ${.CURDIR}/gnu/lib/libreadline &&    ${MAKE} beforeinstall
230         cd ${.CURDIR}/gnu/lib/libregex &&       ${MAKE} beforeinstall
231         cd ${.CURDIR}/gnu/lib/libg++ &&         ${MAKE} beforeinstall
232         cd ${.CURDIR}/gnu/lib/libdialog &&      ${MAKE} beforeinstall
233 .if exists(eBones) && !defined(NOCRYPT) && defined(MAKE_EBONES)
234         cd ${.CURDIR}/eBones/include &&         ${MAKE} beforeinstall
235         cd ${.CURDIR}/eBones/lib/libkrb &&      ${MAKE} beforeinstall
236         cd ${.CURDIR}/eBones/lib/libkadm &&     ${MAKE} beforeinstall
237 .endif
238         cd ${.CURDIR}/lib/libc &&               ${MAKE} beforeinstall
239         cd ${.CURDIR}/lib/libcurses &&          ${MAKE} beforeinstall
240         cd ${.CURDIR}/lib/libedit &&            ${MAKE} beforeinstall
241         cd ${.CURDIR}/lib/libmd &&              ${MAKE} beforeinstall
242         cd ${.CURDIR}/lib/libmytinfo &&         ${MAKE} beforeinstall
243         cd ${.CURDIR}/lib/libncurses &&         ${MAKE} beforeinstall
244 .if !defined(WANT_CSRG_LIBM)
245         cd ${.CURDIR}/lib/msun &&               ${MAKE} beforeinstall
246 .endif
247         cd ${.CURDIR}/lib/libpcap &&            ${MAKE} beforeinstall
248         cd ${.CURDIR}/lib/librpcsvc &&          ${MAKE} beforeinstall
249         cd ${.CURDIR}/lib/libskey &&            ${MAKE} beforeinstall
250         cd ${.CURDIR}/lib/libtermcap &&         ${MAKE} beforeinstall
251         cd ${.CURDIR}/lib/libcom_err &&         ${MAKE} beforeinstall
252         cd ${.CURDIR}/lib/libss &&              ${MAKE} beforeinstall
253         cd ${.CURDIR}/lib/libscsi &&            ${MAKE} beforeinstall
254         cd ${.CURDIR}/lib/libutil &&            ${MAKE} beforeinstall
255
256 lib-tools:
257         @echo "--------------------------------------------------------------"
258         @echo " Rebuilding tools needed to build the libraries"
259         @echo "--------------------------------------------------------------"
260         @echo
261         cd ${.CURDIR}/usr.bin/xinstall && \
262                 ${MAKE} ${MK_FLAGS} depend all install ${CLEANDIR} ${OBJDIR}
263         cd ${.CURDIR}/gnu/usr.bin/ld && \
264                 ${MAKE} ${MK_FLAGS} depend all install ${CLEANDIR} ${OBJDIR}
265         cd ${.CURDIR}/usr.bin/ar && \
266                 ${MAKE} ${MK_FLAGS} depend all install ${CLEANDIR} ${OBJDIR}
267         cd ${.CURDIR}/usr.bin/ranlib && \
268                 ${MAKE} ${MK_FLAGS} depend all install ${CLEANDIR} ${OBJDIR}
269         cd ${.CURDIR}/usr.bin/nm && \
270                 ${MAKE} ${MK_FLAGS} depend all install ${CLEANDIR} ${OBJDIR}
271         cd ${.CURDIR}/usr.bin/lex/lib && \
272                 ${MAKE} ${MK_FLAGS} depend all install ${CLEANDIR} ${OBJDIR}
273         cd ${.CURDIR}/usr.bin/compile_et && \
274                 ${MAKE} ${MK_FLAGS} depend all install ${CLEANDIR} ${OBJDIR} && \
275                 rm -f /usr/sbin/compile_et
276         cd ${.CURDIR}/usr.bin/mk_cmds && \
277                 ${MAKE} ${MK_FLAGS} depend all install ${CLEANDIR} ${OBJDIR}
278
279 libraries:
280         @echo "--------------------------------------------------------------"
281         @echo " Rebuilding ${DESTDIR}/usr/lib"
282         @echo "--------------------------------------------------------------"
283         @echo
284 .if exists(lib/libcompat)
285         cd ${.CURDIR}/lib/libcompat && \
286                 ${MAKE} ${MK_FLAGS} depend all install ${CLEANDIR} ${OBJDIR}
287 .endif
288 .if exists(lib/libncurses)
289         cd ${.CURDIR}/lib/libncurses && \
290                 ${MAKE} ${MK_FLAGS} depend all install ${CLEANDIR} ${OBJDIR}
291 .endif
292 .if exists(lib/libtermcap)
293         cd ${.CURDIR}/lib/libtermcap && \
294                 ${MAKE} ${MK_FLAGS} depend all install ${CLEANDIR} ${OBJDIR}
295 .endif
296 .if exists(gnu)
297         cd ${.CURDIR}/gnu/lib && \
298                 ${MAKE} ${MK_FLAGS} depend all install ${CLEANDIR} ${OBJDIR}
299         cd ${.CURDIR}/gnu/usr.bin/cc/libgcc && \
300                 ${MAKE} ${MK_FLAGS} depend all install ${CLEANDIR} ${OBJDIR}
301 .endif
302 .if exists(secure) && !defined(NOCRYPT) && !defined(NOSECURE)
303         cd ${.CURDIR}/secure/lib && \
304                 ${MAKE} ${MK_FLAGS} depend all install ${CLEANDIR} ${OBJDIR}
305 .endif
306 .if exists(lib)
307         cd ${.CURDIR}/lib/csu/i386 && \
308                 ${MAKE} ${MK_FLAGS} depend all install ${CLEANDIR} ${OBJDIR}
309         cd ${.CURDIR}/lib && \
310                 ${MAKE} ${MK_FLAGS} depend all install ${CLEANDIR} ${OBJDIR}
311 .endif
312 .if exists(usr.sbin/lex/lib)
313         cd ${.CURDIR}/usr.bin/lex/lib && \
314                 ${MAKE} ${MK_FLAGS} depend all install ${CLEANDIR} ${OBJDIR}
315 .endif
316 .if exists(eBones) && !defined(NOCRYPT) && defined(MAKE_EBONES)
317         cd ${.CURDIR}/eBones/lib && \
318                 ${MAKE} ${MK_FLAGS} depend all install ${CLEANDIR} ${OBJDIR}
319 .endif
320 .if exists(usr.sbin/pcvt/keycap)
321         cd ${.CURDIR}/usr.sbin/pcvt/keycap && \
322                 ${MAKE} ${MK_FLAGS} depend all install ${CLEANDIR} ${OBJDIR}
323 .endif
324
325 include-tools:
326         @echo "--------------------------------------------------------------"
327         @echo " Rebuild tools necessary to build the include files"
328         @echo "--------------------------------------------------------------"
329         @echo
330         cd ${.CURDIR}/usr.bin/xinstall && \
331                 ${MAKE} ${MK_FLAGS} depend all install ${CLEANDIR} ${OBJDIR}
332         cd ${.CURDIR}/usr.bin/rpcgen && \
333                 ${MAKE} ${MK_FLAGS} depend all install ${CLEANDIR} ${OBJDIR}
334
335 build-tools:
336         @echo "--------------------------------------------------------------"
337         @echo " Rebuilding ${DESTDIR} C compiler, make, symorder, sgmlfmt and zic(8)"
338         @echo "--------------------------------------------------------------"
339         @echo
340         cd ${.CURDIR}/gnu/usr.bin/cc && \
341                 ${MAKE} ${MK_FLAGS} depend all install ${CLEANDIR} ${OBJDIR}
342         cd ${.CURDIR}/usr.bin/make && \
343                 ${MAKE} ${MK_FLAGS} depend all install ${CLEANDIR} ${OBJDIR}
344         cd ${.CURDIR}/usr.bin/symorder && \
345                 ${MAKE} ${MK_FLAGS} depend all install ${CLEANDIR} ${OBJDIR}
346         cd ${.CURDIR}/usr.bin/sgmlfmt && \
347                 ${MAKE} ${MK_FLAGS} depend all install ${CLEANDIR} ${OBJDIR} 
348         cd ${.CURDIR}/share/sgml && \
349                 ${MAKE} ${MK_FLAGS} depend all install ${CLEANDIR} ${OBJDIR} 
350         cd ${.CURDIR}/usr.sbin/zic && \
351                 ${MAKE} ${MK_FLAGS} depend all install ${CLEANDIR} ${OBJDIR}
352
353 .include <bsd.subdir.mk>