Makefile revision 1.109
11.109Scjs# $NetBSD: Makefile,v 1.109 2000/03/08 00:50:05 cjs Exp $ 21.95Scjs 31.95Scjs# This is the top-level makefile for building NetBSD. For an outline of 41.95Scjs# how to build a snapshot or release, as well as other release engineering 51.95Scjs# information, see http://www.netbsd.org/developers/releng/index.html 61.95Scjs# 71.95Scjs# Not everything you can set or do is documented in this makefile. In 81.95Scjs# particular, you should review the files in /usr/share/mk (especially 91.95Scjs# bsd.README) for general information on building programs and writing 101.95Scjs# Makefiles within this structure, and see the comments in src/etc/Makefile 111.95Scjs# for further information on installation and release set options. 121.95Scjs# 131.95Scjs# Variables listed below can be set on the make command line (highest 141.95Scjs# priority), in /etc/mk.conf (middle priority), or in the environment 151.95Scjs# (lowest priority). 161.95Scjs# 171.95Scjs# Variables: 181.101Ssommerfe# DESTDIR is the target directory for installation of the compiled 191.101Ssommerfe# software. It defaults to /. Note that programs are built against 201.101Ssommerfe# libraries installed in DESTDIR. 211.95Scjs# MKMAN, if set to `no', will prevent building of manual pages. 221.101Ssommerfe# MKOBJDIRS, if not set to `no', will build object directories at 231.101Ssommerfe# an appropriate point in a build. 241.95Scjs# MKSHARE, if set to `no', will prevent building and installing 251.95Scjs# anything in /usr/share. 261.101Ssommerfe# NBUILDJOBS is the number of jobs to start in parallel during a 271.101Ssommerfe# 'make build'. It defaults to 1. 281.95Scjs# UPDATE will avoid a `make cleandir' at the start of `make build', 291.95Scjs# as well as having the effects listed in /usr/share/mk/bsd.README. 301.95Scjs# 311.95Scjs# Targets: 321.95Scjs# build: builds a full release of netbsd in DESTDIR. 331.95Scjs# release: does a `make build,' and then tars up the DESTDIR files 341.95Scjs# into RELEASEDIR, in release(7) format. (See etc/Makefile for 351.95Scjs# more information on this.) 361.95Scjs# snapshot: a synonym for release. 371.32Scgd 381.106SaidanSRCTOP=. 391.106Saidan.include <bsd.crypto.mk> # for configuration variables. 401.106Saidan 411.106Saidan.if defined(CRYPTOPATH) 421.106Saidan.sinclude "${CRYPTOPATH}/Makefile.frag" 431.106Saidan.endif 441.4Scgd 451.100SsommerfeMKOBJDIRS ?= no 461.58StvHAVE_GCC28!= ${CXX} --version | egrep "^(2\.8|egcs)" ; echo 471.58Stv 481.76Sbouyer.if defined(NBUILDJOBS) 491.76Sbouyer_J= -j${NBUILDJOBS} 501.76Sbouyer.endif 511.76Sbouyer 521.4Scgd# NOTE THAT etc *DOES NOT* BELONG IN THE LIST BELOW 531.2Scgd 541.52SmycroftSUBDIR+= lib include bin libexec sbin usr.bin usr.sbin share sys 551.109Scjs.if make(obj) 561.109ScjsSUBDIR+= distrib 571.109Scjs.endif 581.105Sassar 591.105Sassarincludes-lib: includes-include includes-sys 601.36Sexplorer 611.36Sexplorer.if exists(games) 621.36SexplorerSUBDIR+= games 631.36Sexplorer.endif 641.36Sexplorer 651.8ScgdSUBDIR+= gnu 661.52Smycroft# This is needed for libstdc++ and gen-params. 671.52Smycroftincludes-gnu: includes-include includes-sys 681.21Scgd 691.13Sbrezak.if exists(regress) 701.9Scgd.ifmake !(install) 711.9ScgdSUBDIR+= regress 721.9Scgd.endif 731.9Scgd 741.10Scgdregression-tests: 751.10Scgd @echo Running regression tests... 761.22Scgd @(cd ${.CURDIR}/regress && ${MAKE} regress) 771.13Sbrezak.endif 781.20Scgd 791.108Serhbuildmsg: 801.45Sperry @echo -n "Build started at: " 811.45Sperry @date 821.108Serh 831.108Serhbeforeinstall: 841.26Stls.ifndef DESTDIR 851.26Stls (cd ${.CURDIR}/etc && ${MAKE} DESTDIR=/ distrib-dirs) 861.31Stls.else 871.31Stls (cd ${.CURDIR}/etc && ${MAKE} distrib-dirs) 881.26Stls.endif 891.15Scgd 901.15Scgdafterinstall: 911.86Slukem.if ${MKMAN} != "no" && !defined(_BUILD) 921.81Sscottr ${MAKE} whatis.db 931.81Sscottr.endif 941.81Sscottr 951.81Sscottrwhatis.db: 961.22Scgd (cd ${.CURDIR}/share/man && ${MAKE} makedb) 971.15Scgd 981.84Stv# wrt info/dir below: It's safe to move this over top of /usr/share/info/dir, 991.84Stv# as the build will automatically remove/replace the non-pkg entries there. 1001.84Stv 1011.108Serhbuild: buildmsg beforeinstall 1021.96Sscottr.if defined(FORCE_DOMESTIC) 1031.96Sscottr @echo '*** CAPUTE!' 1041.96Sscottr @echo ' The FORCE_DOMESTIC flag is not compatible with "make build".' 1051.96Sscottr @echo ' Please correct the problem and try again.' 1061.96Sscottr @false 1071.96Sscottr.endif 1081.86Slukem.if ${MKSHARE} != "no" 1091.32Scgd (cd ${.CURDIR}/share/mk && ${MAKE} install) 1101.68Slukem.endif 1111.39Schristos.if !defined(UPDATE) 1121.17Scgd ${MAKE} cleandir 1131.39Schristos.endif 1141.103Ssimonb.if ${MKOBJDIRS} != "no" 1151.103Ssimonb ${MAKE} obj 1161.103Ssimonb.endif 1171.75Stv.if empty(HAVE_GCC28) 1181.71Smycroft.if defined(DESTDIR) 1191.71Smycroft @echo "*** CAPUTE!" 1201.84Stv @echo " You attempted to compile the world without egcs. You must" 1211.71Smycroft @echo " first install a native egcs compiler." 1221.84Stv @false 1231.71Smycroft.else 1241.71Smycroft (cd ${.CURDIR}/gnu/usr.bin/egcs && \ 1251.99Sperry ${MAKE} ${_J} dependall MKMAN=no && \ 1261.86Slukem ${MAKE} MKMAN=no install && ${MAKE} cleandir) 1271.71Smycroft.endif 1281.71Smycroft.endif 1291.93Sscottr ${MAKE} includes 1301.61Smycroft (cd ${.CURDIR}/lib/csu && \ 1311.107Smycroft ${MAKE} ${_J} MKMAN=no dependall && \ 1321.86Slukem ${MAKE} MKMAN=no install) 1331.61Smycroft (cd ${.CURDIR}/lib && \ 1341.107Smycroft ${MAKE} ${_J} MKMAN=no dependall && \ 1351.86Slukem ${MAKE} MKMAN=no install) 1361.61Smycroft (cd ${.CURDIR}/gnu/lib && \ 1371.107Smycroft ${MAKE} ${_J} MKMAN=no MKINFO=no dependall && \ 1381.89Smellon ${MAKE} MKMAN=no MKINFO=no install) 1391.106Saidan.if target(cryptobuild) 1401.106Saidan ${MAKE} ${_J} cryptobuild 1411.103Ssimonb.endif 1421.99Sperry ${MAKE} ${_J} dependall && ${MAKE} _BUILD= install 1431.97Schristos.if defined(DOMESTIC) && !defined(EXPORTABLE_SYSTEM) 1441.97Schristos (cd ${.CURDIR}/${DOMESTIC} && ${MAKE} ${_J} _SLAVE_BUILD= build) 1451.49Slukem.endif 1461.81Sscottr ${MAKE} whatis.db 1471.50Smellon @echo -n "Build finished at: " 1481.50Smellon @date 1491.87Scjs 1501.87Scjsrelease snapshot: build 1511.91Sscottr (cd ${.CURDIR}/etc && ${MAKE} INSTALL_DONE=1 release) 1521.1Scgd 1531.1Scgd.include <bsd.subdir.mk> 154