Makefile revision 29938
1# 2# $Id: Makefile,v 1.147 1997/09/28 09:26:05 markm Exp $ 3# 4# Make command line options: 5# -DCLOBBER will remove /usr/include 6# -DMAKE_KERBEROS4 to build KerberosIV 7# -DALLLANG to build documentation for all languages 8# (where available -- see share/doc/Makefile) 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# -DNOGAMES do not go into games subdir 18# -DNOSHARE do not go into share subdir 19# -DNOINFO do not make or install info files 20# -DNOLIBC_R do not build libc_r. 21# LOCAL_DIRS="list of dirs" to add additional dirs to the SUBDIR list 22 23# 24# The intended user-driven targets are: 25# buildworld - rebuild *everything*, including glue to help do upgrades 26# installworld- install everything built by "buildworld" 27# world - buildworld + installworld 28# update - convenient way to update your source tree (eg: sup/cvs) 29# most - build user commands, no libraries or include files 30# installmost - install user commands, no libraries or include files 31# 32# Standard targets (not defined here) are documented in the makefiles in 33# /usr/share/mk. These include: 34# obj depend all install clean cleandepend cleanobj 35 36.if (!make(world)) && (!make(buildworld)) && (!make(installworld)) 37.MAKEFLAGS:= ${.MAKEFLAGS} -m ${.CURDIR}/share/mk 38.endif 39 40# Put initial settings here. 41SUBDIR= 42 43# We must do share/info early so that installation of info `dir' 44# entries works correctly. Do it first since it is less likely to 45# grow dependencies on include and lib than vice versa. 46.if exists(share/info) 47SUBDIR+= share/info 48.endif 49 50# We must do include and lib early so that the perl *.ph generation 51# works correctly as it uses the header files installed by this. 52.if exists(include) 53SUBDIR+= include 54.endif 55.if exists(lib) 56SUBDIR+= lib 57.endif 58 59.if exists(bin) 60SUBDIR+= bin 61.endif 62.if exists(games) && !defined(NOGAMES) 63SUBDIR+= games 64.endif 65.if exists(gnu) 66SUBDIR+= gnu 67.endif 68.if exists(kerberosIV) && !defined(NOCRYPT) && defined(MAKE_KERBEROS4) 69SUBDIR+= kerberosIV 70.endif 71.if exists(libexec) 72SUBDIR+= libexec 73.endif 74.if exists(sbin) 75SUBDIR+= sbin 76.endif 77.if exists(share) && !defined(NOSHARE) 78SUBDIR+= share 79.endif 80.if exists(sys) 81SUBDIR+= sys 82.endif 83.if exists(usr.bin) 84SUBDIR+= usr.bin 85.endif 86.if exists(usr.sbin) 87SUBDIR+= usr.sbin 88.endif 89.if exists(secure) && !defined(NOCRYPT) && !defined(NOSECURE) 90SUBDIR+= secure 91.endif 92.if exists(lkm) && !defined(NOLKM) 93SUBDIR+= lkm 94.endif 95 96# etc must be last for "distribute" to work 97.if exists(etc) && make(distribute) 98SUBDIR+= etc 99.endif 100 101# These are last, since it is nice to at least get the base system 102# rebuilt before you do them. 103.if defined(LOCAL_DIRS) 104.for _DIR in ${LOCAL_DIRS} 105.if exists(${_DIR}) & exists(${_DIR}/Makefile) 106SUBDIR+= ${_DIR} 107.endif 108.endfor 109.endif 110 111# Handle -DNOOBJDIR, -DNOCLEAN and -DNOCLEANDIR 112.if defined(NOOBJDIR) 113OBJDIR= 114.else 115OBJDIR= obj 116.endif 117 118.if defined(NOCLEAN) 119CLEANDIR= 120.else 121.if defined(NOCLEANDIR) 122CLEANDIR= clean 123.else 124CLEANDIR= cleandir 125.endif 126.endif 127 128SUP?= sup 129SUPFLAGS?= -v 130 131# 132# While building tools for bootstrapping, we dont need to waste time on 133# profiled libraries or man pages. This speeds things up somewhat. 134# 135MK_FLAGS= -DNOINFO -DNOMAN -DNOPROFILE 136 137# 138# world 139# 140# Attempt to rebuild and reinstall *everything*, with reasonable chance of 141# success, regardless of how old your existing system is. 142# 143# >> Beware, it overwrites the local build environment! << 144# 145world: 146 @echo "--------------------------------------------------------------" 147 @echo "make world started on `LC_TIME=C date`" 148 @echo "--------------------------------------------------------------" 149.if target(pre-world) 150 @echo 151 @echo "--------------------------------------------------------------" 152 @echo " Making 'pre-world' target" 153 @echo "--------------------------------------------------------------" 154 cd ${.CURDIR} && ${MAKE} pre-world 155.endif 156 cd ${.CURDIR} && ${MAKE} buildworld 157 cd ${.CURDIR} && ${MAKE} installworld 158.if target(post-world) 159 @echo 160 @echo "--------------------------------------------------------------" 161 @echo " Making 'post-world' target" 162 @echo "--------------------------------------------------------------" 163 cd ${.CURDIR} && ${MAKE} post-world 164.endif 165 @echo 166 @echo "--------------------------------------------------------------" 167 @echo "make world completed on `LC_TIME=C date`" 168 @echo "--------------------------------------------------------------" 169 170.if defined(MAKEOBJDIRPREFIX) 171WORLDTMP= ${MAKEOBJDIRPREFIX}${.CURDIR}/tmp 172.else 173WORLDTMP= /usr/obj${.CURDIR}/tmp 174.endif 175STRICTTMPPATH= ${WORLDTMP}/sbin:${WORLDTMP}/usr/sbin:${WORLDTMP}/bin:${WORLDTMP}/usr/bin 176TMPPATH= ${STRICTTMPPATH}:${PATH} 177 178# XXX COMPILER_PATH is needed for finding cc1, ld and as 179# XXX GCC_EXEC_PREFIX is for *crt.o. It is probably unnecssary now 180# tbat LIBRARY_PATH is set. We still can't use -nostdlib, since gcc 181# wouldn't link *crt.o or libgcc if it were used. 182# XXX LD_LIBRARY_PATH is for ld.so. It is also used by ld, although we don't 183# want that - all compile-time library paths should be resolved by gcc. 184# It fails for set[ug]id executables (are any used?). 185COMPILER_ENV= BISON_SIMPLE=${WORLDTMP}/usr/share/misc/bison.simple \ 186 COMPILER_PATH=${WORLDTMP}/usr/libexec:${WORLDTMP}/usr/bin \ 187 GCC_EXEC_PREFIX=${WORLDTMP}/usr/lib/ \ 188 LD_LIBRARY_PATH=${WORLDTMP}${SHLIBDIR} \ 189 LIBRARY_PATH=${WORLDTMP}${SHLIBDIR}:${WORLDTMP}/usr/lib 190 191BMAKEENV= PATH=${TMPPATH} ${COMPILER_ENV} NOEXTRADEPEND=t 192XMAKEENV= PATH=${STRICTTMPPATH} ${COMPILER_ENV} \ 193 CC='cc -nostdinc' # XXX -nostdlib 194 195# used to compile and install 'make' in temporary build tree 196IBMAKE= ${BMAKEENV} ${MAKE} DESTDIR=${WORLDTMP} 197# bootstrap make 198BMAKE= ${BMAKEENV} ${WORLDTMP}/usr/bin/${MAKE} DESTDIR=${WORLDTMP} 199# cross make used for compilation 200XMAKE= ${XMAKEENV} ${WORLDTMP}/usr/bin/${MAKE} DESTDIR=${WORLDTMP} 201# cross make used for final installation 202IXMAKE= ${XMAKEENV} ${WORLDTMP}/usr/bin/${MAKE} 203 204# 205# buildworld 206# 207# Attempt to rebuild the entire system, with reasonable chance of 208# success, regardless of how old your existing system is. 209# 210buildworld: 211.if !defined(NOCLEAN) 212 @echo 213 @echo "--------------------------------------------------------------" 214 @echo " Cleaning up the temporary build tree" 215 @echo "--------------------------------------------------------------" 216 mkdir -p ${WORLDTMP} 217 chflags -R noschg ${WORLDTMP}/ 218 rm -rf ${WORLDTMP} 219.endif 220 @echo 221 @echo "--------------------------------------------------------------" 222 @echo " Making make" 223 @echo "--------------------------------------------------------------" 224 mkdir -p ${WORLDTMP}/usr/bin 225 cd ${.CURDIR}/usr.bin/make && \ 226 ${IBMAKE} -I${.CURDIR}/share/mk \ 227 ${CLEANDIR} ${OBJDIR} depend && \ 228 ${IBMAKE} -I${.CURDIR}/share/mk ${MK_FLAGS} \ 229 all install clean cleandepend 230 @echo 231 @echo "--------------------------------------------------------------" 232 @echo " Making hierarchy" 233 @echo "--------------------------------------------------------------" 234 cd ${.CURDIR} && ${BMAKE} hierarchy 235.if !defined(NOCLEAN) 236 @echo 237 @echo "--------------------------------------------------------------" 238 @echo " Cleaning up the obj tree" 239 @echo "--------------------------------------------------------------" 240 cd ${.CURDIR} && ${BMAKE} ${CLEANDIR} 241.endif 242.if !defined(NOOBJDIR) 243 @echo 244 @echo "--------------------------------------------------------------" 245 @echo " Rebuilding the obj tree" 246 @echo "--------------------------------------------------------------" 247 cd ${.CURDIR} && ${BMAKE} obj 248.endif 249 @echo 250 @echo "--------------------------------------------------------------" 251 @echo " Rebuilding bootstrap tools" 252 @echo "--------------------------------------------------------------" 253 cd ${.CURDIR} && ${BMAKE} bootstrap 254 @echo 255 @echo "--------------------------------------------------------------" 256 @echo " Rebuilding tools necessary to build the include files" 257 @echo "--------------------------------------------------------------" 258 cd ${.CURDIR} && ${BMAKE} include-tools 259 @echo 260 @echo "--------------------------------------------------------------" 261 @echo " Rebuilding /usr/include" 262 @echo "--------------------------------------------------------------" 263 cd ${.CURDIR} && SHARED=symlinks ${BMAKE} includes 264 @echo 265 @echo "--------------------------------------------------------------" 266 @echo " Rebuilding tools needed to build the libraries" 267 @echo "--------------------------------------------------------------" 268 cd ${.CURDIR} && ${BMAKE} lib-tools 269 @echo 270 @echo "--------------------------------------------------------------" 271 @echo " Rebuilding /usr/lib" 272 @echo "--------------------------------------------------------------" 273 cd ${.CURDIR} && ${BMAKE} libraries 274 @echo 275 @echo "--------------------------------------------------------------" 276 @echo " Rebuilding all other tools needed to build the world" 277 @echo "--------------------------------------------------------------" 278 cd ${.CURDIR} && ${BMAKE} build-tools 279 @echo 280 @echo "--------------------------------------------------------------" 281 @echo " Rebuilding dependencies" 282 @echo "--------------------------------------------------------------" 283 cd ${.CURDIR} && ${XMAKE} depend 284 @echo 285 @echo "--------------------------------------------------------------" 286 @echo " Building everything.." 287 @echo "--------------------------------------------------------------" 288 cd ${.CURDIR} && ${XMAKE} all 289 290# 291# installworld 292# 293# Installs everything compiled by a 'buildworld'. 294# 295installworld: 296 cd ${.CURDIR} && ${IXMAKE} reinstall 297 298# 299# reinstall 300# 301# If you have a build server, you can NFS mount the source and obj directories 302# and do a 'make reinstall' on the *client* to install new binaries from the 303# most recent server build. 304# 305reinstall: 306 @echo "--------------------------------------------------------------" 307 @echo " Making hierarchy" 308 @echo "--------------------------------------------------------------" 309 cd ${.CURDIR} && ${MAKE} hierarchy 310 @echo 311 @echo "--------------------------------------------------------------" 312 @echo " Installing everything.." 313 @echo "--------------------------------------------------------------" 314 cd ${.CURDIR} && ${MAKE} install 315 @echo 316 @echo "--------------------------------------------------------------" 317 @echo " Rebuilding man page indexes" 318 @echo "--------------------------------------------------------------" 319 cd ${.CURDIR}/share/man && ${MAKE} makedb 320 321# 322# update 323# 324# Update the source tree, by running sup and/or running cvs to update to the 325# latest copy. 326# 327update: 328.if defined(SUP_UPDATE) 329 @echo "--------------------------------------------------------------" 330 @echo "Running sup" 331 @echo "--------------------------------------------------------------" 332 @${SUP} ${SUPFLAGS} ${SUPFILE} 333.if defined(SUPFILE1) 334 @${SUP} ${SUPFLAGS} ${SUPFILE1} 335.endif 336.if defined(SUPFILE2) 337 @${SUP} ${SUPFLAGS} ${SUPFILE2} 338.endif 339.endif 340.if defined(CVS_UPDATE) 341 @echo "--------------------------------------------------------------" 342 @echo "Updating /usr/src from cvs repository" ${CVSROOT} 343 @echo "--------------------------------------------------------------" 344 cd ${.CURDIR} && cvs -q update -P -d 345.endif 346 347# 348# most 349# 350# Build most of the user binaries on the existing system libs and includes. 351# 352most: 353 @echo "--------------------------------------------------------------" 354 @echo " Building programs only" 355 @echo "--------------------------------------------------------------" 356 cd ${.CURDIR}/bin && ${MAKE} all 357 cd ${.CURDIR}/sbin && ${MAKE} all 358 cd ${.CURDIR}/libexec && ${MAKE} all 359 cd ${.CURDIR}/usr.bin && ${MAKE} all 360 cd ${.CURDIR}/usr.sbin && ${MAKE} all 361 cd ${.CURDIR}/gnu/libexec && ${MAKE} all 362 cd ${.CURDIR}/gnu/usr.bin && ${MAKE} all 363 cd ${.CURDIR}/gnu/usr.sbin && ${MAKE} all 364#.if defined(MAKE_KERBEROS4) && !defined(NOCRYPT) 365# cd ${.CURDIR}/kerberosIV && ${MAKE} most 366#.endif 367#.if !defined(NOSECURE) && !defined(NOCRYPT) 368# cd ${.CURDIR}/secure && ${MAKE} most 369#.endif 370 371# 372# installmost 373# 374# Install the binaries built by the 'most' target. This does not include 375# libraries or include files. 376# 377installmost: 378 @echo "--------------------------------------------------------------" 379 @echo " Installing programs only" 380 @echo "--------------------------------------------------------------" 381 cd ${.CURDIR}/bin && ${MAKE} install 382 cd ${.CURDIR}/sbin && ${MAKE} install 383 cd ${.CURDIR}/libexec && ${MAKE} install 384 cd ${.CURDIR}/usr.bin && ${MAKE} install 385 cd ${.CURDIR}/usr.sbin && ${MAKE} install 386 cd ${.CURDIR}/gnu/libexec && ${MAKE} install 387 cd ${.CURDIR}/gnu/usr.bin && ${MAKE} install 388 cd ${.CURDIR}/gnu/usr.sbin && ${MAKE} install 389#.if defined(MAKE_KERBEROS4) && !defined(NOCRYPT) 390# cd ${.CURDIR}/kerberosIV && ${MAKE} installmost 391#.endif 392#.if !defined(NOSECURE) && !defined(NOCRYPT) 393# cd ${.CURDIR}/secure && ${MAKE} installmost 394#.endif 395 396# 397# ------------------------------------------------------------------------ 398# 399# From here onwards are utility targets used by the 'make world' and 400# related targets. If your 'world' breaks, you may like to try to fix 401# the problem and manually run the following targets to attempt to 402# complete the build. Beware, this is *not* guaranteed to work, you 403# need to have a pretty good grip on the current state of the system 404# to attempt to manually finish it. If in doubt, 'make world' again. 405# 406 407# 408# heirarchy - ensure that all the needed directories are present 409# 410hierarchy: 411 cd ${.CURDIR}/etc && ${MAKE} distrib-dirs 412 413# 414# bootstrap - [re]build tools needed to run the actual build, this includes 415# tools needed by 'make depend', as some tools are needed to generate source 416# for the dependency information to be gathered from. 417# 418bootstrap: 419.if defined(DESTDIR) 420 rm -f ${DESTDIR}/usr/src/sys 421 ln -s ${.CURDIR}/sys ${DESTDIR}/usr/src 422 cd ${.CURDIR}/include && find -dx . | cpio -dump ${DESTDIR}/usr/include 423 cd ${.CURDIR}/include && make symlinks 424.endif 425 cd ${.CURDIR}/usr.bin/make && ${MAKE} depend && \ 426 ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 427 cd ${.CURDIR}/usr.bin/xinstall && ${MAKE} depend && \ 428 ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 429 cd ${.CURDIR}/usr.bin/lex && ${MAKE} bootstrap && ${MAKE} depend && \ 430 ${MAKE} ${MK_FLAGS} -DNOLIB all install ${CLEANDIR} 431.if !defined(NOOBJDIR) 432 cd ${.CURDIR}/usr.bin/lex && ${MAKE} obj 433.endif 434 435# 436# include-tools - generally the same as 'bootstrap', except that it's for 437# things that are specifically needed to generate include files. 438# 439# XXX should be merged with bootstrap, it's not worth keeeping them separate. 440# Well, maybe it is now. We force 'cleandepend' here to avoid dependencies 441# on cleaned away headers in ${WORLDTMP}. 442# 443include-tools: 444 cd ${.CURDIR}/usr.bin/rpcgen && ${MAKE} cleandepend depend && \ 445 ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 446 447# 448# includes - possibly generate and install the include files. 449# 450includes: 451.if defined(CLOBBER) 452 rm -rf ${DESTDIR}/usr/include/* 453 mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ 454 -p ${DESTDIR}/usr/include 455.endif 456 cd ${.CURDIR}/include && ${MAKE} all install 457 cd ${.CURDIR}/gnu/include && ${MAKE} install 458 cd ${.CURDIR}/gnu/lib/libmp && ${MAKE} beforeinstall 459 cd ${.CURDIR}/gnu/lib/libobjc && ${MAKE} beforeinstall 460 cd ${.CURDIR}/gnu/lib/libreadline && ${MAKE} beforeinstall 461 cd ${.CURDIR}/gnu/lib/libregex && ${MAKE} beforeinstall 462 cd ${.CURDIR}/gnu/lib/libstdc++ && ${MAKE} beforeinstall 463 cd ${.CURDIR}/gnu/lib/libg++ && ${MAKE} beforeinstall 464 cd ${.CURDIR}/gnu/lib/libdialog && ${MAKE} beforeinstall 465 cd ${.CURDIR}/gnu/lib/libgmp && ${MAKE} beforeinstall 466.if exists(secure) && !defined(NOCRYPT) 467 cd ${.CURDIR}/secure/lib/libdes && ${MAKE} beforeinstall 468.endif 469.if exists(kerberosIV) && !defined(NOCRYPT) && defined(MAKE_KERBEROS4) 470 cd ${.CURDIR}/kerberosIV/lib/libacl && ${MAKE} beforeinstall 471 cd ${.CURDIR}/kerberosIV/lib/libkadm && ${MAKE} beforeinstall 472 cd ${.CURDIR}/kerberosIV/lib/libkafs && ${MAKE} beforeinstall 473 cd ${.CURDIR}/kerberosIV/lib/libkdb && ${MAKE} beforeinstall 474 cd ${.CURDIR}/kerberosIV/lib/libkrb && ${MAKE} beforeinstall 475 cd ${.CURDIR}/kerberosIV/lib/libtelnet && ${MAKE} beforeinstall 476.else 477 cd ${.CURDIR}/lib/libtelnet && ${MAKE} beforeinstall 478.endif 479 cd ${.CURDIR}/lib/csu/i386 && ${MAKE} beforeinstall 480 cd ${.CURDIR}/lib/libalias && ${MAKE} beforeinstall 481 cd ${.CURDIR}/lib/libc && ${MAKE} beforeinstall 482 cd ${.CURDIR}/lib/libcurses && ${MAKE} beforeinstall 483 cd ${.CURDIR}/lib/libdisk && ${MAKE} beforeinstall 484 cd ${.CURDIR}/lib/libedit && ${MAKE} beforeinstall 485 cd ${.CURDIR}/lib/libftpio && ${MAKE} beforeinstall 486 cd ${.CURDIR}/lib/libmd && ${MAKE} beforeinstall 487 cd ${.CURDIR}/lib/libmytinfo && ${MAKE} beforeinstall 488 cd ${.CURDIR}/lib/libncurses && ${MAKE} beforeinstall 489.if !defined(WANT_CSRG_LIBM) 490 cd ${.CURDIR}/lib/msun && ${MAKE} beforeinstall 491.endif 492 cd ${.CURDIR}/lib/libopie && ${MAKE} beforeinstall 493 cd ${.CURDIR}/lib/libpcap && ${MAKE} beforeinstall 494 cd ${.CURDIR}/lib/librpcsvc && ${MAKE} beforeinstall 495 cd ${.CURDIR}/lib/libskey && ${MAKE} beforeinstall 496.if !defined(NOTCL) && exists (${.CURDIR}/contrib/tcl) && \ 497 exists(${.CURDIR}/usr.bin/tclsh) && exists (${.CURDIR}/lib/libtcl) 498 cd ${.CURDIR}/lib/libtcl && ${MAKE} installhdrs 499.endif 500 cd ${.CURDIR}/lib/libtermcap && ${MAKE} beforeinstall 501 cd ${.CURDIR}/lib/libcom_err && ${MAKE} beforeinstall 502 cd ${.CURDIR}/lib/libss && ${MAKE} beforeinstall 503 cd ${.CURDIR}/lib/libscsi && ${MAKE} beforeinstall 504 cd ${.CURDIR}/lib/libutil && ${MAKE} beforeinstall 505 cd ${.CURDIR}/lib/libvgl && ${MAKE} beforeinstall 506 cd ${.CURDIR}/lib/libz && ${MAKE} beforeinstall 507 cd ${.CURDIR}/usr.bin/f2c && ${MAKE} beforeinstall 508 cd ${.CURDIR}/usr.bin/lex && ${MAKE} beforeinstall 509 510# 511# lib-tools - build tools to compile and install the libraries. 512# 513# XXX gperf is required for cc 514# XXX a new ld and tsort is required for cc 515lib-tools: 516.for d in \ 517 gnu/usr.bin/gperf \ 518 gnu/usr.bin/ld \ 519 usr.bin/tsort \ 520 gnu/usr.bin/as \ 521 gnu/usr.bin/bison \ 522 gnu/usr.bin/cc \ 523 usr.bin/ar \ 524 usr.bin/compile_et \ 525 usr.bin/lex/lib \ 526 usr.bin/mk_cmds \ 527 usr.bin/nm \ 528 usr.bin/ranlib \ 529 usr.bin/uudecode 530 cd ${.CURDIR}/$d && ${MAKE} depend && \ 531 ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 532.endfor 533 534# 535# libraries - build and install the libraries 536# 537libraries: 538.if exists(lib/csu/i386) 539 cd ${.CURDIR}/lib/csu/i386 && ${MAKE} depend && \ 540 ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 541.endif 542.if exists(lib/libcompat) 543 cd ${.CURDIR}/lib/libcompat && ${MAKE} depend && \ 544 ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 545.endif 546.if exists(lib/libncurses) 547 cd ${.CURDIR}/lib/libncurses && ${MAKE} depend && \ 548 ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 549.endif 550.if exists(lib/libtermcap) 551 cd ${.CURDIR}/lib/libtermcap && ${MAKE} depend && \ 552 ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 553.endif 554.if exists(gnu) 555 cd ${.CURDIR}/gnu/lib && ${MAKE} depend && \ 556 ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 557.endif 558.if exists(secure) && !defined(NOCRYPT) && !defined(NOSECURE) 559 cd ${.CURDIR}/secure/lib && ${MAKE} depend && \ 560 ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 561.endif 562.if exists(lib) 563 cd ${.CURDIR}/lib && ${MAKE} depend && \ 564 ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 565.endif 566.if exists(usr.bin/lex/lib) 567 cd ${.CURDIR}/usr.bin/lex/lib && ${MAKE} depend && \ 568 ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 569.endif 570.if !defined(NOCRYPT) && defined(MAKE_KERBEROS4) 571 cd ${.CURDIR}/kerberosIV/lib && ${MAKE} depend && \ 572 ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 573.endif 574.if exists(usr.sbin/pcvt/keycap) 575 cd ${.CURDIR}/usr.sbin/pcvt/keycap && ${MAKE} depend && \ 576 ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 577.endif 578 579# 580# build-tools - build and install any other tools needed to complete the 581# compile and install. 582# ifdef stale 583# bc and cpp are required to build groff. Otherwise, the order here is 584# mostly historical, i.e., bogus. 585# chmod is used to build gcc's tmpmultilib[2] at obscure times. 586# endif stale 587# XXX uname is a bug - the target should not depend on the host. 588# 589build-tools: 590.for d in \ 591 bin/cat \ 592 bin/chmod \ 593 bin/cp \ 594 bin/date \ 595 bin/dd \ 596 bin/echo \ 597 bin/expr \ 598 bin/hostname \ 599 bin/ln \ 600 bin/ls \ 601 bin/mkdir \ 602 bin/mv \ 603 bin/rm \ 604 bin/sh \ 605 bin/test \ 606 gnu/usr.bin/awk \ 607 gnu/usr.bin/bc \ 608 gnu/usr.bin/grep \ 609 gnu/usr.bin/groff \ 610 gnu/usr.bin/gzip \ 611 gnu/usr.bin/man/makewhatis \ 612 gnu/usr.bin/sort \ 613 gnu/usr.bin/texinfo \ 614 share/info \ 615 usr.bin/basename \ 616 usr.bin/cap_mkdb \ 617 usr.bin/chflags \ 618 usr.bin/cmp \ 619 usr.bin/col \ 620 usr.bin/cpp \ 621 usr.bin/expand \ 622 usr.bin/file2c \ 623 usr.bin/find \ 624 usr.bin/gencat \ 625 usr.bin/lorder \ 626 usr.bin/m4 \ 627 usr.bin/mkdep \ 628 usr.bin/paste \ 629 usr.bin/sed \ 630 usr.bin/size \ 631 usr.bin/soelim \ 632 usr.bin/strip \ 633 usr.bin/symorder \ 634 usr.bin/touch \ 635 usr.bin/tr \ 636 usr.bin/true \ 637 usr.bin/uname \ 638 usr.bin/uuencode \ 639 usr.bin/vgrind \ 640 usr.bin/vi \ 641 usr.bin/wc \ 642 usr.bin/yacc \ 643 usr.sbin/chown \ 644 usr.sbin/mtree \ 645 usr.sbin/zic 646 cd ${.CURDIR}/$d && ${MAKE} depend && \ 647 ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 648.endfor 649 650.include <bsd.subdir.mk> 651