Makefile revision 29930
12061Sjkh# 229930Smarkm# $Id$ 32061Sjkh# 42061Sjkh# Make command line options: 515603Smarkm# -DCLOBBER will remove /usr/include 629930Smarkm# -DMAKE_KERBEROS4 to build KerberosIV 720710Sasami# -DALLLANG to build documentation for all languages 820710Sasami# (where available -- see share/doc/Makefile) 93197Scsgr# 102061Sjkh# -DNOCLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir 1112483Speter# -DNOCLEAN do not clean at all 122160Scsgr# -DNOCRYPT will prevent building of crypt versions 132834Swollman# -DNOLKM do not build loadable kernel modules 142061Sjkh# -DNOOBJDIR do not run ``${MAKE} obj'' 152061Sjkh# -DNOPROFILE do not build profiled libraries 162160Scsgr# -DNOSECURE do not go into secure subdir 1717308Speter# -DNOGAMES do not go into games subdir 1819320Sadam# -DNOSHARE do not go into share subdir 1927788Sasami# -DNOINFO do not make or install info files 2027788Sasami# -DNOLIBC_R do not build libc_r. 2125980Sasami# LOCAL_DIRS="list of dirs" to add additional dirs to the SUBDIR list 221594Srgrimes 2317308Speter# 2417308Speter# The intended user-driven targets are: 2527910Sasami# buildworld - rebuild *everything*, including glue to help do upgrades 2627910Sasami# installworld- install everything built by "buildworld" 2727910Sasami# world - buildworld + installworld 2817308Speter# update - convenient way to update your source tree (eg: sup/cvs) 2917308Speter# most - build user commands, no libraries or include files 3017308Speter# installmost - install user commands, no libraries or include files 3119175Sbde# 3219175Sbde# Standard targets (not defined here) are documented in the makefiles in 3319175Sbde# /usr/share/mk. These include: 3419175Sbde# obj depend all install clean cleandepend cleanobj 3517308Speter 3627910Sasami.if (!make(world)) && (!make(buildworld)) && (!make(installworld)) 3725647Sbde.MAKEFLAGS:= ${.MAKEFLAGS} -m ${.CURDIR}/share/mk 3827910Sasami.endif 3917308Speter 402061Sjkh# Put initial settings here. 412061SjkhSUBDIR= 421594Srgrimes 4328531Sbde# We must do share/info early so that installation of info `dir' 4428531Sbde# entries works correctly. Do it first since it is less likely to 4528531Sbde# grow dependencies on include and lib than vice versa. 4628531Sbde.if exists(share/info) 4728531SbdeSUBDIR+= share/info 4828531Sbde.endif 4928531Sbde 5028531Sbde# We must do include and lib early so that the perl *.ph generation 517407Srgrimes# works correctly as it uses the header files installed by this. 527108Sphk.if exists(include) 537108SphkSUBDIR+= include 547108Sphk.endif 557407Srgrimes.if exists(lib) 567407SrgrimesSUBDIR+= lib 577407Srgrimes.endif 587108Sphk 592061Sjkh.if exists(bin) 602061SjkhSUBDIR+= bin 612061Sjkh.endif 6217308Speter.if exists(games) && !defined(NOGAMES) 632061SjkhSUBDIR+= games 642061Sjkh.endif 652061Sjkh.if exists(gnu) 662061SjkhSUBDIR+= gnu 672061Sjkh.endif 6829930Smarkm.if exists(kerberosIV) && !defined(NOCRYPT) && defined(MAKE_KERBEROS4) 6929930SmarkmSUBDIR+= kerberosIV 702626Scsgr.endif 712061Sjkh.if exists(libexec) 722061SjkhSUBDIR+= libexec 732061Sjkh.endif 742061Sjkh.if exists(sbin) 752061SjkhSUBDIR+= sbin 762061Sjkh.endif 7719320Sadam.if exists(share) && !defined(NOSHARE) 782061SjkhSUBDIR+= share 792061Sjkh.endif 802061Sjkh.if exists(sys) 812061SjkhSUBDIR+= sys 822061Sjkh.endif 832061Sjkh.if exists(usr.bin) 842061SjkhSUBDIR+= usr.bin 852061Sjkh.endif 862061Sjkh.if exists(usr.sbin) 872061SjkhSUBDIR+= usr.sbin 882061Sjkh.endif 892834Swollman.if exists(secure) && !defined(NOCRYPT) && !defined(NOSECURE) 902834SwollmanSUBDIR+= secure 912834Swollman.endif 922834Swollman.if exists(lkm) && !defined(NOLKM) 932834SwollmanSUBDIR+= lkm 942834Swollman.endif 951594Srgrimes 964486Sphk# etc must be last for "distribute" to work 974486Sphk.if exists(etc) && make(distribute) 984486SphkSUBDIR+= etc 994486Sphk.endif 1004486Sphk 1012061Sjkh# These are last, since it is nice to at least get the base system 1022061Sjkh# rebuilt before you do them. 10325979Sjkh.if defined(LOCAL_DIRS) 10425979Sjkh.for _DIR in ${LOCAL_DIRS} 10525979Sjkh.if exists(${_DIR}) & exists(${_DIR}/Makefile) 10625979SjkhSUBDIR+= ${_DIR} 1072061Sjkh.endif 10825979Sjkh.endfor 1092061Sjkh.endif 1102061Sjkh 11117308Speter# Handle -DNOOBJDIR, -DNOCLEAN and -DNOCLEANDIR 1122061Sjkh.if defined(NOOBJDIR) 1132061SjkhOBJDIR= 1142061Sjkh.else 1152061SjkhOBJDIR= obj 1162061Sjkh.endif 11712483Speter 11812483Speter.if defined(NOCLEAN) 11912483SpeterCLEANDIR= 12012483Speter.else 1212061Sjkh.if defined(NOCLEANDIR) 1222061SjkhCLEANDIR= clean 1238854Srgrimes.else 1242061SjkhCLEANDIR= cleandir 1252061Sjkh.endif 12612483Speter.endif 1272061Sjkh 12827910SasamiSUP?= sup 12927910SasamiSUPFLAGS?= -v 13018714Sache 13117308Speter# 13217308Speter# While building tools for bootstrapping, we dont need to waste time on 13317308Speter# profiled libraries or man pages. This speeds things up somewhat. 13417308Speter# 13521536SjmacdMK_FLAGS= -DNOINFO -DNOMAN -DNOPROFILE 13615603Smarkm 13717308Speter# 13817308Speter# world 13917308Speter# 14017308Speter# Attempt to rebuild and reinstall *everything*, with reasonable chance of 14117308Speter# success, regardless of how old your existing system is. 14217308Speter# 14317308Speter# >> Beware, it overwrites the local build environment! << 14417308Speter# 14517308Speterworld: 14618362Sjkh @echo "--------------------------------------------------------------" 14719966Sache @echo "make world started on `LC_TIME=C date`" 14818362Sjkh @echo "--------------------------------------------------------------" 14917308Speter.if target(pre-world) 15027910Sasami @echo 15117308Speter @echo "--------------------------------------------------------------" 15217308Speter @echo " Making 'pre-world' target" 15317308Speter @echo "--------------------------------------------------------------" 15428803Speter cd ${.CURDIR} && ${MAKE} pre-world 15527910Sasami.endif 15628803Speter cd ${.CURDIR} && ${MAKE} buildworld 15728803Speter cd ${.CURDIR} && ${MAKE} installworld 15827910Sasami.if target(post-world) 15917308Speter @echo 1602061Sjkh @echo "--------------------------------------------------------------" 16127910Sasami @echo " Making 'post-world' target" 1622061Sjkh @echo "--------------------------------------------------------------" 16328803Speter cd ${.CURDIR} && ${MAKE} post-world 16427910Sasami.endif 1652061Sjkh @echo 16617308Speter @echo "--------------------------------------------------------------" 16727910Sasami @echo "make world completed on `LC_TIME=C date`" 16817308Speter @echo "--------------------------------------------------------------" 16927910Sasami 17027910Sasami.if defined(MAKEOBJDIRPREFIX) 17127910SasamiWORLDTMP= ${MAKEOBJDIRPREFIX}${.CURDIR}/tmp 17217308Speter.else 17327910SasamiWORLDTMP= /usr/obj${.CURDIR}/tmp 17417308Speter.endif 17527910SasamiSTRICTTMPPATH= ${WORLDTMP}/sbin:${WORLDTMP}/usr/sbin:${WORLDTMP}/bin:${WORLDTMP}/usr/bin 17627910SasamiTMPPATH= ${STRICTTMPPATH}:${PATH} 17727910Sasami 17827910Sasami# XXX COMPILER_PATH is needed for finding cc1, ld and as 17927910Sasami# XXX GCC_EXEC_PREFIX is for *crt.o. It is probably unnecssary now 18027910Sasami# tbat LIBRARY_PATH is set. We still can't use -nostdlib, since gcc 18127910Sasami# wouldn't link *crt.o or libgcc if it were used. 18227910Sasami# XXX LD_LIBRARY_PATH is for ld.so. It is also used by ld, although we don't 18327910Sasami# want that - all compile-time library paths should be resolved by gcc. 18427910Sasami# It fails for set[ug]id executables (are any used?). 18527910SasamiCOMPILER_ENV= BISON_SIMPLE=${WORLDTMP}/usr/share/misc/bison.simple \ 18627910Sasami COMPILER_PATH=${WORLDTMP}/usr/libexec:${WORLDTMP}/usr/bin \ 18727910Sasami GCC_EXEC_PREFIX=${WORLDTMP}/usr/lib/ \ 18827910Sasami LD_LIBRARY_PATH=${WORLDTMP}${SHLIBDIR} \ 18927910Sasami LIBRARY_PATH=${WORLDTMP}${SHLIBDIR}:${WORLDTMP}/usr/lib 19027910Sasami 19127910SasamiBMAKEENV= PATH=${TMPPATH} ${COMPILER_ENV} NOEXTRADEPEND=t 19227910SasamiXMAKEENV= PATH=${STRICTTMPPATH} ${COMPILER_ENV} \ 19327910Sasami CC='cc -nostdinc' # XXX -nostdlib 19427910Sasami 19527910Sasami# used to compile and install 'make' in temporary build tree 19627910SasamiIBMAKE= ${BMAKEENV} ${MAKE} DESTDIR=${WORLDTMP} 19727910Sasami# bootstrap make 19827910SasamiBMAKE= ${BMAKEENV} ${WORLDTMP}/usr/bin/${MAKE} DESTDIR=${WORLDTMP} 19927910Sasami# cross make used for compilation 20027910SasamiXMAKE= ${XMAKEENV} ${WORLDTMP}/usr/bin/${MAKE} DESTDIR=${WORLDTMP} 20127910Sasami# cross make used for final installation 20227910SasamiIXMAKE= ${XMAKEENV} ${WORLDTMP}/usr/bin/${MAKE} 20327910Sasami 20427910Sasami# 20527910Sasami# buildworld 20627910Sasami# 20727910Sasami# Attempt to rebuild the entire system, with reasonable chance of 20827910Sasami# success, regardless of how old your existing system is. 20927910Sasami# 21027910Sasamibuildworld: 21127910Sasami.if !defined(NOCLEAN) 21217308Speter @echo 21317308Speter @echo "--------------------------------------------------------------" 21427910Sasami @echo " Cleaning up the temporary build tree" 21517308Speter @echo "--------------------------------------------------------------" 21627910Sasami mkdir -p ${WORLDTMP} 21727910Sasami chflags -R noschg ${WORLDTMP}/ 21827910Sasami rm -rf ${WORLDTMP} 21927910Sasami.endif 22017466Speter @echo 22117308Speter @echo "--------------------------------------------------------------" 22227910Sasami @echo " Making make" 22317308Speter @echo "--------------------------------------------------------------" 22427910Sasami mkdir -p ${WORLDTMP}/usr/bin 22527910Sasami cd ${.CURDIR}/usr.bin/make && \ 22629130Speter ${IBMAKE} -I${.CURDIR}/share/mk \ 22729872Sjkh ${CLEANDIR} ${OBJDIR} depend && \ 22829130Speter ${IBMAKE} -I${.CURDIR}/share/mk ${MK_FLAGS} \ 22928531Sbde all install clean cleandepend 23017308Speter @echo 23117308Speter @echo "--------------------------------------------------------------" 23227910Sasami @echo " Making hierarchy" 23317308Speter @echo "--------------------------------------------------------------" 23427910Sasami cd ${.CURDIR} && ${BMAKE} hierarchy 23527910Sasami.if !defined(NOCLEAN) 23617308Speter @echo 23717308Speter @echo "--------------------------------------------------------------" 23827910Sasami @echo " Cleaning up the obj tree" 23917308Speter @echo "--------------------------------------------------------------" 24027910Sasami cd ${.CURDIR} && ${BMAKE} ${CLEANDIR} 24127910Sasami.endif 24227910Sasami.if !defined(NOOBJDIR) 24317308Speter @echo 24417308Speter @echo "--------------------------------------------------------------" 24527910Sasami @echo " Rebuilding the obj tree" 24617308Speter @echo "--------------------------------------------------------------" 24727910Sasami cd ${.CURDIR} && ${BMAKE} obj 24827910Sasami.endif 24917308Speter @echo 25017308Speter @echo "--------------------------------------------------------------" 25127910Sasami @echo " Rebuilding bootstrap tools" 25217308Speter @echo "--------------------------------------------------------------" 25327910Sasami cd ${.CURDIR} && ${BMAKE} bootstrap 25417308Speter @echo 25517308Speter @echo "--------------------------------------------------------------" 25627910Sasami @echo " Rebuilding tools necessary to build the include files" 25717308Speter @echo "--------------------------------------------------------------" 25827910Sasami cd ${.CURDIR} && ${BMAKE} include-tools 25917308Speter @echo 26017308Speter @echo "--------------------------------------------------------------" 26127910Sasami @echo " Rebuilding /usr/include" 26217308Speter @echo "--------------------------------------------------------------" 26329503Sbde cd ${.CURDIR} && SHARED=symlinks ${BMAKE} includes 26417962Speter @echo 26517962Speter @echo "--------------------------------------------------------------" 26627910Sasami @echo " Rebuilding tools needed to build the libraries" 26717962Speter @echo "--------------------------------------------------------------" 26827910Sasami cd ${.CURDIR} && ${BMAKE} lib-tools 26917962Speter @echo 27017962Speter @echo "--------------------------------------------------------------" 27127910Sasami @echo " Rebuilding /usr/lib" 27217962Speter @echo "--------------------------------------------------------------" 27327910Sasami cd ${.CURDIR} && ${BMAKE} libraries 27417962Speter @echo 27517962Speter @echo "--------------------------------------------------------------" 27627910Sasami @echo " Rebuilding all other tools needed to build the world" 27717962Speter @echo "--------------------------------------------------------------" 27827910Sasami cd ${.CURDIR} && ${BMAKE} build-tools 27917308Speter @echo 28017308Speter @echo "--------------------------------------------------------------" 28127910Sasami @echo " Rebuilding dependencies" 28217308Speter @echo "--------------------------------------------------------------" 28327910Sasami cd ${.CURDIR} && ${XMAKE} depend 28417308Speter @echo 28517308Speter @echo "--------------------------------------------------------------" 28627910Sasami @echo " Building everything.." 28717962Speter @echo "--------------------------------------------------------------" 28827910Sasami cd ${.CURDIR} && ${XMAKE} all 2892061Sjkh 29017308Speter# 29127910Sasami# installworld 29227910Sasami# 29327910Sasami# Installs everything compiled by a 'buildworld'. 29427910Sasami# 29527910Sasamiinstallworld: 29627910Sasami cd ${.CURDIR} && ${IXMAKE} reinstall 29727910Sasami 29827910Sasami# 29917308Speter# reinstall 30017308Speter# 30117308Speter# If you have a build server, you can NFS mount the source and obj directories 30217308Speter# and do a 'make reinstall' on the *client* to install new binaries from the 30317308Speter# most recent server build. 30417308Speter# 30517308Speterreinstall: 30612483Speter @echo "--------------------------------------------------------------" 30717308Speter @echo " Making hierarchy" 30812483Speter @echo "--------------------------------------------------------------" 30917308Speter cd ${.CURDIR} && ${MAKE} hierarchy 31012483Speter @echo 3112061Sjkh @echo "--------------------------------------------------------------" 31217962Speter @echo " Installing everything.." 31317962Speter @echo "--------------------------------------------------------------" 31417308Speter cd ${.CURDIR} && ${MAKE} install 31517962Speter @echo 31617962Speter @echo "--------------------------------------------------------------" 31717962Speter @echo " Rebuilding man page indexes" 31817962Speter @echo "--------------------------------------------------------------" 31917308Speter cd ${.CURDIR}/share/man && ${MAKE} makedb 3202061Sjkh 32117308Speter# 32217308Speter# update 32317308Speter# 32417308Speter# Update the source tree, by running sup and/or running cvs to update to the 32517308Speter# latest copy. 32617308Speter# 3272302Spaulupdate: 3282302Spaul.if defined(SUP_UPDATE) 3292302Spaul @echo "--------------------------------------------------------------" 3302302Spaul @echo "Running sup" 3312302Spaul @echo "--------------------------------------------------------------" 33218714Sache @${SUP} ${SUPFLAGS} ${SUPFILE} 33310760Sache.if defined(SUPFILE1) 33418714Sache @${SUP} ${SUPFLAGS} ${SUPFILE1} 3352302Spaul.endif 33610760Sache.if defined(SUPFILE2) 33718714Sache @${SUP} ${SUPFLAGS} ${SUPFILE2} 33810760Sache.endif 33910760Sache.endif 3402302Spaul.if defined(CVS_UPDATE) 3412302Spaul @echo "--------------------------------------------------------------" 3422302Spaul @echo "Updating /usr/src from cvs repository" ${CVSROOT} 3432302Spaul @echo "--------------------------------------------------------------" 34427790Sasami cd ${.CURDIR} && cvs -q update -P -d 3452302Spaul.endif 3462302Spaul 34717308Speter# 34817308Speter# most 34917308Speter# 35017308Speter# Build most of the user binaries on the existing system libs and includes. 35117308Speter# 35217308Spetermost: 3532061Sjkh @echo "--------------------------------------------------------------" 35417308Speter @echo " Building programs only" 3552061Sjkh @echo "--------------------------------------------------------------" 35628803Speter cd ${.CURDIR}/bin && ${MAKE} all 35728803Speter cd ${.CURDIR}/sbin && ${MAKE} all 35828803Speter cd ${.CURDIR}/libexec && ${MAKE} all 35928803Speter cd ${.CURDIR}/usr.bin && ${MAKE} all 36028803Speter cd ${.CURDIR}/usr.sbin && ${MAKE} all 36128803Speter cd ${.CURDIR}/gnu/libexec && ${MAKE} all 36228803Speter cd ${.CURDIR}/gnu/usr.bin && ${MAKE} all 36328803Speter cd ${.CURDIR}/gnu/usr.sbin && ${MAKE} all 36429930Smarkm#.if defined(MAKE_KERBEROS4) && !defined(NOCRYPT) 36529930Smarkm# cd ${.CURDIR}/kerberosIV && ${MAKE} most 36617308Speter#.endif 36717308Speter#.if !defined(NOSECURE) && !defined(NOCRYPT) 36828803Speter# cd ${.CURDIR}/secure && ${MAKE} most 36917308Speter#.endif 3702061Sjkh 37117308Speter# 37217308Speter# installmost 37317308Speter# 37417308Speter# Install the binaries built by the 'most' target. This does not include 37517308Speter# libraries or include files. 37617308Speter# 3773626Swollmaninstallmost: 3783626Swollman @echo "--------------------------------------------------------------" 3793626Swollman @echo " Installing programs only" 3803626Swollman @echo "--------------------------------------------------------------" 38128803Speter cd ${.CURDIR}/bin && ${MAKE} install 38228803Speter cd ${.CURDIR}/sbin && ${MAKE} install 38328803Speter cd ${.CURDIR}/libexec && ${MAKE} install 38428803Speter cd ${.CURDIR}/usr.bin && ${MAKE} install 38528803Speter cd ${.CURDIR}/usr.sbin && ${MAKE} install 38628803Speter cd ${.CURDIR}/gnu/libexec && ${MAKE} install 38728803Speter cd ${.CURDIR}/gnu/usr.bin && ${MAKE} install 38828803Speter cd ${.CURDIR}/gnu/usr.sbin && ${MAKE} install 38929930Smarkm#.if defined(MAKE_KERBEROS4) && !defined(NOCRYPT) 39029930Smarkm# cd ${.CURDIR}/kerberosIV && ${MAKE} installmost 3913626Swollman#.endif 3923626Swollman#.if !defined(NOSECURE) && !defined(NOCRYPT) 39328803Speter# cd ${.CURDIR}/secure && ${MAKE} installmost 3943626Swollman#.endif 3953626Swollman 39617308Speter# 39717308Speter# ------------------------------------------------------------------------ 39817308Speter# 39917308Speter# From here onwards are utility targets used by the 'make world' and 40017308Speter# related targets. If your 'world' breaks, you may like to try to fix 40117308Speter# the problem and manually run the following targets to attempt to 40217308Speter# complete the build. Beware, this is *not* guaranteed to work, you 40317308Speter# need to have a pretty good grip on the current state of the system 40417308Speter# to attempt to manually finish it. If in doubt, 'make world' again. 40517308Speter# 4063626Swollman 40717308Speter# 40817308Speter# heirarchy - ensure that all the needed directories are present 40917308Speter# 41017308Speterhierarchy: 41117308Speter cd ${.CURDIR}/etc && ${MAKE} distrib-dirs 41217308Speter 41317308Speter# 41417308Speter# bootstrap - [re]build tools needed to run the actual build, this includes 41517308Speter# tools needed by 'make depend', as some tools are needed to generate source 41617308Speter# for the dependency information to be gathered from. 41717308Speter# 41817308Speterbootstrap: 41927910Sasami.if defined(DESTDIR) 42027910Sasami rm -f ${DESTDIR}/usr/src/sys 42127910Sasami ln -s ${.CURDIR}/sys ${DESTDIR}/usr/src 42227910Sasami cd ${.CURDIR}/include && find -dx . | cpio -dump ${DESTDIR}/usr/include 42327910Sasami cd ${.CURDIR}/include && make symlinks 42427910Sasami.endif 42517820Sjkh cd ${.CURDIR}/usr.bin/make && ${MAKE} depend && \ 42617308Speter ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 42717820Sjkh cd ${.CURDIR}/usr.bin/xinstall && ${MAKE} depend && \ 42817308Speter ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 42917820Sjkh cd ${.CURDIR}/usr.bin/lex && ${MAKE} bootstrap && ${MAKE} depend && \ 43017467Speter ${MAKE} ${MK_FLAGS} -DNOLIB all install ${CLEANDIR} ${OBJDIR} 43117308Speter 43217308Speter# 43317308Speter# include-tools - generally the same as 'bootstrap', except that it's for 43417308Speter# things that are specifically needed to generate include files. 43517308Speter# 43627910Sasami# XXX should be merged with bootstrap, it's not worth keeeping them separate. 43727910Sasami# Well, maybe it is now. We force 'cleandepend' here to avoid dependencies 43827910Sasami# on cleaned away headers in ${WORLDTMP}. 43917308Speter# 44017308Speterinclude-tools: 44127910Sasami cd ${.CURDIR}/usr.bin/rpcgen && ${MAKE} cleandepend depend && \ 44227910Sasami ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 44317308Speter 44417308Speter# 44517308Speter# includes - possibly generate and install the include files. 44617308Speter# 44714119Speterincludes: 4482061Sjkh.if defined(CLOBBER) 4497130Srgrimes rm -rf ${DESTDIR}/usr/include/* 4507130Srgrimes mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ 4517130Srgrimes -p ${DESTDIR}/usr/include 4522061Sjkh.endif 45329503Sbde cd ${.CURDIR}/include && ${MAKE} all install 45417308Speter cd ${.CURDIR}/gnu/include && ${MAKE} install 45528532Sbde cd ${.CURDIR}/gnu/lib/libmp && ${MAKE} beforeinstall 45628532Sbde cd ${.CURDIR}/gnu/lib/libobjc && ${MAKE} beforeinstall 4572685Srgrimes cd ${.CURDIR}/gnu/lib/libreadline && ${MAKE} beforeinstall 4586927Snate cd ${.CURDIR}/gnu/lib/libregex && ${MAKE} beforeinstall 45927790Sasami cd ${.CURDIR}/gnu/lib/libstdc++ && ${MAKE} beforeinstall 46027790Sasami cd ${.CURDIR}/gnu/lib/libg++ && ${MAKE} beforeinstall 46127790Sasami cd ${.CURDIR}/gnu/lib/libdialog && ${MAKE} beforeinstall 46228329Sandreas cd ${.CURDIR}/gnu/lib/libgmp && ${MAKE} beforeinstall 46329930Smarkm.if exists(secure) && !defined(NOCRYPT) 46429930Smarkm cd ${.CURDIR}/secure/lib/libdes && ${MAKE} beforeinstall 4653197Scsgr.endif 46629930Smarkm.if exists(kerberosIV) && !defined(NOCRYPT) && defined(MAKE_KERBEROS4) 46729930Smarkm cd ${.CURDIR}/kerberosIV/lib/libacl && ${MAKE} beforeinstall 46829930Smarkm cd ${.CURDIR}/kerberosIV/lib/libkadm && ${MAKE} beforeinstall 46929930Smarkm cd ${.CURDIR}/kerberosIV/lib/libkafs && ${MAKE} beforeinstall 47029930Smarkm cd ${.CURDIR}/kerberosIV/lib/libkdb && ${MAKE} beforeinstall 47129930Smarkm cd ${.CURDIR}/kerberosIV/lib/libkrb && ${MAKE} beforeinstall 47229930Smarkm cd ${.CURDIR}/kerberosIV/lib/libtelnet && ${MAKE} beforeinstall 47329930Smarkm.else 47429930Smarkm cd ${.CURDIR}/lib/libtelnet && ${MAKE} beforeinstall 47529930Smarkm.endif 47625313Sbde cd ${.CURDIR}/lib/csu/i386 && ${MAKE} beforeinstall 47726152Speter cd ${.CURDIR}/lib/libalias && ${MAKE} beforeinstall 4782061Sjkh cd ${.CURDIR}/lib/libc && ${MAKE} beforeinstall 4792061Sjkh cd ${.CURDIR}/lib/libcurses && ${MAKE} beforeinstall 48028532Sbde cd ${.CURDIR}/lib/libdisk && ${MAKE} beforeinstall 4812061Sjkh cd ${.CURDIR}/lib/libedit && ${MAKE} beforeinstall 48216786Snate cd ${.CURDIR}/lib/libftpio && ${MAKE} beforeinstall 4832883Sphk cd ${.CURDIR}/lib/libmd && ${MAKE} beforeinstall 48427790Sasami cd ${.CURDIR}/lib/libmytinfo && ${MAKE} beforeinstall 48517308Speter cd ${.CURDIR}/lib/libncurses && ${MAKE} beforeinstall 4867281Srgrimes.if !defined(WANT_CSRG_LIBM) 4873242Spaul cd ${.CURDIR}/lib/msun && ${MAKE} beforeinstall 4883242Spaul.endif 48928532Sbde cd ${.CURDIR}/lib/libopie && ${MAKE} beforeinstall 4907171Sats cd ${.CURDIR}/lib/libpcap && ${MAKE} beforeinstall 4912061Sjkh cd ${.CURDIR}/lib/librpcsvc && ${MAKE} beforeinstall 4923213Spst cd ${.CURDIR}/lib/libskey && ${MAKE} beforeinstall 49328104Sasami.if !defined(NOTCL) && exists (${.CURDIR}/contrib/tcl) && \ 49428104Sasami exists(${.CURDIR}/usr.bin/tclsh) && exists (${.CURDIR}/lib/libtcl) 49528728Sbde cd ${.CURDIR}/lib/libtcl && ${MAKE} installhdrs 49628104Sasami.endif 49717308Speter cd ${.CURDIR}/lib/libtermcap && ${MAKE} beforeinstall 4985749Swollman cd ${.CURDIR}/lib/libcom_err && ${MAKE} beforeinstall 4995772Swollman cd ${.CURDIR}/lib/libss && ${MAKE} beforeinstall 50017308Speter cd ${.CURDIR}/lib/libscsi && ${MAKE} beforeinstall 50117308Speter cd ${.CURDIR}/lib/libutil && ${MAKE} beforeinstall 50228532Sbde cd ${.CURDIR}/lib/libvgl && ${MAKE} beforeinstall 50326504Sjhay cd ${.CURDIR}/lib/libz && ${MAKE} beforeinstall 50428532Sbde cd ${.CURDIR}/usr.bin/f2c && ${MAKE} beforeinstall 50528532Sbde cd ${.CURDIR}/usr.bin/lex && ${MAKE} beforeinstall 5062061Sjkh 50717308Speter# 50817308Speter# lib-tools - build tools to compile and install the libraries. 50917308Speter# 51027910Sasami# XXX gperf is required for cc 51127910Sasami# XXX a new ld and tsort is required for cc 5125366Snatelib-tools: 51327910Sasami.for d in \ 51427910Sasami gnu/usr.bin/gperf \ 51527910Sasami gnu/usr.bin/ld \ 51627910Sasami usr.bin/tsort \ 51727910Sasami gnu/usr.bin/as \ 51827910Sasami gnu/usr.bin/bison \ 51927910Sasami gnu/usr.bin/cc \ 52027910Sasami usr.bin/ar \ 52127910Sasami usr.bin/compile_et \ 52227910Sasami usr.bin/lex/lib \ 52327910Sasami usr.bin/mk_cmds \ 52427910Sasami usr.bin/nm \ 52527910Sasami usr.bin/ranlib \ 52627910Sasami usr.bin/uudecode 52727910Sasami cd ${.CURDIR}/$d && ${MAKE} depend && \ 52817467Speter ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 52927910Sasami.endfor 5305366Snate 53117308Speter# 53217308Speter# libraries - build and install the libraries 53317308Speter# 5342061Sjkhlibraries: 53524754Sjdp.if exists(lib/csu/i386) 53624754Sjdp cd ${.CURDIR}/lib/csu/i386 && ${MAKE} depend && \ 53724754Sjdp ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 53824754Sjdp.endif 5398295Srgrimes.if exists(lib/libcompat) 54017820Sjkh cd ${.CURDIR}/lib/libcompat && ${MAKE} depend && \ 54117308Speter ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 5428295Srgrimes.endif 5438489Srgrimes.if exists(lib/libncurses) 54417820Sjkh cd ${.CURDIR}/lib/libncurses && ${MAKE} depend && \ 54517308Speter ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 5468489Srgrimes.endif 5478489Srgrimes.if exists(lib/libtermcap) 54817820Sjkh cd ${.CURDIR}/lib/libtermcap && ${MAKE} depend && \ 54917308Speter ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 5508489Srgrimes.endif 5518295Srgrimes.if exists(gnu) 55217820Sjkh cd ${.CURDIR}/gnu/lib && ${MAKE} depend && \ 55317308Speter ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 5548295Srgrimes.endif 5552160Scsgr.if exists(secure) && !defined(NOCRYPT) && !defined(NOSECURE) 55617820Sjkh cd ${.CURDIR}/secure/lib && ${MAKE} depend && \ 55717308Speter ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 5582160Scsgr.endif 5592279Spaul.if exists(lib) 56017820Sjkh cd ${.CURDIR}/lib && ${MAKE} depend && \ 56117308Speter ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 5622279Spaul.endif 56317234Sjraynard.if exists(usr.bin/lex/lib) 56417820Sjkh cd ${.CURDIR}/usr.bin/lex/lib && ${MAKE} depend && \ 56517308Speter ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 56611772Snate.endif 56729930Smarkm.if !defined(NOCRYPT) && defined(MAKE_KERBEROS4) 56829930Smarkm cd ${.CURDIR}/kerberosIV/lib && ${MAKE} depend && \ 56917308Speter ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 5702626Scsgr.endif 5718304Srgrimes.if exists(usr.sbin/pcvt/keycap) 57217820Sjkh cd ${.CURDIR}/usr.sbin/pcvt/keycap && ${MAKE} depend && \ 57317308Speter ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 5748304Srgrimes.endif 5752061Sjkh 57617308Speter# 57717308Speter# build-tools - build and install any other tools needed to complete the 57817308Speter# compile and install. 57927910Sasami# ifdef stale 58027910Sasami# bc and cpp are required to build groff. Otherwise, the order here is 58127910Sasami# mostly historical, i.e., bogus. 58227910Sasami# chmod is used to build gcc's tmpmultilib[2] at obscure times. 58327910Sasami# endif stale 58427910Sasami# XXX uname is a bug - the target should not depend on the host. 58517308Speter# 58611806Sphkbuild-tools: 58719175Sbde.for d in \ 58827910Sasami bin/cat \ 58927910Sasami bin/chmod \ 59027910Sasami bin/cp \ 59127910Sasami bin/date \ 59227910Sasami bin/dd \ 59327910Sasami bin/echo \ 59427910Sasami bin/expr \ 59527910Sasami bin/hostname \ 59627910Sasami bin/ln \ 59727910Sasami bin/ls \ 59827910Sasami bin/mkdir \ 59927910Sasami bin/mv \ 60027910Sasami bin/rm \ 60127910Sasami bin/sh \ 60227910Sasami bin/test \ 60327910Sasami gnu/usr.bin/awk \ 60427910Sasami gnu/usr.bin/bc \ 60527910Sasami gnu/usr.bin/grep \ 60627910Sasami gnu/usr.bin/groff \ 60727910Sasami gnu/usr.bin/gzip \ 60827910Sasami gnu/usr.bin/man/makewhatis \ 60927910Sasami gnu/usr.bin/sort \ 61027910Sasami gnu/usr.bin/texinfo \ 61121673Sjkh share/info \ 61227910Sasami usr.bin/basename \ 61327910Sasami usr.bin/cap_mkdb \ 61427910Sasami usr.bin/chflags \ 61527910Sasami usr.bin/cmp \ 61627910Sasami usr.bin/col \ 61727910Sasami usr.bin/cpp \ 61827910Sasami usr.bin/expand \ 61927910Sasami usr.bin/file2c \ 62027910Sasami usr.bin/find \ 62127910Sasami usr.bin/gencat \ 62227910Sasami usr.bin/lorder \ 62327910Sasami usr.bin/m4 \ 62427910Sasami usr.bin/mkdep \ 62527910Sasami usr.bin/paste \ 62627910Sasami usr.bin/sed \ 62727910Sasami usr.bin/size \ 62827910Sasami usr.bin/soelim \ 62927910Sasami usr.bin/strip \ 63019175Sbde usr.bin/symorder \ 63127910Sasami usr.bin/touch \ 63227910Sasami usr.bin/tr \ 63327910Sasami usr.bin/true \ 63427910Sasami usr.bin/uname \ 63527910Sasami usr.bin/uuencode \ 63627910Sasami usr.bin/vgrind \ 63727910Sasami usr.bin/vi \ 63827910Sasami usr.bin/wc \ 63927910Sasami usr.bin/yacc \ 64027910Sasami usr.sbin/chown \ 64127910Sasami usr.sbin/mtree \ 64227910Sasami usr.sbin/zic 64319175Sbde cd ${.CURDIR}/$d && ${MAKE} depend && \ 64417308Speter ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 64519175Sbde.endfor 6462061Sjkh 6471594Srgrimes.include <bsd.subdir.mk> 648