Makefile revision 21673
1232950Stheraven#
2232950Stheraven#	$FreeBSD: head/Makefile 21673 1997-01-14 07:20:47Z jkh $
3232950Stheraven#
4232950Stheraven# Make command line options:
5232950Stheraven#	-DCLOBBER will remove /usr/include
6232950Stheraven#	-DMAKE_LOCAL to add ./local to the SUBDIR list
7232950Stheraven#	-DMAKE_PORTS to add ./ports to the SUBDIR list
8232950Stheraven#	-DMAKE_EBONES to build eBones (KerberosIV)
9232950Stheraven#	-DALLLANG to build documentation for all languages
10232950Stheraven#	  (where available -- see share/doc/Makefile)
11232950Stheraven#
12232950Stheraven#	-DNOCLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir
13232950Stheraven#	-DNOCLEAN do not clean at all
14232950Stheraven#	-DNOCRYPT will prevent building of crypt versions
15232950Stheraven#	-DNOLKM do not build loadable kernel modules
16232950Stheraven#	-DNOOBJDIR do not run ``${MAKE} obj''
17232950Stheraven#	-DNOPROFILE do not build profiled libraries
18232950Stheraven#	-DNOSECURE do not go into secure subdir
19232950Stheraven#	-DNOGAMES do not go into games subdir
20232950Stheraven#	-DNOSHARE do not go into share subdir
21232950Stheraven#       -DNOINFO do not make or install info files
22232950Stheraven
23232950Stheraven#
24232950Stheraven# The intended user-driven targets are:
25232950Stheraven# world       - rebuild *everything*, including glue to help do upgrades.
26232950Stheraven# reinstall   - use an existing (eg: NFS mounted) build to do an update.
27227825Stheraven# update      - convenient way to update your source tree (eg: sup/cvs)
28227825Stheraven# most        - build user commands, no libraries or include files
29227825Stheraven# installmost - install user commands, no libraries or include files
30227825Stheraven#
31227825Stheraven# Standard targets (not defined here) are documented in the makefiles in
32227825Stheraven# /usr/share/mk.  These include:
33227825Stheraven#		obj depend all install clean cleandepend cleanobj
34227825Stheraven
35227825Stheraven
36227825Stheraven# Put initial settings here.
37227825StheravenSUBDIR=
38227825Stheraven
39245304Stheraven# We must do include and lib first so that the perl *.ph generation
40227825Stheraven# works correctly as it uses the header files installed by this.
41232950Stheraven.if exists(include)
42227825StheravenSUBDIR+= include
43227825Stheraven.endif
44227825Stheraven.if exists(lib)
45227825StheravenSUBDIR+= lib
46227825Stheraven.endif
47227825Stheraven
48227825Stheraven.if exists(bin)
49227825StheravenSUBDIR+= bin
50227825Stheraven.endif
51227825Stheraven.if exists(games) && !defined(NOGAMES)
52227825StheravenSUBDIR+= games
53227825Stheraven.endif
54227825Stheraven.if exists(gnu)
55227825StheravenSUBDIR+= gnu
56227825Stheraven.endif
57227825Stheraven.if exists(eBones) && !defined(NOCRYPT) && defined(MAKE_EBONES)
58227825StheravenSUBDIR+= eBones
59227825Stheraven.endif
60227825Stheraven.if exists(libexec)
61227825StheravenSUBDIR+= libexec
62227825Stheraven.endif
63227825Stheraven.if exists(sbin)
64245304StheravenSUBDIR+= sbin
65227825Stheraven.endif
66245304Stheraven.if exists(share) && !defined(NOSHARE)
67245304StheravenSUBDIR+= share
68245304Stheraven.endif
69245304Stheraven.if exists(sys)
70245304StheravenSUBDIR+= sys
71227825Stheraven.endif
72227825Stheraven.if exists(usr.bin)
73227825StheravenSUBDIR+= usr.bin
74227825Stheraven.endif
75227825Stheraven.if exists(usr.sbin)
76227825StheravenSUBDIR+= usr.sbin
77245304Stheraven.endif
78245304Stheraven.if exists(secure) && !defined(NOCRYPT) && !defined(NOSECURE)
79245304StheravenSUBDIR+= secure
80245304Stheraven.endif
81227825Stheraven.if exists(lkm) && !defined(NOLKM)
82227825StheravenSUBDIR+= lkm
83227825Stheraven.endif
84245304Stheraven
85245304Stheraven# etc must be last for "distribute" to work
86227825Stheraven.if exists(etc) && make(distribute)
87245304StheravenSUBDIR+= etc
88227825Stheraven.endif
89227825Stheraven
90227825Stheraven# These are last, since it is nice to at least get the base system
91227825Stheraven# rebuilt before you do them.
92227825Stheraven.if defined(MAKE_LOCAL) & exists(local) & exists(local/Makefile)
93227825StheravenSUBDIR+= local
94227825Stheraven.endif
95227825Stheraven.if defined(MAKE_PORTS) & exists(ports) & exists(ports/Makefile)
96227825StheravenSUBDIR+= ports
97227825Stheraven.endif
98227825Stheraven
99227825Stheraven# Handle -DNOOBJDIR, -DNOCLEAN and -DNOCLEANDIR
100227825Stheraven.if defined(NOOBJDIR)
101227825StheravenOBJDIR=
102253159Stheraven.else
103253159StheravenOBJDIR=		obj
104253159Stheraven.endif
105253159Stheraven
106253159Stheraven.if defined(NOCLEAN)
107253159StheravenCLEANDIR=
108245304Stheraven.else
109227825Stheraven.if defined(NOCLEANDIR)
110227825StheravenCLEANDIR=	clean
111227825Stheraven.else
112227825StheravenCLEANDIR=	cleandir
113227825Stheraven.endif
114253159Stheraven.endif
115253159Stheraven
116253159StheravenSUP?=           sup
117227825StheravenSUPFLAGS?=      -v
118227825Stheraven
119227825Stheraven#
120227825Stheraven# While building tools for bootstrapping, we dont need to waste time on
121227825Stheraven# profiled libraries or man pages.  This speeds things up somewhat.
122227825Stheraven#
123227825StheravenMK_FLAGS=	-DNOINFO -DNOMAN -DNOPROFILE
124253159Stheraven
125253159Stheraven#
126253159Stheraven# world
127227825Stheraven#
128227825Stheraven# Attempt to rebuild and reinstall *everything*, with reasonable chance of
129227825Stheraven# success, regardless of how old your existing system is.
130227825Stheraven#
131227825Stheraven# >> Beware, it overwrites the local build environment! <<
132227825Stheraven#
133253159Stheravenworld:
134227825Stheraven	@echo "--------------------------------------------------------------"
135253159Stheraven	@echo "make world started on `LC_TIME=C date`"
136253159Stheraven	@echo "--------------------------------------------------------------"
137253159Stheraven.if target(pre-world)
138253159Stheraven	@echo "--------------------------------------------------------------"
139253159Stheraven	@echo " Making 'pre-world' target"
140253159Stheraven	@echo "--------------------------------------------------------------"
141253159Stheraven	cd ${.CURDIR} && ${MAKE} pre-world
142253159Stheraven	@echo
143253159Stheraven.endif
144253159Stheraven	@echo "--------------------------------------------------------------"
145253159Stheraven	@echo " Making hierarchy"
146253159Stheraven	@echo "--------------------------------------------------------------"
147253159Stheraven	cd ${.CURDIR} && ${MAKE} hierarchy
148253159Stheraven	@echo
149253159Stheraven	@echo "--------------------------------------------------------------"
150253159Stheraven	@echo " Rebuilding /usr/share/mk"
151227825Stheraven	@echo "--------------------------------------------------------------"
152227825Stheraven	cd ${.CURDIR} && ${MAKE} mk
153227825Stheraven	@echo
154227825Stheraven	@echo "--------------------------------------------------------------"
155	@echo " Cleaning up the source tree"
156	@echo "--------------------------------------------------------------"
157.if defined(NOCLEAN)
158	@echo "Not cleaning anything! I sure hope you know what you are doing!"
159.else
160	cd ${.CURDIR} && ${MAKE} ${CLEANDIR}
161.endif
162	@echo
163.if !defined(NOOBJDIR)
164	@echo "--------------------------------------------------------------"
165	@echo " Rebuilding the obj tree"
166	@echo "--------------------------------------------------------------"
167	cd ${.CURDIR} && ${MAKE} obj
168	@echo
169.endif
170	@echo "--------------------------------------------------------------"
171	@echo " Rebuilding bootstrap tools"
172	@echo "--------------------------------------------------------------"
173	cd ${.CURDIR} && ${MAKE} bootstrap
174	@echo
175	@echo "--------------------------------------------------------------"
176	@echo " Rebuilding tools necessary to build the include files"
177	@echo "--------------------------------------------------------------"
178	cd ${.CURDIR} && ${MAKE} include-tools
179	@echo
180	@echo "--------------------------------------------------------------"
181	@echo " Rebuilding /usr/include"
182	@echo "--------------------------------------------------------------"
183	cd ${.CURDIR} && ${MAKE} includes
184	@echo
185	@echo "--------------------------------------------------------------"
186	@echo " Rebuilding tools needed to build the libraries"
187	@echo "--------------------------------------------------------------"
188	cd ${.CURDIR} && ${MAKE} lib-tools
189	@echo
190	@echo "--------------------------------------------------------------"
191	@echo " Rebuilding /usr/lib"
192	@echo "--------------------------------------------------------------"
193	cd ${.CURDIR} && ${MAKE} libraries
194	@echo
195	@echo "--------------------------------------------------------------"
196	@echo " Rebuilding sgml tools, symorder, groff and zic(8)"
197	@echo "--------------------------------------------------------------"
198	cd ${.CURDIR} && ${MAKE} build-tools
199	@echo
200	@echo "--------------------------------------------------------------"
201	@echo " Rebuilding dependencies"
202	@echo "--------------------------------------------------------------"
203	cd ${.CURDIR} && ${MAKE} depend
204	@echo
205	@echo "--------------------------------------------------------------"
206	@echo " Building everything.."
207	@echo "--------------------------------------------------------------"
208	cd ${.CURDIR} && ${MAKE} all
209	@echo
210	@echo "--------------------------------------------------------------"
211	@echo " Installing everything.."
212	@echo "--------------------------------------------------------------"
213	cd ${.CURDIR} && ${MAKE} install
214	@echo
215	@echo "--------------------------------------------------------------"
216	@echo " Rebuilding man page indexes"
217	@echo "--------------------------------------------------------------"
218	cd ${.CURDIR}/share/man && ${MAKE} makedb
219.if target(post-world)
220	@echo
221	@echo "--------------------------------------------------------------"
222	@echo " Making 'post-world' target"
223	@echo "--------------------------------------------------------------"
224	cd ${.CURDIR} && ${MAKE} post-world
225.endif
226	@echo
227	@echo "--------------------------------------------------------------"
228	@echo "make world completed on `LC_TIME=C date`"
229	@echo "--------------------------------------------------------------"
230
231#
232# reinstall
233#
234# If you have a build server, you can NFS mount the source and obj directories
235# and do a 'make reinstall' on the *client* to install new binaries from the
236# most recent server build.
237#
238reinstall:
239	@echo "--------------------------------------------------------------"
240	@echo " Making hierarchy"
241	@echo "--------------------------------------------------------------"
242	cd ${.CURDIR} && ${MAKE} hierarchy
243	@echo
244	@echo "--------------------------------------------------------------"
245	@echo " Rebuilding /usr/share/mk"
246	@echo "--------------------------------------------------------------"
247	cd ${.CURDIR} && ${MAKE} mk
248	@echo
249	@echo "--------------------------------------------------------------"
250	@echo " Installing everything.."
251	@echo "--------------------------------------------------------------"
252	cd ${.CURDIR} && ${MAKE} install
253	@echo
254	@echo "--------------------------------------------------------------"
255	@echo " Rebuilding man page indexes"
256	@echo "--------------------------------------------------------------"
257	cd ${.CURDIR}/share/man && ${MAKE} makedb
258
259
260#
261# update
262#
263# Update the source tree, by running sup and/or running cvs to update to the
264# latest copy.
265#
266update:
267.if defined(SUP_UPDATE)
268	@echo "--------------------------------------------------------------"
269	@echo "Running sup"
270	@echo "--------------------------------------------------------------"
271	@${SUP} ${SUPFLAGS} ${SUPFILE}
272.if defined(SUPFILE1)
273	@${SUP} ${SUPFLAGS} ${SUPFILE1}
274.endif
275.if defined(SUPFILE2)
276	@${SUP} ${SUPFLAGS} ${SUPFILE2}
277.endif
278.endif
279.if defined(CVS_UPDATE)
280	@echo "--------------------------------------------------------------"
281	@echo "Updating /usr/src from cvs repository" ${CVSROOT}
282	@echo "--------------------------------------------------------------"
283	cd ${.CURDIR} &&  cvs -q update -P -d
284.endif
285
286
287#
288# most
289#
290# Build most of the user binaries on the existing system libs and includes.
291#
292most:
293	@echo "--------------------------------------------------------------"
294	@echo " Building programs only"
295	@echo "--------------------------------------------------------------"
296	cd ${.CURDIR}/bin	&&	${MAKE} ${.MAKEFLAGS} all
297	cd ${.CURDIR}/sbin	&&	${MAKE} ${.MAKEFLAGS} all
298	cd ${.CURDIR}/libexec	&&	${MAKE} ${.MAKEFLAGS} all
299	cd ${.CURDIR}/usr.bin	&&	${MAKE} ${.MAKEFLAGS} all
300	cd ${.CURDIR}/usr.sbin	&&	${MAKE} ${.MAKEFLAGS} all
301	cd ${.CURDIR}/gnu/libexec &&	${MAKE} ${.MAKEFLAGS} all
302	cd ${.CURDIR}/gnu/usr.bin &&	${MAKE} ${.MAKEFLAGS} all
303	cd ${.CURDIR}/gnu/usr.sbin &&	${MAKE} ${.MAKEFLAGS} all
304#.if defined(MAKE_EBONES) && !defined(NOCRYPT)
305#	cd ${.CURDIR}/eBones	&&	${MAKE} ${.MAKEFLAGS} most
306#.endif
307#.if !defined(NOSECURE) && !defined(NOCRYPT)
308#	cd ${.CURDIR}/secure	&&	${MAKE} ${.MAKEFLAGS} most
309#.endif
310
311#
312# installmost
313#
314# Install the binaries built by the 'most' target.  This does not include
315# libraries or include files.
316#
317installmost:
318	@echo "--------------------------------------------------------------"
319	@echo " Installing programs only"
320	@echo "--------------------------------------------------------------"
321	cd ${.CURDIR}/bin	&&	${MAKE} ${.MAKEFLAGS} install
322	cd ${.CURDIR}/sbin	&&	${MAKE} ${.MAKEFLAGS} install
323	cd ${.CURDIR}/libexec	&&	${MAKE} ${.MAKEFLAGS} install
324	cd ${.CURDIR}/usr.bin	&&	${MAKE} ${.MAKEFLAGS} install
325	cd ${.CURDIR}/usr.sbin	&&	${MAKE} ${.MAKEFLAGS} install
326	cd ${.CURDIR}/gnu/libexec &&	${MAKE} ${.MAKEFLAGS} install
327	cd ${.CURDIR}/gnu/usr.bin &&	${MAKE} ${.MAKEFLAGS} install
328	cd ${.CURDIR}/gnu/usr.sbin &&	${MAKE} ${.MAKEFLAGS} install
329#.if defined(MAKE_EBONES) && !defined(NOCRYPT)
330#	cd ${.CURDIR}/eBones	&&	${MAKE} ${.MAKEFLAGS} installmost
331#.endif
332#.if !defined(NOSECURE) && !defined(NOCRYPT)
333#	cd ${.CURDIR}/secure	&&	${MAKE} ${.MAKEFLAGS} installmost
334#.endif
335
336#
337# ------------------------------------------------------------------------
338#
339# From here onwards are utility targets used by the 'make world' and
340# related targets.  If your 'world' breaks, you may like to try to fix
341# the problem and manually run the following targets to attempt to
342# complete the build.  Beware, this is *not* guaranteed to work, you
343# need to have a pretty good grip on the current state of the system
344# to attempt to manually finish it.  If in doubt, 'make world' again.
345#
346
347#
348# heirarchy - ensure that all the needed directories are present
349#
350hierarchy:
351	cd ${.CURDIR}/etc &&		${MAKE} distrib-dirs
352
353#
354# mk - update the /usr/share/mk makefiles.
355#
356mk:
357	cd ${.CURDIR}/share/mk &&	${MAKE} install
358
359#
360# bootstrap - [re]build tools needed to run the actual build, this includes
361# tools needed by 'make depend', as some tools are needed to generate source
362# for the dependency information to be gathered from.
363#
364bootstrap:
365	cd ${.CURDIR}/usr.bin/make && ${MAKE} depend && \
366		${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR}
367	cd ${.CURDIR}/usr.bin/xinstall && ${MAKE} depend && \
368		${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR}
369	cd ${.CURDIR}/usr.bin/lex && ${MAKE} bootstrap && ${MAKE} depend && \
370		${MAKE} ${MK_FLAGS} -DNOLIB all install ${CLEANDIR} ${OBJDIR}
371
372#
373# include-tools - generally the same as 'bootstrap', except that it's for
374# things that are specifically needed to generate include files.
375#
376# XXX should be merged with bootstrap, it's not worth keeeping them seperate
377#
378include-tools:
379	cd ${.CURDIR}/usr.bin/rpcgen && ${MAKE} depend && \
380		${MAKE} ${MK_FLAGS} depend all install ${CLEANDIR} ${OBJDIR}
381
382#
383# includes - possibly generate and install the include files.
384#
385includes:
386.if defined(CLOBBER)
387	rm -rf ${DESTDIR}/usr/include/*
388	mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
389		-p ${DESTDIR}/usr/include
390.endif
391	cd ${.CURDIR}/include/rpcsvc &&		${MAKE} all
392	cd ${.CURDIR}/include &&		${MAKE} install
393	cd ${.CURDIR}/gnu/include &&		${MAKE} install
394	cd ${.CURDIR}/gnu/lib/libreadline &&	${MAKE} beforeinstall
395	cd ${.CURDIR}/gnu/lib/libregex &&	${MAKE} beforeinstall
396	cd ${.CURDIR}/gnu/lib/libstdc++ &&      ${MAKE} beforeinstall
397	cd ${.CURDIR}/gnu/lib/libg++ &&         ${MAKE} beforeinstall
398	cd ${.CURDIR}/gnu/lib/libdialog &&      ${MAKE} beforeinstall
399.if exists(eBones) && !defined(NOCRYPT) && defined(MAKE_EBONES)
400	cd ${.CURDIR}/eBones/include &&		${MAKE} beforeinstall
401	cd ${.CURDIR}/eBones/lib/libkrb &&	${MAKE} beforeinstall
402	cd ${.CURDIR}/eBones/lib/libkadm &&	${MAKE} beforeinstall
403.endif
404	cd ${.CURDIR}/lib/csu/i386 &&		${MAKE} beforeinstall
405	cd ${.CURDIR}/lib/libc &&		${MAKE} beforeinstall
406	cd ${.CURDIR}/lib/libcurses &&		${MAKE} beforeinstall
407	cd ${.CURDIR}/lib/libedit &&		${MAKE} beforeinstall
408	cd ${.CURDIR}/lib/libftpio &&		${MAKE} beforeinstall
409	cd ${.CURDIR}/lib/libmd &&		${MAKE} beforeinstall
410	cd ${.CURDIR}/lib/libmytinfo &&         ${MAKE} beforeinstall
411	cd ${.CURDIR}/lib/libncurses &&		${MAKE} beforeinstall
412.if !defined(WANT_CSRG_LIBM)
413	cd ${.CURDIR}/lib/msun &&		${MAKE} beforeinstall
414.endif
415	cd ${.CURDIR}/lib/libpcap &&		${MAKE} beforeinstall
416	cd ${.CURDIR}/lib/librpcsvc &&		${MAKE} beforeinstall
417	cd ${.CURDIR}/lib/libskey &&		${MAKE} beforeinstall
418	cd ${.CURDIR}/lib/libtcl &&		${MAKE} beforeinstall
419	cd ${.CURDIR}/lib/libtermcap &&		${MAKE} beforeinstall
420	cd ${.CURDIR}/lib/libcom_err &&		${MAKE} beforeinstall
421	cd ${.CURDIR}/lib/libss &&		${MAKE} beforeinstall
422	cd ${.CURDIR}/lib/libscsi &&		${MAKE} beforeinstall
423	cd ${.CURDIR}/lib/libutil &&		${MAKE} beforeinstall
424
425#
426# lib-tools - build tools to compile and install the libraries.
427#
428lib-tools:
429	cd ${.CURDIR}/usr.bin/tsort && ${MAKE} depend && \
430		${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR}
431	cd ${.CURDIR}/gnu/usr.bin/ld && ${MAKE} depend && \
432		${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR}
433	cd ${.CURDIR}/gnu/usr.bin/as && ${MAKE} depend && \
434		${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR}
435	cd ${.CURDIR}/usr.bin/ar && ${MAKE} depend && \
436		${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR}
437	cd ${.CURDIR}/usr.bin/ranlib && ${MAKE} depend && \
438		${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR}
439	cd ${.CURDIR}/usr.bin/nm && ${MAKE} depend && \
440		${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR}
441	cd ${.CURDIR}/usr.bin/lex/lib && ${MAKE} depend && \
442		${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR}
443	cd ${.CURDIR}/usr.bin/compile_et && ${MAKE} depend && \
444		${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} && \
445		rm -f /usr/sbin/compile_et
446	cd ${.CURDIR}/usr.bin/mk_cmds && ${MAKE} depend && \
447		${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR}
448	cd ${.CURDIR}/gnu/usr.bin/bison && ${MAKE} depend && \
449		${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR}
450	cd ${.CURDIR}/gnu/usr.bin/gperf && ${MAKE} depend && \
451		${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR}
452	cd ${.CURDIR}/gnu/usr.bin/cc && ${MAKE} depend && \
453		${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR}
454
455#
456# libraries - build and install the libraries
457#
458libraries:
459.if exists(lib/libcompat)
460	cd ${.CURDIR}/lib/libcompat && ${MAKE} depend && \
461		${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR}
462.endif
463.if exists(lib/libncurses)
464	cd ${.CURDIR}/lib/libncurses && ${MAKE} depend && \
465		${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR}
466.endif
467.if exists(lib/libtermcap)
468	cd ${.CURDIR}/lib/libtermcap && ${MAKE} depend && \
469		${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR}
470.endif
471.if exists(lib)
472	cd ${.CURDIR}/lib/csu/i386 && ${MAKE} depend && \
473		${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR}
474.endif
475.if exists(gnu)
476	cd ${.CURDIR}/gnu/lib && ${MAKE} depend && \
477		${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR}
478.endif
479.if exists(secure) && !defined(NOCRYPT) && !defined(NOSECURE)
480	cd ${.CURDIR}/secure/lib && ${MAKE} depend && \
481		${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR}
482.endif
483.if exists(lib)
484	cd ${.CURDIR}/lib && ${MAKE} depend && \
485		${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR}
486.endif
487.if exists(usr.bin/lex/lib)
488	cd ${.CURDIR}/usr.bin/lex/lib && ${MAKE} depend && \
489		${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR}
490.endif
491.if exists(eBones) && !defined(NOCRYPT) && defined(MAKE_EBONES)
492	cd ${.CURDIR}/eBones/lib && ${MAKE} depend && \
493		${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR}
494.endif
495.if exists(usr.sbin/pcvt/keycap)
496	cd ${.CURDIR}/usr.sbin/pcvt/keycap && ${MAKE} depend && \
497		${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR}
498.endif
499
500#
501# build-tools - build and install any other tools needed to complete the
502# compile and install.
503#
504build-tools:
505.for d in				\
506		share/info		\
507		gnu/usr.bin/texinfo     \
508		usr.bin/symorder	\
509		usr.bin/sgmls		\
510		usr.bin/sgmlfmt		\
511		share/sgml		\
512		usr.sbin/zic		\
513		gnu/usr.bin/awk		\
514		gnu/usr.bin/groff
515	cd ${.CURDIR}/$d && ${MAKE} depend && \
516		${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR}
517.endfor
518
519.include <bsd.subdir.mk>
520