2 # $Id: Makefile,v 1.165 1998/03/15 04:52:58 bde 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:= -m ${.CURDIR}/share/mk ${.MAKEFLAGS}
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 don't need to waste time on
141 # shared or profiled libraries, shared linkage, or documentation, except
142 # when the tools won't get cleaned we must use the defaults for shared
143 # libraries and shared linkage (and this doesn't waste time).
144 # XXX actually, we do need to waste time building shared libraries.
147 MK_FLAGS= -DNOINFO -DNOMAN -DNOPROFILE
149 MK_FLAGS= -DNOINFO -DNOMAN -DNOPROFILE -DNOSHARED
155 # Attempt to rebuild and reinstall *everything*, with reasonable chance of
156 # success, regardless of how old your existing system is.
158 # >> Beware, it overwrites the local build environment! <<
161 @echo "--------------------------------------------------------------"
162 @echo "make world started on `LC_TIME=C date`"
163 @echo "--------------------------------------------------------------"
164 .if target(pre-world)
166 @echo "--------------------------------------------------------------"
167 @echo " Making 'pre-world' target"
168 @echo "--------------------------------------------------------------"
169 cd ${.CURDIR} && ${MAKE} pre-world
171 cd ${.CURDIR} && ${MAKE} buildworld
172 cd ${.CURDIR} && ${MAKE} -B installworld
173 .if target(post-world)
175 @echo "--------------------------------------------------------------"
176 @echo " Making 'post-world' target"
177 @echo "--------------------------------------------------------------"
178 cd ${.CURDIR} && ${MAKE} post-world
181 @echo "--------------------------------------------------------------"
182 @echo "make world completed on `LC_TIME=C date`"
183 @echo "--------------------------------------------------------------"
185 .if defined(MAKEOBJDIRPREFIX)
186 WORLDTMP= ${MAKEOBJDIRPREFIX}${.CURDIR}/tmp
188 WORLDTMP= /usr/obj${.CURDIR}/tmp
190 STRICTTMPPATH= ${WORLDTMP}/sbin:${WORLDTMP}/usr/sbin:${WORLDTMP}/bin:${WORLDTMP}/usr/bin
191 TMPPATH= ${STRICTTMPPATH}:${PATH}
193 # XXX COMPILER_PATH is needed for finding cc1, ld and as
194 # XXX GCC_EXEC_PREFIX is for *crt.o. It is probably unnecssary now
195 # tbat LIBRARY_PATH is set. We still can't use -nostdlib, since gcc
196 # wouldn't link *crt.o or libgcc if it were used.
197 # XXX LD_LIBRARY_PATH is for ld.so. It is also used by ld, although we don't
198 # want that - all compile-time library paths should be resolved by gcc.
199 # It fails for set[ug]id executables (are any used?).
200 COMPILER_ENV= BISON_SIMPLE=${WORLDTMP}/usr/share/misc/bison.simple \
201 COMPILER_PATH=${WORLDTMP}/usr/libexec:${WORLDTMP}/usr/bin \
202 GCC_EXEC_PREFIX=${WORLDTMP}${SHLIBDIR}:${WORLDTMP}/usr/lib/ \
203 LD_LIBRARY_PATH=${WORLDTMP}${SHLIBDIR} \
204 LIBRARY_PATH=${WORLDTMP}${SHLIBDIR}:${WORLDTMP}/usr/lib
206 BMAKEENV= PATH=${TMPPATH} ${COMPILER_ENV} NOEXTRADEPEND=t
207 XMAKEENV= PATH=${STRICTTMPPATH} ${COMPILER_ENV} \
208 CC='cc -nostdinc' # XXX -nostdlib
210 # used to compile and install 'make' in temporary build tree
211 IBMAKE= ${BMAKEENV} ${MAKE} DESTDIR=${WORLDTMP}
213 BMAKE= ${BMAKEENV} ${WORLDTMP}/usr/bin/${MAKE} DESTDIR=${WORLDTMP}
214 # cross make used for compilation
215 XMAKE= ${XMAKEENV} ${WORLDTMP}/usr/bin/${MAKE} DESTDIR=${WORLDTMP}
216 # cross make used for final installation
217 IXMAKE= ${XMAKEENV} ${WORLDTMP}/usr/bin/${MAKE}
222 # Attempt to rebuild the entire system, with reasonable chance of
223 # success, regardless of how old your existing system is.
226 .if !defined(NOCLEAN)
228 @echo "--------------------------------------------------------------"
229 @echo " Cleaning up the temporary build tree"
230 @echo "--------------------------------------------------------------"
232 chflags -R noschg ${WORLDTMP}/
235 .if !defined(NOTOOLS)
237 @echo "--------------------------------------------------------------"
239 @echo "--------------------------------------------------------------"
240 mkdir -p ${WORLDTMP}/usr/bin
241 .if !defined(NOCLEAN) || !defined(NOOBJDIR)
242 cd ${.CURDIR}/usr.bin/make && \
243 ${IBMAKE} -I${.CURDIR}/share/mk ${CLEANDIR} ${OBJDIR}
245 cd ${.CURDIR}/usr.bin/make && \
246 ${IBMAKE} -I${.CURDIR}/share/mk ${MK_FLAGS} depend && \
247 ${IBMAKE} -I${.CURDIR}/share/mk ${MK_FLAGS} all && \
248 ${IBMAKE} -I${.CURDIR}/share/mk ${MK_FLAGS} install && \
249 ${IBMAKE} -I${.CURDIR}/share/mk ${MK_FLAGS} clean cleandepend
252 @echo "--------------------------------------------------------------"
253 @echo " Making hierarchy"
254 @echo "--------------------------------------------------------------"
255 cd ${.CURDIR} && ${BMAKE} hierarchy
256 .if !defined(NOCLEAN)
258 @echo "--------------------------------------------------------------"
259 @echo " Cleaning up the obj tree"
260 @echo "--------------------------------------------------------------"
261 cd ${.CURDIR} && ${BMAKE} par-${CLEANDIR}
263 .if !defined(NOOBJDIR)
265 @echo "--------------------------------------------------------------"
266 @echo " Rebuilding the obj tree"
267 @echo "--------------------------------------------------------------"
268 cd ${.CURDIR} && ${BMAKE} par-${OBJDIR}
270 .if !defined(NOTOOLS)
272 @echo "--------------------------------------------------------------"
273 @echo " Rebuilding bootstrap tools"
274 @echo "--------------------------------------------------------------"
275 cd ${.CURDIR} && ${BMAKE} bootstrap
277 @echo "--------------------------------------------------------------"
278 @echo " Rebuilding tools necessary to build the include files"
279 @echo "--------------------------------------------------------------"
280 cd ${.CURDIR} && ${BMAKE} include-tools
283 @echo "--------------------------------------------------------------"
284 @echo " Rebuilding ${DESTDIR}/usr/include"
285 @echo "--------------------------------------------------------------"
286 cd ${.CURDIR} && SHARED=symlinks ${BMAKE} includes
287 .if !defined(NOTOOLS)
289 @echo "--------------------------------------------------------------"
290 @echo " Rebuilding tools needed to build the libraries"
291 @echo "--------------------------------------------------------------"
292 cd ${.CURDIR} && ${BMAKE} lib-tools
295 @echo "--------------------------------------------------------------"
296 @echo " Rebuilding ${DESTDIR}/usr/lib"
297 @echo "--------------------------------------------------------------"
298 cd ${.CURDIR} && ${BMAKE} libraries
299 .if !defined(NOTOOLS)
301 @echo "--------------------------------------------------------------"
302 @echo " Rebuilding all other tools needed to build the world"
303 @echo "--------------------------------------------------------------"
304 cd ${.CURDIR} && ${BMAKE} build-tools
307 @echo "--------------------------------------------------------------"
308 @echo " Rebuilding dependencies"
309 @echo "--------------------------------------------------------------"
310 cd ${.CURDIR} && ${XMAKE} par-depend
312 @echo "--------------------------------------------------------------"
313 @echo " Building everything.."
314 @echo "--------------------------------------------------------------"
315 cd ${.CURDIR} && ${XMAKE} all
320 # Installs everything compiled by a 'buildworld'.
323 cd ${.CURDIR} && ${IXMAKE} reinstall
328 # If you have a build server, you can NFS mount the source and obj directories
329 # and do a 'make reinstall' on the *client* to install new binaries from the
330 # most recent server build.
333 @echo "--------------------------------------------------------------"
334 @echo " Making hierarchy"
335 @echo "--------------------------------------------------------------"
336 cd ${.CURDIR} && ${MAKE} hierarchy
338 @echo "--------------------------------------------------------------"
339 @echo " Installing everything.."
340 @echo "--------------------------------------------------------------"
341 cd ${.CURDIR} && ${MAKE} install
343 @echo "--------------------------------------------------------------"
344 @echo " Re-scanning the shared libraries.."
345 @echo "--------------------------------------------------------------"
346 cd ${.CURDIR} && ldconfig -R
348 @echo "--------------------------------------------------------------"
349 @echo " Rebuilding man page indexes"
350 @echo "--------------------------------------------------------------"
351 cd ${.CURDIR}/share/man && ${MAKE} makedb
356 # Update the source tree, by running sup and/or running cvs to update to the
360 .if defined(SUP_UPDATE)
361 @echo "--------------------------------------------------------------"
363 @echo "--------------------------------------------------------------"
364 @${SUP} ${SUPFLAGS} ${SUPFILE}
365 .if defined(SUPFILE1)
366 @${SUP} ${SUPFLAGS} ${SUPFILE1}
368 .if defined(SUPFILE2)
369 @${SUP} ${SUPFLAGS} ${SUPFILE2}
372 .if defined(CVS_UPDATE)
373 @echo "--------------------------------------------------------------"
374 @echo "Updating /usr/src from cvs repository" ${CVSROOT}
375 @echo "--------------------------------------------------------------"
376 cd ${.CURDIR} && cvs -q update -P -d
382 # Build most of the user binaries on the existing system libs and includes.
385 @echo "--------------------------------------------------------------"
386 @echo " Building programs only"
387 @echo "--------------------------------------------------------------"
388 cd ${.CURDIR}/bin && ${MAKE} all
389 cd ${.CURDIR}/sbin && ${MAKE} all
390 cd ${.CURDIR}/libexec && ${MAKE} all
391 cd ${.CURDIR}/usr.bin && ${MAKE} all
392 cd ${.CURDIR}/usr.sbin && ${MAKE} all
393 cd ${.CURDIR}/gnu/libexec && ${MAKE} all
394 cd ${.CURDIR}/gnu/usr.bin && ${MAKE} all
395 cd ${.CURDIR}/gnu/usr.sbin && ${MAKE} all
396 #.if defined(MAKE_KERBEROS4) && !defined(NOCRYPT)
397 # cd ${.CURDIR}/kerberosIV && ${MAKE} most
399 #.if !defined(NOSECURE) && !defined(NOCRYPT)
400 # cd ${.CURDIR}/secure && ${MAKE} most
406 # Install the binaries built by the 'most' target. This does not include
407 # libraries or include files.
410 @echo "--------------------------------------------------------------"
411 @echo " Installing programs only"
412 @echo "--------------------------------------------------------------"
413 cd ${.CURDIR}/bin && ${MAKE} install
414 cd ${.CURDIR}/sbin && ${MAKE} install
415 cd ${.CURDIR}/libexec && ${MAKE} install
416 cd ${.CURDIR}/usr.bin && ${MAKE} install
417 cd ${.CURDIR}/usr.sbin && ${MAKE} install
418 cd ${.CURDIR}/gnu/libexec && ${MAKE} install
419 cd ${.CURDIR}/gnu/usr.bin && ${MAKE} install
420 cd ${.CURDIR}/gnu/usr.sbin && ${MAKE} install
421 #.if defined(MAKE_KERBEROS4) && !defined(NOCRYPT)
422 # cd ${.CURDIR}/kerberosIV && ${MAKE} installmost
424 #.if !defined(NOSECURE) && !defined(NOCRYPT)
425 # cd ${.CURDIR}/secure && ${MAKE} installmost
429 # ------------------------------------------------------------------------
431 # From here onwards are utility targets used by the 'make world' and
432 # related targets. If your 'world' breaks, you may like to try to fix
433 # the problem and manually run the following targets to attempt to
434 # complete the build. Beware, this is *not* guaranteed to work, you
435 # need to have a pretty good grip on the current state of the system
436 # to attempt to manually finish it. If in doubt, 'make world' again.
440 # heirarchy - ensure that all the needed directories are present
443 cd ${.CURDIR}/etc && ${MAKE} distrib-dirs
446 # bootstrap - [re]build tools needed to run the actual build, this includes
447 # tools needed by 'make depend', as some tools are needed to generate source
448 # for the dependency information to be gathered from.
452 rm -f ${DESTDIR}/usr/src/sys
453 ln -s ${.CURDIR}/sys ${DESTDIR}/usr/src
454 cd ${.CURDIR}/include && find -dx . | cpio -dump ${DESTDIR}/usr/include
455 cd ${.CURDIR}/include && ${MAKE} symlinks
457 cd ${.CURDIR}/usr.bin/make && ${MAKE} ${MK_FLAGS} depend && \
458 ${MAKE} ${MK_FLAGS} all && \
459 ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
460 cd ${.CURDIR}/usr.bin/xinstall && ${MAKE} ${MK_FLAGS} depend && \
461 ${MAKE} ${MK_FLAGS} all && \
462 ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
463 cd ${.CURDIR}/usr.bin/lex && ${MAKE} bootstrap && \
464 ${MAKE} ${MK_FLAGS} depend && \
465 ${MAKE} ${MK_FLAGS} -DNOLIB all && \
466 ${MAKE} ${MK_FLAGS} -DNOLIB -B install ${CLEANDIR}
467 .if !defined(NOOBJDIR)
468 cd ${.CURDIR}/usr.bin/lex && ${MAKE} ${OBJDIR}
472 # include-tools - generally the same as 'bootstrap', except that it's for
473 # things that are specifically needed to generate include files.
475 # XXX should be merged with bootstrap, it's not worth keeeping them separate.
476 # Well, maybe it is now. We force 'cleandepend' here to avoid dependencies
477 # on cleaned away headers in ${WORLDTMP}.
480 .for d in usr.bin/compile_et usr.bin/rpcgen
481 cd ${.CURDIR}/$d && ${MAKE} cleandepend && \
482 ${MAKE} ${MK_FLAGS} depend && \
483 ${MAKE} ${MK_FLAGS} all && \
484 ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
488 # includes - possibly generate and install the include files.
492 rm -rf ${DESTDIR}/usr/include/*
493 mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \
494 -p ${DESTDIR}/usr/include
496 cd ${.CURDIR}/include && ${MAKE} -B all install
497 cd ${.CURDIR}/gnu/include && ${MAKE} install
498 cd ${.CURDIR}/gnu/lib/libmp && ${MAKE} beforeinstall
499 cd ${.CURDIR}/gnu/lib/libobjc && ${MAKE} beforeinstall
500 cd ${.CURDIR}/gnu/lib/libreadline && ${MAKE} beforeinstall
501 cd ${.CURDIR}/gnu/lib/libregex && ${MAKE} beforeinstall
502 cd ${.CURDIR}/gnu/lib/libstdc++ && ${MAKE} beforeinstall
503 cd ${.CURDIR}/gnu/lib/libg++ && ${MAKE} beforeinstall
504 cd ${.CURDIR}/gnu/lib/libdialog && ${MAKE} beforeinstall
505 cd ${.CURDIR}/gnu/lib/libgmp && ${MAKE} beforeinstall
506 .if exists(secure) && !defined(NOCRYPT)
507 cd ${.CURDIR}/secure/lib/libdes && ${MAKE} beforeinstall
509 .if exists(kerberosIV) && !defined(NOCRYPT) && defined(MAKE_KERBEROS4)
510 cd ${.CURDIR}/kerberosIV/lib/libacl && ${MAKE} beforeinstall
511 cd ${.CURDIR}/kerberosIV/lib/libkadm && ${MAKE} beforeinstall
512 cd ${.CURDIR}/kerberosIV/lib/libkafs && ${MAKE} beforeinstall
513 cd ${.CURDIR}/kerberosIV/lib/libkdb && ${MAKE} beforeinstall
514 cd ${.CURDIR}/kerberosIV/lib/libkrb && ${MAKE} beforeinstall
515 cd ${.CURDIR}/kerberosIV/lib/libtelnet && ${MAKE} beforeinstall
517 cd ${.CURDIR}/lib/libtelnet && ${MAKE} beforeinstall
519 .if exists(${.CURDIR}/lib/csu/${MACHINE})
520 cd ${.CURDIR}/lib/csu/${MACHINE} && ${MAKE} beforeinstall
522 cd ${.CURDIR}/lib/libalias && ${MAKE} beforeinstall
523 cd ${.CURDIR}/lib/libc && ${MAKE} beforeinstall
524 cd ${.CURDIR}/lib/libcurses && ${MAKE} beforeinstall
525 cd ${.CURDIR}/lib/libdisk && ${MAKE} beforeinstall
526 cd ${.CURDIR}/lib/libedit && ${MAKE} beforeinstall
527 cd ${.CURDIR}/lib/libftpio && ${MAKE} beforeinstall
528 cd ${.CURDIR}/lib/libmd && ${MAKE} beforeinstall
529 cd ${.CURDIR}/lib/libmytinfo && ${MAKE} beforeinstall
530 cd ${.CURDIR}/lib/libncurses && ${MAKE} beforeinstall
531 .if !defined(WANT_CSRG_LIBM)
532 cd ${.CURDIR}/lib/msun && ${MAKE} beforeinstall
534 cd ${.CURDIR}/lib/libopie && ${MAKE} beforeinstall
535 cd ${.CURDIR}/lib/libpcap && ${MAKE} beforeinstall
536 cd ${.CURDIR}/lib/librpcsvc && ${MAKE} beforeinstall
537 cd ${.CURDIR}/lib/libskey && ${MAKE} beforeinstall
538 .if !defined(NOTCL) && exists (${.CURDIR}/contrib/tcl) && \
539 exists(${.CURDIR}/usr.bin/tclsh) && exists (${.CURDIR}/lib/libtcl)
540 cd ${.CURDIR}/lib/libtcl && ${MAKE} installhdrs
542 cd ${.CURDIR}/lib/libtermcap && ${MAKE} beforeinstall
543 cd ${.CURDIR}/lib/libcom_err && ${MAKE} beforeinstall
544 cd ${.CURDIR}/lib/libss && ${MAKE} -B hdrs beforeinstall
545 cd ${.CURDIR}/lib/libscsi && ${MAKE} beforeinstall
546 cd ${.CURDIR}/lib/libutil && ${MAKE} beforeinstall
547 cd ${.CURDIR}/lib/libvgl && ${MAKE} beforeinstall
548 cd ${.CURDIR}/lib/libz && ${MAKE} beforeinstall
549 cd ${.CURDIR}/usr.bin/f2c && ${MAKE} beforeinstall
550 cd ${.CURDIR}/usr.bin/lex && ${MAKE} beforeinstall
553 # lib-tools - build tools to compile and install the libraries.
555 # XXX gperf is required for cc
556 # XXX a new ld and tsort is required for cc
571 cd ${.CURDIR}/$d && ${MAKE} ${MK_FLAGS} depend && \
572 ${MAKE} ${MK_FLAGS} all && \
573 ${MAKE} ${MK_FLAGS} -B install && \
574 ${MAKE} ${MK_FLAGS:S/-DNOPIC//} -B ${CLEANDIR} ${OBJDIR}
578 # libraries - build and install the libraries
581 # We have to know too much about botches in the lib tree:
582 .if exists(csu/${MACHINE}.pcc)
583 _csu=csu/${MACHINE}.pcc
588 .if defined(WANT_CSRG_LIBM)
596 # Build csu early so that some tools get linked to the new version (too
597 # late for the main tools, however).
599 # To satisfy shared library or ELF linkage when only the libraries being
602 # libcom_err must be built before libss.
603 # libcrypt and libmd must be built before libskey.
604 # libm must be built before libtcl.
605 # libmytinfo must be built before libdialog and libncurses.
606 # libncurses must be built before libdialog.
607 # libtermcap must be built before libcurses, libedit and libreadline.
609 .for _lib in ${_csu} libcom_err libcrypt ${_libm} libmytinfo \
610 libncurses libtermcap
611 .if exists(${.CURDIR}/lib/${_lib})
612 cd ${.CURDIR}/lib/${_lib} && \
613 ${MAKE} ${MK_FLAGS:S/-DNOPIC//} depend && \
614 ${MAKE} ${MK_FLAGS:S/-DNOPIC//} all && \
615 ${MAKE} ${MK_FLAGS:S/-DNOPIC//} -B install
618 .for _lib in gnu/lib lib usr.bin/lex/lib usr.sbin/pcvt/keycap
619 .if exists(${.CURDIR}/${_lib})
620 cd ${.CURDIR}/${_lib} && \
621 ${MAKE} ${MK_FLAGS} depend && \
622 ${MAKE} ${MK_FLAGS} all && \
623 ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
626 .if exists(${.CURDIR}/secure/lib) && !defined(NOCRYPT) && !defined(NOSECURE)
627 cd ${.CURDIR}/secure/lib && ${MAKE} ${MK_FLAGS} depend && \
628 ${MAKE} ${MK_FLAGS} all && \
629 ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
631 .if exists(${.CURDIR}/kerberosIV/lib) && !defined(NOCRYPT) && \
632 defined(MAKE_KERBEROS4)
633 cd ${.CURDIR}/kerberosIV/lib && ${MAKE} ${MK_FLAGS} depend && \
634 ${MAKE} ${MK_FLAGS} all && \
635 ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
639 # build-tools - build and install any other tools needed to complete the
640 # compile and install.
642 # bc and cpp are required to build groff. Otherwise, the order here is
643 # mostly historical, i.e., bogus.
644 # chmod is used to build gcc's tmpmultilib[2] at obscure times.
646 # XXX uname is a bug - the target should not depend on the host.
670 gnu/usr.bin/man/makewhatis \
672 gnu/usr.bin/texinfo \
705 cd ${.CURDIR}/$d && ${MAKE} ${MK_FLAGS} depend && \
706 ${MAKE} ${MK_FLAGS} all && \
707 ${MAKE} ${MK_FLAGS} -B install ${CLEANDIR} ${OBJDIR}
710 .for __target in clean cleandir obj depend
711 .for entry in ${SUBDIR}
712 ${entry}.${__target}__D: .PHONY
713 if test -d ${.CURDIR}/${entry}.${MACHINE}; then \
714 ${ECHODIR} "===> ${DIRPRFX}${entry}.${MACHINE}"; \
715 edir=${entry}.${MACHINE}; \
716 cd ${.CURDIR}/$${edir}; \
718 ${ECHODIR} "===> ${DIRPRFX}${entry}"; \
720 cd ${.CURDIR}/$${edir}; \
722 ${MAKE} ${__target} DIRPRFX=${DIRPRFX}$${edir}/
724 par-${__target}: ${SUBDIR:S/$/.${__target}__D/}
729 .include <bsd.subdir.mk>