2 # $Id: Makefile,v 1.158 1998/02/19 00:24:43 nate Exp $
4 # While porting to the another architecture include the bootstrap instead
7 .if exists(${.CURDIR}/Makefile.${MACHINE})
8 .include "${.CURDIR}/Makefile.${MACHINE}"
11 # Make command line options:
12 # -DCLOBBER will remove /usr/include
13 # -DMAKE_KERBEROS4 to build KerberosIV
14 # -DALLLANG to build documentation for all languages
15 # (where available -- see share/doc/Makefile)
17 # -DNOCLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir
18 # -DNOCLEAN do not clean at all
19 # -DNOTOOLS do not rebuild any tools first
20 # -DNOCRYPT will prevent building of crypt versions
21 # -DNOLKM do not build loadable kernel modules
22 # -DNOOBJDIR do not run ``${MAKE} obj''
23 # -DNOPROFILE do not build profiled libraries
24 # -DNOSECURE do not go into secure subdir
25 # -DNOGAMES do not go into games subdir
26 # -DNOSHARE do not go into share subdir
27 # -DNOINFO do not make or install info files
28 # -DNOLIBC_R do not build libc_r.
29 # LOCAL_DIRS="list of dirs" to add additional dirs to the SUBDIR list
32 # The intended user-driven targets are:
33 # buildworld - rebuild *everything*, including glue to help do upgrades
34 # installworld- install everything built by "buildworld"
35 # world - buildworld + installworld
36 # update - convenient way to update your source tree (eg: sup/cvs)
37 # most - build user commands, no libraries or include files
38 # installmost - install user commands, no libraries or include files
40 # Standard targets (not defined here) are documented in the makefiles in
41 # /usr/share/mk. These include:
42 # obj depend all install clean cleandepend cleanobj
44 .if (!make(world)) && (!make(buildworld)) && (!make(installworld))
45 .MAKEFLAGS:= ${.MAKEFLAGS} -m ${.CURDIR}/share/mk
48 # Put initial settings here.
51 # We must do share/info early so that installation of info `dir'
52 # entries works correctly. Do it first since it is less likely to
53 # grow dependencies on include and lib than vice versa.
54 .if exists(share/info)
58 # We must do include and lib early so that the perl *.ph generation
59 # works correctly as it uses the header files installed by this.
70 .if exists(games) && !defined(NOGAMES)
76 .if exists(kerberosIV) && !defined(NOCRYPT) && defined(MAKE_KERBEROS4)
85 .if exists(share) && !defined(NOSHARE)
97 .if exists(secure) && !defined(NOCRYPT) && !defined(NOSECURE)
100 .if exists(lkm) && !defined(NOLKM)
104 # etc must be last for "distribute" to work
105 .if exists(etc) && make(distribute)
109 # These are last, since it is nice to at least get the base system
110 # rebuilt before you do them.
111 .if defined(LOCAL_DIRS)
112 .for _DIR in ${LOCAL_DIRS}
113 .if exists(${_DIR}) & exists(${_DIR}/Makefile)
119 # Handle -DNOOBJDIR, -DNOCLEAN and -DNOCLEANDIR
120 .if defined(NOOBJDIR)
129 .if defined(NOCLEANDIR)
140 # While building tools for bootstrapping, we dont need to waste time on
141 # profiled libraries or man pages. This speeds things up somewhat.
143 MK_FLAGS= -DNOINFO -DNOMAN -DNOPROFILE
148 # Attempt to rebuild and reinstall *everything*, with reasonable chance of
149 # success, regardless of how old your existing system is.
151 # >> Beware, it overwrites the local build environment! <<
154 @echo "--------------------------------------------------------------"
155 @echo "make world started on `LC_TIME=C date`"
156 @echo "--------------------------------------------------------------"
157 .if target(pre-world)
159 @echo "--------------------------------------------------------------"
160 @echo " Making 'pre-world' target"
161 @echo "--------------------------------------------------------------"
162 cd ${.CURDIR} && ${MAKE} pre-world
164 cd ${.CURDIR} && ${MAKE} buildworld
165 cd ${.CURDIR} && ${MAKE} -B installworld
166 .if target(post-world)
168 @echo "--------------------------------------------------------------"
169 @echo " Making 'post-world' target"
170 @echo "--------------------------------------------------------------"
171 cd ${.CURDIR} && ${MAKE} post-world
174 @echo "--------------------------------------------------------------"
175 @echo "make world completed on `LC_TIME=C date`"
176 @echo "--------------------------------------------------------------"
178 .if defined(MAKEOBJDIRPREFIX)
179 WORLDTMP= ${MAKEOBJDIRPREFIX}${.CURDIR}/tmp
181 WORLDTMP= /usr/obj${.CURDIR}/tmp
183 STRICTTMPPATH= ${WORLDTMP}/sbin:${WORLDTMP}/usr/sbin:${WORLDTMP}/bin:${WORLDTMP}/usr/bin
184 TMPPATH= ${STRICTTMPPATH}:${PATH}
186 # XXX COMPILER_PATH is needed for finding cc1, ld and as
187 # XXX GCC_EXEC_PREFIX is for *crt.o. It is probably unnecssary now
188 # tbat LIBRARY_PATH is set. We still can't use -nostdlib, since gcc
189 # wouldn't link *crt.o or libgcc if it were used.
190 # XXX LD_LIBRARY_PATH is for ld.so. It is also used by ld, although we don't
191 # want that - all compile-time library paths should be resolved by gcc.
192 # It fails for set[ug]id executables (are any used?).
193 COMPILER_ENV= BISON_SIMPLE=${WORLDTMP}/usr/share/misc/bison.simple \
194 COMPILER_PATH=${WORLDTMP}/usr/libexec:${WORLDTMP}/usr/bin \
195 GCC_EXEC_PREFIX=${WORLDTMP}/usr/lib/ \
196 LD_LIBRARY_PATH=${WORLDTMP}${SHLIBDIR} \
197 LIBRARY_PATH=${WORLDTMP}${SHLIBDIR}:${WORLDTMP}/usr/lib
199 BMAKEENV= PATH=${TMPPATH} ${COMPILER_ENV} NOEXTRADEPEND=t
200 XMAKEENV= PATH=${STRICTTMPPATH} ${COMPILER_ENV} \
201 CC='cc -nostdinc' # XXX -nostdlib
203 # used to compile and install 'make' in temporary build tree
204 IBMAKE= ${BMAKEENV} ${MAKE} DESTDIR=${WORLDTMP}
206 BMAKE= ${BMAKEENV} ${WORLDTMP}/usr/bin/${MAKE} DESTDIR=${WORLDTMP}
207 # cross make used for compilation
208 XMAKE= ${XMAKEENV} ${WORLDTMP}/usr/bin/${MAKE} DESTDIR=${WORLDTMP}
209 # cross make used for final installation
210 IXMAKE= ${XMAKEENV} ${WORLDTMP}/usr/bin/${MAKE}
215 # Attempt to rebuild the entire system, with reasonable chance of
216 # success, regardless of how old your existing system is.
219 .if !defined(NOCLEAN)
221 @echo "--------------------------------------------------------------"
222 @echo " Cleaning up the temporary build tree"
223 @echo "--------------------------------------------------------------"
225 chflags -R noschg ${WORLDTMP}/
228 .if !defined(NOTOOLS)
230 @echo "--------------------------------------------------------------"
232 @echo "--------------------------------------------------------------"
233 mkdir -p ${WORLDTMP}/usr/bin
234 .if !defined(NOCLEAN) || !defined(NOOBJDIR)
235 cd ${.CURDIR}/usr.bin/make && \
236 ${IBMAKE} -I${.CURDIR}/share/mk ${CLEANDIR} ${OBJDIR}
238 cd ${.CURDIR}/usr.bin/make && \
239 ${IBMAKE} -I${.CURDIR}/share/mk depend && \
240 ${IBMAKE} -I${.CURDIR}/share/mk ${MK_FLAGS} all && \
241 ${IBMAKE} -I${.CURDIR}/share/mk ${MK_FLAGS} install && \
242 ${IBMAKE} -I${.CURDIR}/share/mk ${MK_FLAGS} clean cleandepend
245 @echo "--------------------------------------------------------------"
246 @echo " Making hierarchy"
247 @echo "--------------------------------------------------------------"
248 cd ${.CURDIR} && ${BMAKE} hierarchy
249 .if !defined(NOCLEAN)
251 @echo "--------------------------------------------------------------"
252 @echo " Cleaning up the obj tree"
253 @echo "--------------------------------------------------------------"
254 cd ${.CURDIR} && ${BMAKE} par-${CLEANDIR}
256 .if !defined(NOOBJDIR)
258 @echo "--------------------------------------------------------------"
259 @echo " Rebuilding the obj tree"
260 @echo "--------------------------------------------------------------"
261 cd ${.CURDIR} && ${BMAKE} par-obj
263 .if !defined(NOTOOLS)
265 @echo "--------------------------------------------------------------"
266 @echo " Rebuilding bootstrap tools"
267 @echo "--------------------------------------------------------------"
268 cd ${.CURDIR} && ${BMAKE} bootstrap
270 @echo "--------------------------------------------------------------"
271 @echo " Rebuilding tools necessary to build the include files"
272 @echo "--------------------------------------------------------------"
273 cd ${.CURDIR} && ${BMAKE} include-tools
276 @echo "--------------------------------------------------------------"
277 @echo " Rebuilding /usr/include"
278 @echo "--------------------------------------------------------------"
279 cd ${.CURDIR} && SHARED=symlinks ${BMAKE} includes
280 .if !defined(NOTOOLS)
282 @echo "--------------------------------------------------------------"
283 @echo " Rebuilding tools needed to build the libraries"
284 @echo "--------------------------------------------------------------"
285 cd ${.CURDIR} && ${BMAKE} lib-tools
288 @echo "--------------------------------------------------------------"
289 @echo " Rebuilding /usr/lib"
290 @echo "--------------------------------------------------------------"
291 cd ${.CURDIR} && ${BMAKE} libraries
292 .if !defined(NOTOOLS)
294 @echo "--------------------------------------------------------------"
295 @echo " Rebuilding all other tools needed to build the world"
296 @echo "--------------------------------------------------------------"
297 cd ${.CURDIR} && ${BMAKE} build-tools
300 @echo "--------------------------------------------------------------"
301 @echo " Rebuilding dependencies"
302 @echo "--------------------------------------------------------------"
303 cd ${.CURDIR} && ${XMAKE} par-depend
305 @echo "--------------------------------------------------------------"
306 @echo " Building everything.."
307 @echo "--------------------------------------------------------------"
308 cd ${.CURDIR} && ${XMAKE} all
313 # Installs everything compiled by a 'buildworld'.
316 cd ${.CURDIR} && ${IXMAKE} reinstall
321 # If you have a build server, you can NFS mount the source and obj directories
322 # and do a 'make reinstall' on the *client* to install new binaries from the
323 # most recent server build.
326 @echo "--------------------------------------------------------------"
327 @echo " Making hierarchy"
328 @echo "--------------------------------------------------------------"
329 cd ${.CURDIR} && ${MAKE} hierarchy
331 @echo "--------------------------------------------------------------"
332 @echo " Installing everything.."
333 @echo "--------------------------------------------------------------"
334 cd ${.CURDIR} && ${MAKE} install
336 @echo "--------------------------------------------------------------"
337 @echo " Re-scanning the shared libraries.."
338 @echo "--------------------------------------------------------------"
339 cd ${.CURDIR} && ldconfig -R
341 @echo "--------------------------------------------------------------"
342 @echo " Rebuilding man page indexes"
343 @echo "--------------------------------------------------------------"
344 cd ${.CURDIR}/share/man && ${MAKE} makedb
349 # Update the source tree, by running sup and/or running cvs to update to the
353 .if defined(SUP_UPDATE)
354 @echo "--------------------------------------------------------------"
356 @echo "--------------------------------------------------------------"
357 @${SUP} ${SUPFLAGS} ${SUPFILE}
358 .if defined(SUPFILE1)
359 @${SUP} ${SUPFLAGS} ${SUPFILE1}
361 .if defined(SUPFILE2)
362 @${SUP} ${SUPFLAGS} ${SUPFILE2}
365 .if defined(CVS_UPDATE)
366 @echo "--------------------------------------------------------------"
367 @echo "Updating /usr/src from cvs repository" ${CVSROOT}
368 @echo "--------------------------------------------------------------"
369 cd ${.CURDIR} && cvs -q update -P -d
375 # Build most of the user binaries on the existing system libs and includes.
378 @echo "--------------------------------------------------------------"
379 @echo " Building programs only"
380 @echo "--------------------------------------------------------------"
381 cd ${.CURDIR}/bin && ${MAKE} all
382 cd ${.CURDIR}/sbin && ${MAKE} all
383 cd ${.CURDIR}/libexec && ${MAKE} all
384 cd ${.CURDIR}/usr.bin && ${MAKE} all
385 cd ${.CURDIR}/usr.sbin && ${MAKE} all
386 cd ${.CURDIR}/gnu/libexec && ${MAKE} all
387 cd ${.CURDIR}/gnu/usr.bin && ${MAKE} all
388 cd ${.CURDIR}/gnu/usr.sbin && ${MAKE} all
389 #.if defined(MAKE_KERBEROS4) && !defined(NOCRYPT)
390 # cd ${.CURDIR}/kerberosIV && ${MAKE} most
392 #.if !defined(NOSECURE) && !defined(NOCRYPT)
393 # cd ${.CURDIR}/secure && ${MAKE} most
399 # Install the binaries built by the 'most' target. This does not include
400 # libraries or include files.
403 @echo "--------------------------------------------------------------"
404 @echo " Installing programs only"
405 @echo "--------------------------------------------------------------"
406 cd ${.CURDIR}/bin && ${MAKE} install
407 cd ${.CURDIR}/sbin && ${MAKE} install
408 cd ${.CURDIR}/libexec && ${MAKE} install
409 cd ${.CURDIR}/usr.bin && ${MAKE} install
410 cd ${.CURDIR}/usr.sbin && ${MAKE} install
411 cd ${.CURDIR}/gnu/libexec && ${MAKE} install
412 cd ${.CURDIR}/gnu/usr.bin && ${MAKE} install
413 cd ${.CURDIR}/gnu/usr.sbin && ${MAKE} install
414 #.if defined(MAKE_KERBEROS4) && !defined(NOCRYPT)
415 # cd ${.CURDIR}/kerberosIV && ${MAKE} installmost
417 #.if !defined(NOSECURE) && !defined(NOCRYPT)
418 # cd ${.CURDIR}/secure && ${MAKE} installmost
422 # ------------------------------------------------------------------------
424 # From here onwards are utility targets used by the 'make world' and
425 # related targets. If your 'world' breaks, you may like to try to fix
426 # the problem and manually run the following targets to attempt to
427 # complete the build. Beware, this is *not* guaranteed to work, you
428 # need to have a pretty good grip on the current state of the system
429 # to attempt to manually finish it. If in doubt, 'make world' again.
433 # heirarchy - ensure that all the needed directories are present
436 cd ${.CURDIR}/etc && ${MAKE} distrib-dirs
439 # bootstrap - [re]build tools needed to run the actual build, this includes
440 # tools needed by 'make depend', as some tools are needed to generate source
441 # for the dependency information to be gathered from.
445 rm -f ${DESTDIR}/usr/src/sys
446 ln -s ${.CURDIR}/sys ${DESTDIR}/usr/src
447 cd ${.CURDIR}/include && find -dx . | cpio -dump ${DESTDIR}/usr/include
448 cd ${.CURDIR}/include && make symlinks
450 cd ${.CURDIR}/usr.bin/make && ${MAKE} depend && \
451 ${MAKE} ${MK_FLAGS} all && \
452 ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
453 cd ${.CURDIR}/usr.bin/xinstall && ${MAKE} depend && \
454 ${MAKE} ${MK_FLAGS} all && \
455 ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
456 cd ${.CURDIR}/usr.bin/lex && ${MAKE} bootstrap && ${MAKE} depend && \
457 ${MAKE} ${MK_FLAGS} -DNOLIB all && \
458 ${MAKE} ${MK_FLAGS} -DNOLIB -B install ${CLEANDIR}
459 .if !defined(NOOBJDIR)
460 cd ${.CURDIR}/usr.bin/lex && ${MAKE} obj
464 # include-tools - generally the same as 'bootstrap', except that it's for
465 # things that are specifically needed to generate include files.
467 # XXX should be merged with bootstrap, it's not worth keeeping them separate.
468 # Well, maybe it is now. We force 'cleandepend' here to avoid dependencies
469 # on cleaned away headers in ${WORLDTMP}.
472 cd ${.CURDIR}/usr.bin/rpcgen && ${MAKE} -B cleandepend depend && \
473 ${MAKE} ${MK_FLAGS} all && \
474 ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
477 # includes - possibly generate and install the include files.
481 rm -rf ${DESTDIR}/usr/include/*
482 mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
483 -p ${DESTDIR}/usr/include
485 cd ${.CURDIR}/include && ${MAKE} -B all install
486 cd ${.CURDIR}/gnu/include && ${MAKE} install
487 cd ${.CURDIR}/gnu/lib/libmp && ${MAKE} beforeinstall
488 cd ${.CURDIR}/gnu/lib/libobjc && ${MAKE} beforeinstall
489 cd ${.CURDIR}/gnu/lib/libreadline && ${MAKE} beforeinstall
490 cd ${.CURDIR}/gnu/lib/libregex && ${MAKE} beforeinstall
491 cd ${.CURDIR}/gnu/lib/libstdc++ && ${MAKE} beforeinstall
492 cd ${.CURDIR}/gnu/lib/libg++ && ${MAKE} beforeinstall
493 cd ${.CURDIR}/gnu/lib/libdialog && ${MAKE} beforeinstall
494 cd ${.CURDIR}/gnu/lib/libgmp && ${MAKE} beforeinstall
495 .if exists(secure) && !defined(NOCRYPT)
496 cd ${.CURDIR}/secure/lib/libdes && ${MAKE} beforeinstall
498 .if exists(kerberosIV) && !defined(NOCRYPT) && defined(MAKE_KERBEROS4)
499 cd ${.CURDIR}/kerberosIV/lib/libacl && ${MAKE} beforeinstall
500 cd ${.CURDIR}/kerberosIV/lib/libkadm && ${MAKE} beforeinstall
501 cd ${.CURDIR}/kerberosIV/lib/libkafs && ${MAKE} beforeinstall
502 cd ${.CURDIR}/kerberosIV/lib/libkdb && ${MAKE} beforeinstall
503 cd ${.CURDIR}/kerberosIV/lib/libkrb && ${MAKE} beforeinstall
504 cd ${.CURDIR}/kerberosIV/lib/libtelnet && ${MAKE} beforeinstall
506 cd ${.CURDIR}/lib/libtelnet && ${MAKE} beforeinstall
508 .if exists(${.CURDIR}/lib/csu/${MACHINE})
509 cd ${.CURDIR}/lib/csu/${MACHINE} && ${MAKE} beforeinstall
511 cd ${.CURDIR}/lib/libalias && ${MAKE} beforeinstall
512 cd ${.CURDIR}/lib/libc && ${MAKE} beforeinstall
513 cd ${.CURDIR}/lib/libcurses && ${MAKE} beforeinstall
514 cd ${.CURDIR}/lib/libdisk && ${MAKE} beforeinstall
515 cd ${.CURDIR}/lib/libedit && ${MAKE} beforeinstall
516 cd ${.CURDIR}/lib/libftpio && ${MAKE} beforeinstall
517 cd ${.CURDIR}/lib/libmd && ${MAKE} beforeinstall
518 cd ${.CURDIR}/lib/libmytinfo && ${MAKE} beforeinstall
519 cd ${.CURDIR}/lib/libncurses && ${MAKE} beforeinstall
520 .if !defined(WANT_CSRG_LIBM)
521 cd ${.CURDIR}/lib/msun && ${MAKE} beforeinstall
523 cd ${.CURDIR}/lib/libopie && ${MAKE} beforeinstall
524 cd ${.CURDIR}/lib/libpcap && ${MAKE} beforeinstall
525 cd ${.CURDIR}/lib/librpcsvc && ${MAKE} beforeinstall
526 cd ${.CURDIR}/lib/libskey && ${MAKE} beforeinstall
527 .if !defined(NOTCL) && exists (${.CURDIR}/contrib/tcl) && \
528 exists(${.CURDIR}/usr.bin/tclsh) && exists (${.CURDIR}/lib/libtcl)
529 cd ${.CURDIR}/lib/libtcl && ${MAKE} installhdrs
531 cd ${.CURDIR}/lib/libtermcap && ${MAKE} beforeinstall
532 cd ${.CURDIR}/lib/libcom_err && ${MAKE} beforeinstall
533 cd ${.CURDIR}/lib/libss && ${MAKE} beforeinstall
534 cd ${.CURDIR}/lib/libscsi && ${MAKE} beforeinstall
535 cd ${.CURDIR}/lib/libutil && ${MAKE} beforeinstall
536 cd ${.CURDIR}/lib/libvgl && ${MAKE} beforeinstall
537 cd ${.CURDIR}/lib/libz && ${MAKE} beforeinstall
538 cd ${.CURDIR}/usr.bin/f2c && ${MAKE} beforeinstall
539 cd ${.CURDIR}/usr.bin/lex && ${MAKE} beforeinstall
542 # lib-tools - build tools to compile and install the libraries.
544 # XXX gperf is required for cc
545 # XXX a new ld and tsort is required for cc
561 cd ${.CURDIR}/$d && ${MAKE} depend && \
562 ${MAKE} ${MK_FLAGS} all && \
563 ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
567 # libraries - build and install the libraries
570 .if exists(lib/csu/${MACHINE})
571 cd ${.CURDIR}/lib/csu/${MACHINE} && ${MAKE} depend && \
572 ${MAKE} ${MK_FLAGS} all && \
573 ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
575 .if exists(lib/libcompat)
576 cd ${.CURDIR}/lib/libcompat && ${MAKE} depend && \
577 ${MAKE} ${MK_FLAGS} all && \
578 ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
580 .if exists(lib/libncurses)
581 cd ${.CURDIR}/lib/libncurses && ${MAKE} depend && \
582 ${MAKE} ${MK_FLAGS} all && \
583 ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
585 .if exists(lib/libtermcap)
586 cd ${.CURDIR}/lib/libtermcap && ${MAKE} depend && \
587 ${MAKE} ${MK_FLAGS} all && \
588 ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
591 cd ${.CURDIR}/gnu/lib && ${MAKE} depend && \
592 ${MAKE} ${MK_FLAGS} all && \
593 ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
595 .if exists(secure) && !defined(NOCRYPT) && !defined(NOSECURE)
596 cd ${.CURDIR}/secure/lib && ${MAKE} depend && \
597 ${MAKE} ${MK_FLAGS} all && \
598 ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
601 cd ${.CURDIR}/lib && ${MAKE} depend && \
602 ${MAKE} ${MK_FLAGS} all && \
603 ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
605 .if exists(usr.bin/lex/lib)
606 cd ${.CURDIR}/usr.bin/lex/lib && ${MAKE} depend && \
607 ${MAKE} ${MK_FLAGS} all && \
608 ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
610 .if exists(kerberosIV) && !defined(NOCRYPT) && defined(MAKE_KERBEROS4)
611 cd ${.CURDIR}/kerberosIV/lib && ${MAKE} depend && \
612 ${MAKE} ${MK_FLAGS} all && \
613 ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
615 .if exists(usr.sbin/pcvt/keycap)
616 cd ${.CURDIR}/usr.sbin/pcvt/keycap && ${MAKE} depend && \
617 ${MAKE} ${MK_FLAGS} all && \
618 ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
622 # build-tools - build and install any other tools needed to complete the
623 # compile and install.
625 # bc and cpp are required to build groff. Otherwise, the order here is
626 # mostly historical, i.e., bogus.
627 # chmod is used to build gcc's tmpmultilib[2] at obscure times.
629 # XXX uname is a bug - the target should not depend on the host.
653 gnu/usr.bin/man/makewhatis \
655 gnu/usr.bin/texinfo \
688 cd ${.CURDIR}/$d && ${MAKE} depend && \
689 ${MAKE} ${MK_FLAGS} all && \
690 ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
693 .for __target in clean cleandir obj depend
694 .for entry in ${SUBDIR}
695 ${entry}.${__target}__D: .PHONY
696 if test -d ${.CURDIR}/${entry}.${MACHINE}; then \
697 ${ECHODIR} "===> ${DIRPRFX}${entry}.${MACHINE}"; \
698 edir=${entry}.${MACHINE}; \
699 cd ${.CURDIR}/$${edir}; \
701 ${ECHODIR} "===> ${DIRPRFX}${entry}"; \
703 cd ${.CURDIR}/$${edir}; \
705 ${MAKE} ${__target} DIRPRFX=${DIRPRFX}$${edir}/
707 par-${__target}: ${SUBDIR:S/$/.${__target}__D/}
712 .include <bsd.subdir.mk>