13540f0e1SJordan K. Hubbard# 2a962de47SPeter Wemm# $Id: Makefile,v 1.90 1996/07/21 00:05:31 jraynard Exp $ 33540f0e1SJordan K. Hubbard# 43540f0e1SJordan K. Hubbard# Make command line options: 56a8d432dSMark Murray# -DCLOBBER will remove /usr/include 63540f0e1SJordan K. Hubbard# -DMAKE_LOCAL to add ./local to the SUBDIR list 73540f0e1SJordan K. Hubbard# -DMAKE_PORTS to add ./ports to the SUBDIR list 8c368d11dSGeoff Rehmet# -DMAKE_EBONES to build eBones (KerberosIV) 9c368d11dSGeoff Rehmet# 103540f0e1SJordan K. Hubbard# -DNOCLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir 114620010dSPeter Wemm# -DNOCLEAN do not clean at all 122a407ae5SGeoff Rehmet# -DNOCRYPT will prevent building of crypt versions 130eec3684SGarrett Wollman# -DNOLKM do not build loadable kernel modules 143540f0e1SJordan K. Hubbard# -DNOOBJDIR do not run ``${MAKE} obj'' 153540f0e1SJordan K. Hubbard# -DNOPROFILE do not build profiled libraries 162a407ae5SGeoff Rehmet# -DNOSECURE do not go into secure subdir 17a962de47SPeter Wemm# -DNOGAMES do not go into games subdir 18a962de47SPeter Wemm 19a962de47SPeter Wemm# 20a962de47SPeter Wemm# The intended user-driven targets are: 21a962de47SPeter Wemm# world - rebuild *everything*, including glue to help do upgrades. 22a962de47SPeter Wemm# reinstall - use an existing (eg: NFS mounted) build to do an update. 23a962de47SPeter Wemm# update - convenient way to update your source tree (eg: sup/cvs) 24a962de47SPeter Wemm# most - build user commands, no libraries or include files 25a962de47SPeter Wemm# installmost - install user commands, no libraries or include files 26a962de47SPeter Wemm# all - run through SUBDIR and build everything. This is an implicit 27a962de47SPeter Wemm# rule, not particularly useful for everybody. Use 'world'. 28a962de47SPeter Wemm 29c3d9b0f0SRodney W. Grimes 303540f0e1SJordan K. Hubbard# Put initial settings here. 313540f0e1SJordan K. HubbardSUBDIR= 32c3d9b0f0SRodney W. Grimes 33e080a7f0SRodney W. Grimes# We must do include and lib first so that the perl *.ph generation 34e080a7f0SRodney W. Grimes# works correctly as it uses the header files installed by this. 3548c51d32SPoul-Henning Kamp.if exists(include) 3648c51d32SPoul-Henning KampSUBDIR+= include 3748c51d32SPoul-Henning Kamp.endif 38e080a7f0SRodney W. Grimes.if exists(lib) 39e080a7f0SRodney W. GrimesSUBDIR+= lib 40e080a7f0SRodney W. Grimes.endif 4148c51d32SPoul-Henning Kamp 423540f0e1SJordan K. Hubbard.if exists(bin) 433540f0e1SJordan K. HubbardSUBDIR+= bin 443540f0e1SJordan K. Hubbard.endif 45a962de47SPeter Wemm.if exists(games) && !defined(NOGAMES) 463540f0e1SJordan K. HubbardSUBDIR+= games 473540f0e1SJordan K. Hubbard.endif 483540f0e1SJordan K. Hubbard.if exists(gnu) 493540f0e1SJordan K. HubbardSUBDIR+= gnu 503540f0e1SJordan K. Hubbard.endif 51c368d11dSGeoff Rehmet.if exists(eBones) && !defined(NOCRYPT) && defined(MAKE_EBONES) 5272181495SGeoff RehmetSUBDIR+= eBones 5372181495SGeoff Rehmet.endif 543540f0e1SJordan K. Hubbard.if exists(libexec) 553540f0e1SJordan K. HubbardSUBDIR+= libexec 563540f0e1SJordan K. Hubbard.endif 573540f0e1SJordan K. Hubbard.if exists(sbin) 583540f0e1SJordan K. HubbardSUBDIR+= sbin 593540f0e1SJordan K. Hubbard.endif 603540f0e1SJordan K. Hubbard.if exists(share) 613540f0e1SJordan K. HubbardSUBDIR+= share 623540f0e1SJordan K. Hubbard.endif 633540f0e1SJordan K. Hubbard.if exists(sys) 643540f0e1SJordan K. HubbardSUBDIR+= sys 653540f0e1SJordan K. Hubbard.endif 663540f0e1SJordan K. Hubbard.if exists(usr.bin) 673540f0e1SJordan K. HubbardSUBDIR+= usr.bin 683540f0e1SJordan K. Hubbard.endif 693540f0e1SJordan K. Hubbard.if exists(usr.sbin) 703540f0e1SJordan K. HubbardSUBDIR+= usr.sbin 713540f0e1SJordan K. Hubbard.endif 720eec3684SGarrett Wollman.if exists(secure) && !defined(NOCRYPT) && !defined(NOSECURE) 730eec3684SGarrett WollmanSUBDIR+= secure 740eec3684SGarrett Wollman.endif 750eec3684SGarrett Wollman.if exists(lkm) && !defined(NOLKM) 760eec3684SGarrett WollmanSUBDIR+= lkm 770eec3684SGarrett Wollman.endif 78c3d9b0f0SRodney W. Grimes 79750f81deSPoul-Henning Kamp# etc must be last for "distribute" to work 80750f81deSPoul-Henning Kamp.if exists(etc) && make(distribute) 81750f81deSPoul-Henning KampSUBDIR+= etc 82750f81deSPoul-Henning Kamp.endif 83750f81deSPoul-Henning Kamp 843540f0e1SJordan K. Hubbard# These are last, since it is nice to at least get the base system 853540f0e1SJordan K. Hubbard# rebuilt before you do them. 863540f0e1SJordan K. Hubbard.if defined(MAKE_LOCAL) & exists(local) & exists(local/Makefile) 873540f0e1SJordan K. HubbardSUBDIR+= local 883540f0e1SJordan K. Hubbard.endif 893540f0e1SJordan K. Hubbard.if defined(MAKE_PORTS) & exists(ports) & exists(ports/Makefile) 903540f0e1SJordan K. HubbardSUBDIR+= ports 913540f0e1SJordan K. Hubbard.endif 923540f0e1SJordan K. Hubbard 93a962de47SPeter Wemm# Handle -DNOOBJDIR, -DNOCLEAN and -DNOCLEANDIR 943540f0e1SJordan K. Hubbard.if defined(NOOBJDIR) 953540f0e1SJordan K. HubbardOBJDIR= 963540f0e1SJordan K. Hubbard.else 973540f0e1SJordan K. HubbardOBJDIR= obj 983540f0e1SJordan K. Hubbard.endif 994620010dSPeter Wemm 1004620010dSPeter Wemm.if defined(NOCLEAN) 1014620010dSPeter WemmCLEANDIR= 1024620010dSPeter Wemm.else 1033540f0e1SJordan K. Hubbard.if defined(NOCLEANDIR) 1043540f0e1SJordan K. HubbardCLEANDIR= clean 1053540f0e1SJordan K. Hubbard.else 1063540f0e1SJordan K. HubbardCLEANDIR= cleandir 1073540f0e1SJordan K. Hubbard.endif 1084620010dSPeter Wemm.endif 1093540f0e1SJordan K. Hubbard 110a962de47SPeter Wemm# 111a962de47SPeter Wemm# While building tools for bootstrapping, we dont need to waste time on 112a962de47SPeter Wemm# profiled libraries or man pages. This speeds things up somewhat. 113a962de47SPeter Wemm# 1146a8d432dSMark MurrayMK_FLAGS= -DNOMAN -DNOPROFILE 1156a8d432dSMark Murray 116a962de47SPeter Wemm# 117a962de47SPeter Wemm# world 118a962de47SPeter Wemm# 119a962de47SPeter Wemm# Attempt to rebuild and reinstall *everything*, with reasonable chance of 120a962de47SPeter Wemm# success, regardless of how old your existing system is. 121a962de47SPeter Wemm# 122a962de47SPeter Wemm# >> Beware, it overwrites the local build environment! << 123a962de47SPeter Wemm# 124a962de47SPeter Wemmworld: 125a962de47SPeter Wemm.if target(pre-world) 1263540f0e1SJordan K. Hubbard @echo "--------------------------------------------------------------" 127a962de47SPeter Wemm @echo " Making 'pre-world' target" 1283540f0e1SJordan K. Hubbard @echo "--------------------------------------------------------------" 129a962de47SPeter Wemm cd ${.CURDIR} && ${MAKE} pre-world 1303540f0e1SJordan K. Hubbard @echo 131a962de47SPeter Wemm.endif 132a962de47SPeter Wemm @echo "--------------------------------------------------------------" 133a962de47SPeter Wemm @echo " Making hierarchy" 134a962de47SPeter Wemm @echo "--------------------------------------------------------------" 135a962de47SPeter Wemm cd ${.CURDIR} && ${MAKE} hierarchy 136a962de47SPeter Wemm @echo 137a962de47SPeter Wemm @echo "--------------------------------------------------------------" 138a962de47SPeter Wemm @echo " Rebuilding /usr/share/mk" 139a962de47SPeter Wemm @echo "--------------------------------------------------------------" 140a962de47SPeter Wemm cd ${.CURDIR} && ${MAKE} mk 141a962de47SPeter Wemm @echo 142a962de47SPeter Wemm @echo "--------------------------------------------------------------" 143a962de47SPeter Wemm @echo " Cleaning up the source tree" 144a962de47SPeter Wemm @echo "--------------------------------------------------------------" 145a962de47SPeter Wemm.if defined(NOCLEAN) 146a962de47SPeter Wemm @echo "Not cleaning anything! I sure hope you know what you are doing!" 147a962de47SPeter Wemm.else 148a962de47SPeter Wemm.if defined(NOCLEANDIR) 149a962de47SPeter Wemm cd ${.CURDIR} && ${MAKE} clean 150a962de47SPeter Wemm.else 151a962de47SPeter Wemm cd ${.CURDIR} && ${MAKE} cleandir 152a962de47SPeter Wemm.endif 153a962de47SPeter Wemm.endif 154a962de47SPeter Wemm @echo 155a962de47SPeter Wemm.if !defined(NOOBJ) 156a962de47SPeter Wemm @echo "--------------------------------------------------------------" 157a962de47SPeter Wemm @echo " Rebuilding the obj tree" 158a962de47SPeter Wemm @echo "--------------------------------------------------------------" 159a962de47SPeter Wemm cd ${.CURDIR} && ${MAKE} obj 160a962de47SPeter Wemm.endif 161a962de47SPeter Wemm @echo 162a962de47SPeter Wemm @echo "--------------------------------------------------------------" 163a962de47SPeter Wemm @echo " Rebuilding bootstrap tools" 164a962de47SPeter Wemm @echo "--------------------------------------------------------------" 165a962de47SPeter Wemm cd ${.CURDIR} && ${MAKE} bootstrap 166a962de47SPeter Wemm @echo 167a962de47SPeter Wemm @echo "--------------------------------------------------------------" 168a962de47SPeter Wemm @echo " Rebuilding tools necessary to build the include files" 169a962de47SPeter Wemm @echo "--------------------------------------------------------------" 170a962de47SPeter Wemm cd ${.CURDIR} && ${MAKE} include-tools 171a962de47SPeter Wemm @echo 172a962de47SPeter Wemm @echo "--------------------------------------------------------------" 173a962de47SPeter Wemm @echo " Rebuilding /usr/include" 174a962de47SPeter Wemm @echo "--------------------------------------------------------------" 175a962de47SPeter Wemm cd ${.CURDIR} && ${MAKE} includes 176a962de47SPeter Wemm @echo 177a962de47SPeter Wemm @echo "--------------------------------------------------------------" 178a962de47SPeter Wemm @echo " Rebuilding tools needed to build the libraries" 179a962de47SPeter Wemm @echo "--------------------------------------------------------------" 180a962de47SPeter Wemm cd ${.CURDIR} && ${MAKE} lib-tools 181a962de47SPeter Wemm @echo 182a962de47SPeter Wemm @echo "--------------------------------------------------------------" 183a962de47SPeter Wemm @echo " Rebuilding /usr/lib" 184a962de47SPeter Wemm @echo "--------------------------------------------------------------" 185a962de47SPeter Wemm cd ${.CURDIR} && ${MAKE} libraries 186a962de47SPeter Wemm @echo 187a962de47SPeter Wemm @echo "--------------------------------------------------------------" 188a962de47SPeter Wemm @echo " Rebuilding C compiler, make, symorder, sgmlfmt and zic(8)" 189a962de47SPeter Wemm @echo "--------------------------------------------------------------" 190a962de47SPeter Wemm cd ${.CURDIR} && ${MAKE} build-tools 191a962de47SPeter Wemm @echo 192a962de47SPeter Wemm @echo "--------------------------------------------------------------" 193a962de47SPeter Wemm @echo " Rebuilding.. The whole thing" 194a962de47SPeter Wemm @echo "--------------------------------------------------------------" 195a962de47SPeter Wemm cd ${.CURDIR} && ${MAKE} depend && ${MAKE} all install 1963540f0e1SJordan K. Hubbard cd ${.CURDIR}/share/man && ${MAKE} makedb 19716a34ebdSJordan K. Hubbard.if target(post-world) 198a962de47SPeter Wemm @echo 199a962de47SPeter Wemm @echo "--------------------------------------------------------------" 200a962de47SPeter Wemm @echo " Making 'post-world' target" 201a962de47SPeter Wemm @echo "--------------------------------------------------------------" 20216a34ebdSJordan K. Hubbard cd ${.CURDIR} && ${MAKE} post-world 20316a34ebdSJordan K. Hubbard.endif 204a962de47SPeter Wemm @echo 205a962de47SPeter Wemm @echo "--------------------------------------------------------------" 2060b802df8SJordan K. Hubbard @echo "make world completed on `date`" 2073540f0e1SJordan K. Hubbard 208a962de47SPeter Wemm# 209a962de47SPeter Wemm# reinstall 210a962de47SPeter Wemm# 211a962de47SPeter Wemm# If you have a build server, you can NFS mount the source and obj directories 212a962de47SPeter Wemm# and do a 'make reinstall' on the *client* to install new binaries from the 213a962de47SPeter Wemm# most recent server build. 214a962de47SPeter Wemm# 215a962de47SPeter Wemmreinstall: 2164620010dSPeter Wemm @echo "--------------------------------------------------------------" 217a962de47SPeter Wemm @echo " Making hierarchy" 218a962de47SPeter Wemm @echo "--------------------------------------------------------------" 219a962de47SPeter Wemm cd ${.CURDIR} && ${MAKE} hierarchy 220a962de47SPeter Wemm @echo 221a962de47SPeter Wemm @echo "--------------------------------------------------------------" 222a962de47SPeter Wemm @echo " Rebuilding /usr/share/mk" 223a962de47SPeter Wemm @echo "--------------------------------------------------------------" 224a962de47SPeter Wemm cd ${.CURDIR} && ${MAKE} mk 225a962de47SPeter Wemm @echo 226a962de47SPeter Wemm @echo "--------------------------------------------------------------" 227a962de47SPeter Wemm @echo " Rebuilding /usr/include" 228a962de47SPeter Wemm @echo "--------------------------------------------------------------" 229a962de47SPeter Wemm cd ${.CURDIR} && ${MAKE} includes 230a962de47SPeter Wemm @echo 231a962de47SPeter Wemm @echo "--------------------------------------------------------------" 232a962de47SPeter Wemm @echo " Reinstalling.. The whole thing" 2334620010dSPeter Wemm @echo "--------------------------------------------------------------" 2344620010dSPeter Wemm @echo 235cd9a2f5cSJordan K. Hubbard cd ${.CURDIR} && ${MAKE} install 2364620010dSPeter Wemm cd ${.CURDIR}/share/man && ${MAKE} makedb 2374620010dSPeter Wemm 23895516197SPaul Richards 239a962de47SPeter Wemm# 240a962de47SPeter Wemm# update 241a962de47SPeter Wemm# 242a962de47SPeter Wemm# Update the source tree, by running sup and/or running cvs to update to the 243a962de47SPeter Wemm# latest copy. 244a962de47SPeter Wemm# 24595516197SPaul Richardsupdate: 24695516197SPaul Richards.if defined(SUP_UPDATE) 24795516197SPaul Richards @echo "--------------------------------------------------------------" 24895516197SPaul Richards @echo "Running sup" 24995516197SPaul Richards @echo "--------------------------------------------------------------" 25095516197SPaul Richards @sup -v ${SUPFILE} 251b032e1f9SAndrey A. Chernov.if defined(SUPFILE1) 252b032e1f9SAndrey A. Chernov @sup -v ${SUPFILE1} 253b032e1f9SAndrey A. Chernov.endif 254b032e1f9SAndrey A. Chernov.if defined(SUPFILE2) 255b032e1f9SAndrey A. Chernov @sup -v ${SUPFILE2} 256b032e1f9SAndrey A. Chernov.endif 25795516197SPaul Richards.endif 25895516197SPaul Richards.if defined(CVS_UPDATE) 25995516197SPaul Richards @echo "--------------------------------------------------------------" 26095516197SPaul Richards @echo "Updating /usr/src from cvs repository" ${CVSROOT} 26195516197SPaul Richards @echo "--------------------------------------------------------------" 262ba16a676SPaul Traina cd ${.CURDIR} && cvs -q update -P -d 26395516197SPaul Richards.endif 2643540f0e1SJordan K. Hubbard 2653540f0e1SJordan K. Hubbard 266a962de47SPeter Wemm# 267a962de47SPeter Wemm# most 268a962de47SPeter Wemm# 269a962de47SPeter Wemm# Build most of the user binaries on the existing system libs and includes. 270a962de47SPeter Wemm# 271ac08bc0cSGarrett Wollmanmost: 272ac08bc0cSGarrett Wollman @echo "--------------------------------------------------------------" 273ac08bc0cSGarrett Wollman @echo " Building programs only" 274ac08bc0cSGarrett Wollman @echo "--------------------------------------------------------------" 275ac08bc0cSGarrett Wollman cd ${.CURDIR}/bin && ${MAKE} ${.MAKEFLAGS} all 276ac08bc0cSGarrett Wollman cd ${.CURDIR}/sbin && ${MAKE} ${.MAKEFLAGS} all 277ac08bc0cSGarrett Wollman cd ${.CURDIR}/libexec && ${MAKE} ${.MAKEFLAGS} all 278ac08bc0cSGarrett Wollman cd ${.CURDIR}/usr.bin && ${MAKE} ${.MAKEFLAGS} all 279ac08bc0cSGarrett Wollman cd ${.CURDIR}/usr.sbin && ${MAKE} ${.MAKEFLAGS} all 280ac08bc0cSGarrett Wollman cd ${.CURDIR}/gnu/libexec && ${MAKE} ${.MAKEFLAGS} all 281ac08bc0cSGarrett Wollman cd ${.CURDIR}/gnu/usr.bin && ${MAKE} ${.MAKEFLAGS} all 282012872c1SSøren Schmidt cd ${.CURDIR}/gnu/usr.sbin && ${MAKE} ${.MAKEFLAGS} all 283ac08bc0cSGarrett Wollman#.if defined(MAKE_EBONES) && !defined(NOCRYPT) 284ac08bc0cSGarrett Wollman# cd ${.CURDIR}/eBones && ${MAKE} ${.MAKEFLAGS} most 285ac08bc0cSGarrett Wollman#.endif 286ac08bc0cSGarrett Wollman#.if !defined(NOSECURE) && !defined(NOCRYPT) 287ac08bc0cSGarrett Wollman# cd ${.CURDIR}/secure && ${MAKE} ${.MAKEFLAGS} most 288ac08bc0cSGarrett Wollman#.endif 289ac08bc0cSGarrett Wollman 290a962de47SPeter Wemm# 291a962de47SPeter Wemm# installmost 292a962de47SPeter Wemm# 293a962de47SPeter Wemm# Install the binaries built by the 'most' target. This does not include 294a962de47SPeter Wemm# libraries or include files. 295a962de47SPeter Wemm# 296a962de47SPeter Wemminstallmost: 297a962de47SPeter Wemm @echo "--------------------------------------------------------------" 298a962de47SPeter Wemm @echo " Installing programs only" 299a962de47SPeter Wemm @echo "--------------------------------------------------------------" 300a962de47SPeter Wemm cd ${.CURDIR}/bin && ${MAKE} ${.MAKEFLAGS} install 301a962de47SPeter Wemm cd ${.CURDIR}/sbin && ${MAKE} ${.MAKEFLAGS} install 302a962de47SPeter Wemm cd ${.CURDIR}/libexec && ${MAKE} ${.MAKEFLAGS} install 303a962de47SPeter Wemm cd ${.CURDIR}/usr.bin && ${MAKE} ${.MAKEFLAGS} install 304a962de47SPeter Wemm cd ${.CURDIR}/usr.sbin && ${MAKE} ${.MAKEFLAGS} install 305a962de47SPeter Wemm cd ${.CURDIR}/gnu/libexec && ${MAKE} ${.MAKEFLAGS} install 306a962de47SPeter Wemm cd ${.CURDIR}/gnu/usr.bin && ${MAKE} ${.MAKEFLAGS} install 307a962de47SPeter Wemm cd ${.CURDIR}/gnu/usr.sbin && ${MAKE} ${.MAKEFLAGS} install 308a962de47SPeter Wemm#.if defined(MAKE_EBONES) && !defined(NOCRYPT) 309a962de47SPeter Wemm# cd ${.CURDIR}/eBones && ${MAKE} ${.MAKEFLAGS} installmost 310a962de47SPeter Wemm#.endif 311a962de47SPeter Wemm#.if !defined(NOSECURE) && !defined(NOCRYPT) 312a962de47SPeter Wemm# cd ${.CURDIR}/secure && ${MAKE} ${.MAKEFLAGS} installmost 313a962de47SPeter Wemm#.endif 314a962de47SPeter Wemm 315a962de47SPeter Wemm# 316a962de47SPeter Wemm# ------------------------------------------------------------------------ 317a962de47SPeter Wemm# 318a962de47SPeter Wemm# From here onwards are utility targets used by the 'make world' and 319a962de47SPeter Wemm# related targets. If your 'world' breaks, you may like to try to fix 320a962de47SPeter Wemm# the problem and manually run the following targets to attempt to 321a962de47SPeter Wemm# complete the build. Beware, this is *not* guaranteed to work, you 322a962de47SPeter Wemm# need to have a pretty good grip on the current state of the system 323a962de47SPeter Wemm# to attempt to manually finish it. If in doubt, 'make world' again. 324a962de47SPeter Wemm# 325a962de47SPeter Wemm 326a962de47SPeter Wemm# 327a962de47SPeter Wemm# heirarchy - ensure that all the needed directories are present 328a962de47SPeter Wemm# 329a962de47SPeter Wemmhierarchy: 330a962de47SPeter Wemm cd ${.CURDIR}/etc && ${MAKE} distrib-dirs 331a962de47SPeter Wemm 332a962de47SPeter Wemm# 333a962de47SPeter Wemm# mk - update the /usr/share/mk makefiles. 334a962de47SPeter Wemm# 3353540f0e1SJordan K. Hubbardmk: 3363540f0e1SJordan K. Hubbard cd ${.CURDIR}/share/mk && ${MAKE} install 3373540f0e1SJordan K. Hubbard 338a962de47SPeter Wemm# 339a962de47SPeter Wemm# bootstrap - [re]build tools needed to run the actual build, this includes 340a962de47SPeter Wemm# tools needed by 'make depend', as some tools are needed to generate source 341a962de47SPeter Wemm# for the dependency information to be gathered from. 342a962de47SPeter Wemm# 343a962de47SPeter Wemmbootstrap: 344a962de47SPeter Wemm cd ${.CURDIR}/usr.bin/make && ${MAKE} depend && \ 345a962de47SPeter Wemm ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 346a962de47SPeter Wemm cd ${.CURDIR}/usr.bin/xinstall && ${MAKE} depend && \ 347a962de47SPeter Wemm ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 348a962de47SPeter Wemm cd ${.CURDIR}/usr.bin/lex && ${MAKE} bootstrap && ${MAKE} depend && \ 349a962de47SPeter Wemm ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 350a962de47SPeter Wemm 351a962de47SPeter Wemm# 352a962de47SPeter Wemm# include-tools - generally the same as 'bootstrap', except that it's for 353a962de47SPeter Wemm# things that are specifically needed to generate include files. 354a962de47SPeter Wemm# 355a962de47SPeter Wemm# XXX should be merged with bootstrap, it's not worth keeeping them seperate 356a962de47SPeter Wemm# 357a962de47SPeter Wemminclude-tools: 358a962de47SPeter Wemm cd ${.CURDIR}/usr.bin/rpcgen && ${MAKE} depend && \ 359a962de47SPeter Wemm ${MAKE} ${MK_FLAGS} depend all install ${CLEANDIR} ${OBJDIR} 360a962de47SPeter Wemm 361a962de47SPeter Wemm# 362a962de47SPeter Wemm# includes - possibly generate and install the include files. 363a962de47SPeter Wemm# 3645b16f1c5SPeter Wemmincludes: 3653540f0e1SJordan K. Hubbard.if defined(CLOBBER) 3665a9e9cbaSRodney W. Grimes rm -rf ${DESTDIR}/usr/include/* 3675a9e9cbaSRodney W. Grimes mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ 3685a9e9cbaSRodney W. Grimes -p ${DESTDIR}/usr/include 3693540f0e1SJordan K. Hubbard.endif 3703540f0e1SJordan K. Hubbard cd ${.CURDIR}/include && ${MAKE} install 3718046c4e2SAndrey A. Chernov cd ${.CURDIR}/gnu/include && ${MAKE} install 372499fec7fSRodney W. Grimes cd ${.CURDIR}/gnu/lib/libreadline && ${MAKE} beforeinstall 3737cd21d19SNate Williams cd ${.CURDIR}/gnu/lib/libregex && ${MAKE} beforeinstall 374499fec7fSRodney W. Grimes cd ${.CURDIR}/gnu/lib/libg++ && ${MAKE} beforeinstall 3754affe09bSAndrey A. Chernov cd ${.CURDIR}/gnu/lib/libdialog && ${MAKE} beforeinstall 376c368d11dSGeoff Rehmet.if exists(eBones) && !defined(NOCRYPT) && defined(MAKE_EBONES) 377c368d11dSGeoff Rehmet cd ${.CURDIR}/eBones/include && ${MAKE} beforeinstall 378a95f76aaSJordan K. Hubbard cd ${.CURDIR}/eBones/lib/libkrb && ${MAKE} beforeinstall 379c2e64318SJordan K. Hubbard cd ${.CURDIR}/eBones/lib/libkadm && ${MAKE} beforeinstall 380c368d11dSGeoff Rehmet.endif 3813540f0e1SJordan K. Hubbard cd ${.CURDIR}/lib/libc && ${MAKE} beforeinstall 3823540f0e1SJordan K. Hubbard cd ${.CURDIR}/lib/libcurses && ${MAKE} beforeinstall 3833540f0e1SJordan K. Hubbard cd ${.CURDIR}/lib/libedit && ${MAKE} beforeinstall 3842edcca74SNate Williams cd ${.CURDIR}/lib/libftpio && ${MAKE} beforeinstall 385267994deSPoul-Henning Kamp cd ${.CURDIR}/lib/libmd && ${MAKE} beforeinstall 38633c4dab4SAndrey A. Chernov cd ${.CURDIR}/lib/libmytinfo && ${MAKE} beforeinstall 38733c4dab4SAndrey A. Chernov cd ${.CURDIR}/lib/libncurses && ${MAKE} beforeinstall 3882c0e14c2SRodney W. Grimes.if !defined(WANT_CSRG_LIBM) 389b8afcd33SPaul Richards cd ${.CURDIR}/lib/msun && ${MAKE} beforeinstall 390b8afcd33SPaul Richards.endif 3913cc5ba43SAndreas Schulz cd ${.CURDIR}/lib/libpcap && ${MAKE} beforeinstall 3923540f0e1SJordan K. Hubbard cd ${.CURDIR}/lib/librpcsvc && ${MAKE} beforeinstall 3939687bf0bSPaul Traina cd ${.CURDIR}/lib/libskey && ${MAKE} beforeinstall 3945e72817cSPoul-Henning Kamp cd ${.CURDIR}/lib/libtcl && ${MAKE} beforeinstall 3955426275fSAndrey A. Chernov cd ${.CURDIR}/lib/libtermcap && ${MAKE} beforeinstall 396401de747SGarrett Wollman cd ${.CURDIR}/lib/libcom_err && ${MAKE} beforeinstall 39741be2d70SGarrett Wollman cd ${.CURDIR}/lib/libss && ${MAKE} beforeinstall 398b3e643c1SAndrey A. Chernov cd ${.CURDIR}/lib/libscsi && ${MAKE} beforeinstall 399358a579fSPeter Wemm cd ${.CURDIR}/lib/libutil && ${MAKE} beforeinstall 4003540f0e1SJordan K. Hubbard 401a962de47SPeter Wemm# 402a962de47SPeter Wemm# lib-tools - build tools to compile and install the libraries. 403a962de47SPeter Wemm# 40465b94a0dSNate Williamslib-tools: 405a962de47SPeter Wemm cd ${.CURDIR}/gnu/usr.bin/ld && ${MAKE} depend && \ 406a962de47SPeter Wemm ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 407a962de47SPeter Wemm cd ${.CURDIR}/usr.bin/ar && ${MAKE} depend && \ 408a962de47SPeter Wemm ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 409a962de47SPeter Wemm cd ${.CURDIR}/usr.bin/ranlib && ${MAKE} depend && \ 410a962de47SPeter Wemm ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 411a962de47SPeter Wemm cd ${.CURDIR}/usr.bin/nm && ${MAKE} depend && \ 412a962de47SPeter Wemm ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 413a962de47SPeter Wemm cd ${.CURDIR}/usr.bin/lex/lib && ${MAKE} depend && \ 414a962de47SPeter Wemm ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 415a962de47SPeter Wemm cd ${.CURDIR}/usr.bin/compile_et && ${MAKE} depend && \ 416a962de47SPeter Wemm ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} && \ 417562e312dSGarrett Wollman rm -f /usr/sbin/compile_et 418a962de47SPeter Wemm cd ${.CURDIR}/usr.bin/mk_cmds && ${MAKE} depend && \ 419a962de47SPeter Wemm ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 42065b94a0dSNate Williams 421a962de47SPeter Wemm# 422a962de47SPeter Wemm# libraries - build and install the libraries 423a962de47SPeter Wemm# 4243540f0e1SJordan K. Hubbardlibraries: 425a22c4568SRodney W. Grimes.if exists(lib/libcompat) 426a962de47SPeter Wemm cd ${.CURDIR}/lib/libcompat && ${MAKE} depend && \ 427a962de47SPeter Wemm ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 428a22c4568SRodney W. Grimes.endif 429b6333deaSRodney W. Grimes.if exists(lib/libncurses) 430a962de47SPeter Wemm cd ${.CURDIR}/lib/libncurses && ${MAKE} depend && \ 431a962de47SPeter Wemm ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 432b6333deaSRodney W. Grimes.endif 433b6333deaSRodney W. Grimes.if exists(lib/libtermcap) 434a962de47SPeter Wemm cd ${.CURDIR}/lib/libtermcap && ${MAKE} depend && \ 435a962de47SPeter Wemm ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 4362a407ae5SGeoff Rehmet.endif 43758b3334fSPaul Richards.if exists(lib) 438a962de47SPeter Wemm cd ${.CURDIR}/lib/csu/i386 && ${MAKE} depend && \ 439a962de47SPeter Wemm ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 440a962de47SPeter Wemm.endif 441a962de47SPeter Wemm.if exists(gnu) 442a962de47SPeter Wemm cd ${.CURDIR}/gnu/lib && ${MAKE} depend && \ 443a962de47SPeter Wemm ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 444a962de47SPeter Wemm cd ${.CURDIR}/gnu/usr.bin/cc/libgcc && ${MAKE} depend && \ 445a962de47SPeter Wemm ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 446a962de47SPeter Wemm.endif 447a962de47SPeter Wemm.if exists(secure) && !defined(NOCRYPT) && !defined(NOSECURE) 448a962de47SPeter Wemm cd ${.CURDIR}/secure/lib && ${MAKE} depend && \ 449a962de47SPeter Wemm ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 450a962de47SPeter Wemm.endif 451a962de47SPeter Wemm.if exists(lib) 452a962de47SPeter Wemm cd ${.CURDIR}/lib && ${MAKE} depend && \ 453a962de47SPeter Wemm ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 45458b3334fSPaul Richards.endif 45589f044ebSJames Raynard.if exists(usr.bin/lex/lib) 456a962de47SPeter Wemm cd ${.CURDIR}/usr.bin/lex/lib && ${MAKE} depend && \ 457a962de47SPeter Wemm ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 4587c0553d9SNate Williams.endif 459c368d11dSGeoff Rehmet.if exists(eBones) && !defined(NOCRYPT) && defined(MAKE_EBONES) 460a962de47SPeter Wemm cd ${.CURDIR}/eBones/lib && ${MAKE} depend && \ 461a962de47SPeter Wemm ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 46272181495SGeoff Rehmet.endif 463361b945dSRodney W. Grimes.if exists(usr.sbin/pcvt/keycap) 464a962de47SPeter Wemm cd ${.CURDIR}/usr.sbin/pcvt/keycap && ${MAKE} depend && \ 465a962de47SPeter Wemm ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 466361b945dSRodney W. Grimes.endif 4673540f0e1SJordan K. Hubbard 468a962de47SPeter Wemm# 469a962de47SPeter Wemm# build-tools - build and install any other tools needed to complete the 470a962de47SPeter Wemm# compile and install. 471a962de47SPeter Wemm# 4722e10cdcdSPoul-Henning Kampbuild-tools: 473a962de47SPeter Wemm cd ${.CURDIR}/gnu/usr.bin/cc && ${MAKE} depend && \ 474a962de47SPeter Wemm ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 475a962de47SPeter Wemm cd ${.CURDIR}/usr.bin/symorder && ${MAKE} depend && \ 476a962de47SPeter Wemm ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 477a962de47SPeter Wemm cd ${.CURDIR}/usr.bin/sgmlfmt && ${MAKE} depend && \ 478a962de47SPeter Wemm ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 479a962de47SPeter Wemm cd ${.CURDIR}/share/sgml && ${MAKE} depend && \ 480a962de47SPeter Wemm ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 481a962de47SPeter Wemm cd ${.CURDIR}/usr.sbin/zic && ${MAKE} depend && \ 482a962de47SPeter Wemm ${MAKE} ${MK_FLAGS} all install ${CLEANDIR} ${OBJDIR} 4833540f0e1SJordan K. Hubbard 484c3d9b0f0SRodney W. Grimes.include <bsd.subdir.mk> 485