Makefile revision 1.281
11.281Splunky# $NetBSD: Makefile,v 1.281 2010/12/03 21:38:46 plunky Exp $ 21.95Scjs 31.193Slukem# 41.95Scjs# This is the top-level makefile for building NetBSD. For an outline of 51.95Scjs# how to build a snapshot or release, as well as other release engineering 61.221Ssalo# information, see http://www.NetBSD.org/developers/releng/index.html 71.95Scjs# 81.95Scjs# Not everything you can set or do is documented in this makefile. In 91.95Scjs# particular, you should review the files in /usr/share/mk (especially 101.95Scjs# bsd.README) for general information on building programs and writing 111.95Scjs# Makefiles within this structure, and see the comments in src/etc/Makefile 121.95Scjs# for further information on installation and release set options. 131.95Scjs# 141.95Scjs# Variables listed below can be set on the make command line (highest 151.95Scjs# priority), in /etc/mk.conf (middle priority), or in the environment 161.95Scjs# (lowest priority). 171.95Scjs# 181.95Scjs# Variables: 191.101Ssommerfe# DESTDIR is the target directory for installation of the compiled 201.101Ssommerfe# software. It defaults to /. Note that programs are built against 211.101Ssommerfe# libraries installed in DESTDIR. 221.214Slukem# MKMAN, if `no', will prevent building of manual pages. 231.214Slukem# MKOBJDIRS, if not `no', will build object directories at 241.101Ssommerfe# an appropriate point in a build. 251.214Slukem# MKSHARE, if `no', will prevent building and installing 261.95Scjs# anything in /usr/share. 271.214Slukem# MKUPDATE, if not `no', will avoid a `make cleandir' at the start of 281.178Senami# `make build', as well as having the effects listed in 291.178Senami# /usr/share/mk/bsd.README. 301.125Smrg# NOCLEANDIR, if defined, will avoid a `make cleandir' at the start 311.178Senami# of the `make build'. 321.119Stoddpw# NOINCLUDES will avoid the `make includes' usually done by `make build'. 331.95Scjs# 341.214Slukem# See mk.conf(5) for more details. 351.214Slukem# 361.214Slukem# 371.95Scjs# Targets: 381.137Stv# build: 391.196Slukem# Builds a full release of NetBSD in DESTDIR, except for the 401.196Slukem# /etc configuration files. 411.196Slukem# If BUILD_DONE is set, this is an empty target. 421.196Slukem# distribution: 431.196Slukem# Builds a full release of NetBSD in DESTDIR, including the /etc 441.196Slukem# configuration files. 451.196Slukem# buildworld: 461.196Slukem# As per `make distribution', except that it ensures that DESTDIR 471.196Slukem# is not the root directory. 481.196Slukem# installworld: 491.196Slukem# Install the distribution from DESTDIR to INSTALLWORLDDIR (which 501.196Slukem# defaults to the root directory). Ensures that INSTALLWORLDDIR 511.196Slukem# is the not root directory if cross compiling. 521.137Stv# release: 531.240Slukem# Does a `make distribution', and then tars up the DESTDIR files 541.252Slukem# into ${RELEASEDIR}/${RELEASEMACHINEDIR}, in release(7) format. 551.196Slukem# (See etc/Makefile for more information on this.) 561.137Stv# regression-tests: 571.137Stv# Runs the regression tests in "regress" on this host. 581.206Slukem# sets: 591.252Slukem# Populate ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/sets 601.252Slukem# from ${DESTDIR} 611.206Slukem# sourcesets: 621.206Slukem# Populate ${RELEASEDIR}/source/sets from ${NETBSDSRCDIR} 631.241Sapb# syspkgs: 641.252Slukem# Populate ${RELEASEDIR}/${RELEASEMACHINEDIR}/binary/syspkgs 651.252Slukem# from ${DESTDIR} 661.243Sapb# iso-image: 671.248Sjnemeth# Create CD-ROM image in RELEASEDIR/iso. 681.243Sapb# RELEASEDIR must already have been populated by `make release' 691.243Sapb# or equivalent. 701.248Sjnemeth# iso-image-source: 711.248Sjnemeth# Create CD-ROM image with source in RELEASEDIR/iso. 721.248Sjnemeth# RELEASEDIR must already have been populated by 731.248Sjnemeth# `make release sourcesets' or equivalent. 741.123Smrg# 751.137Stv# Targets invoked by `make build,' in order: 761.155Stv# cleandir: cleans the tree. 771.261Sapb# do-top-obj: creates the top level object directory. 781.260Sapb# do-tools-obj: creates object directories for the host toolchain. 791.260Sapb# do-tools: builds host toolchain. 801.137Stv# obj: creates object directories. 811.208Slukem# do-distrib-dirs: creates the distribution directories. 821.208Slukem# includes: installs include files. 831.202Sthorpej# do-tools-compat: builds the "libnbcompat" library; needed for some 841.202Sthorpej# random host tool programs in the source tree. 851.238Slukem# do-lib-csu: builds and installs prerequisites from lib/csu. 861.249Slukem# do-libgcc: builds and installs prerequisites from 871.249Slukem# gnu/lib/crtstuff${LIBGCC_EXT} (if necessary) and 881.249Slukem# gnu/lib/libgcc${LIBGCC_EXT}. 891.256Sgmcgarry# do-libpcc: builds and install prerequisites from 901.280Sskrll# external/bsd/pcc/crtstuff (if necessary) and 911.280Sskrll# external/bsd/pcc/libpcc. 921.186Sthorpej# do-lib-libc: builds and installs prerequisites from lib/libc. 931.143Stv# do-lib: builds and installs prerequisites from lib. 941.274Spooka# do-sys-rump-dev-lib: builds and installs prerequisites from sys/rump/dev/lib 951.259Spooka# do-sys-rump-fs-lib: builds and installs prerequisites from sys/rump/fs/lib 961.277Spooka# do-sys-rump-kern-lib: builds and installs prereq. from sys/rump/kern/lib 971.259Spooka# do-sys-rump-net-lib: builds and installs prerequisites from sys/rump/net/lib 981.265Spooka# do-sys-modules: builds and installs kernel modules (used by rump binaries) 991.189Sitohy# do-ld.so: builds and installs prerequisites from libexec/ld.*_so. 1001.262Smrg# do-compat-lib-csu: builds and installs prerequisites from compat/lib/csu 1011.262Smrg# if ${MKCOMPAT} != "no". 1021.262Smrg# do-compat-libgcc: builds and installs prerequisites from 1031.262Smrg# compat/gnu/lib/crtstuff${LIBGCC_EXT} (if necessary) and 1041.262Smrg# compat/gnu/lib/libgcc${LIBGCC_EXT} if ${MKCOMPAT} != "no". 1051.262Smrg# do-compat-lib-libc: builds and installs prerequisites from compat/lib/libc 1061.262Smrg# if ${MKCOMPAT} != "no". 1071.137Stv# do-build: builds and installs the entire system. 1081.263Smrg# do-x11: builds and installs X11 if ${MKX11} != "no"; either 1091.263Smrg# X11R7 from src/external/mit/xorg if ${X11FLAVOUR} == "Xorg" 1101.263Smrg# or X11R6 from src/x11 1111.275Suebayasi# do-extsrc: builds and installs extsrc if ${MKEXTSRC} != "no". 1121.222Slukem# do-obsolete: installs the obsolete sets (for the postinstall-* targets). 1131.193Slukem# 1141.32Scgd 1151.146Stv.if ${.MAKEFLAGS:M${.CURDIR}/share/mk} == "" 1161.146Stv.MAKEFLAGS: -m ${.CURDIR}/share/mk 1171.146Stv.endif 1181.163Stv 1191.193Slukem# 1201.163Stv# If _SRC_TOP_OBJ_ gets set here, we will end up with a directory that may 1211.163Stv# not be the top level objdir, because "make obj" can happen in the *middle* 1221.163Stv# of "make build" (long after <bsd.own.mk> is calculated it). So, pre-set 1231.163Stv# _SRC_TOP_OBJ_ here so it will not be added to ${.MAKEOVERRIDES}. 1241.193Slukem# 1251.163Stv_SRC_TOP_OBJ_= 1261.148Sjmc 1271.146Stv.include <bsd.own.mk> 1281.4Scgd 1291.193Slukem# 1301.137Stv# Sanity check: make sure that "make build" is not invoked simultaneously 1311.137Stv# with a standard recursive target. 1321.193Slukem# 1331.137Stv 1341.137Stv.if make(build) || make(release) || make(snapshot) 1351.137Stv.for targ in ${TARGETS:Nobj:Ncleandir} 1361.137Stv.if make(${targ}) && !target(.BEGIN) 1371.137Stv.BEGIN: 1381.137Stv @echo 'BUILD ABORTED: "make build" and "make ${targ}" are mutually exclusive.' 1391.137Stv @false 1401.137Stv.endif 1411.137Stv.endfor 1421.137Stv.endif 1431.58Stv 1441.261Sapb# 1451.261Sapb# _SUBDIR is used to set SUBDIR, after removing directories that have 1461.261Sapb# BUILD_${dir}=no, or that have no ${dir}/Makefile. 1471.261Sapb# 1481.271Schristos_SUBDIR= tools lib include gnu external crypto/external bin games 1491.271Schristos_SUBDIR+= libexec sbin usr.bin 1501.262Smrg_SUBDIR+= usr.sbin share rescue sys etc tests compat .WAIT distrib regress 1511.105Sassar 1521.137Stv.for dir in ${_SUBDIR} 1531.261Sapb.if "${dir}" == ".WAIT" \ 1541.261Sapb || (${BUILD_${dir}:Uyes} != "no" && exists(${dir}/Makefile)) 1551.137StvSUBDIR+= ${dir} 1561.36Sexplorer.endif 1571.137Stv.endfor 1581.21Scgd 1591.13Sbrezak.if exists(regress) 1601.242Sdslregression-tests: .PHONY .MAKE 1611.10Scgd @echo Running regression tests... 1621.232Slukem ${MAKEDIRTARGET} regress regress 1631.13Sbrezak.endif 1641.20Scgd 1651.214Slukem.if ${MKUNPRIVED} != "no" 1661.179SthorpejNOPOSTINSTALL= # defined 1671.179Sthorpej.endif 1681.179Sthorpej 1691.242Sdslafterinstall: .PHONY .MAKE 1701.137Stv.if ${MKMAN} != "no" 1711.232Slukem ${MAKEDIRTARGET} share/man makedb 1721.137Stv.endif 1731.214Slukem.if (${MKUNPRIVED} != "no" && ${MKINFO} != "no") 1741.232Slukem ${MAKEDIRTARGET} gnu/usr.bin/texinfo/install-info infodir-meta 1751.176Slukem.endif 1761.179Sthorpej.if !defined(NOPOSTINSTALL) 1771.232Slukem ${MAKEDIRTARGET} . postinstall-check 1781.159Sperry.endif 1791.170Slukem 1801.239Slukem_POSTINSTALL= ${.CURDIR}/usr.sbin/postinstall/postinstall 1811.239Slukem 1821.228Slukempostinstall-check: .PHONY 1831.169Slukem @echo " === Post installation checks ===" 1841.268Ssketch AWK=${TOOL_AWK:Q} MAKE=${MAKE:Q} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} -d ${DESTDIR}/ check; if [ $$? -gt 1 ]; then exit 1; fi 1851.171Slukem @echo " ================================" 1861.171Slukem 1871.228Slukempostinstall-fix: .NOTMAIN .PHONY 1881.171Slukem @echo " === Post installation fixes ===" 1891.268Ssketch AWK=${TOOL_AWK:Q} MAKE=${MAKE:Q} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} -d ${DESTDIR}/ fix 1901.212Slukem @echo " ===============================" 1911.212Slukem 1921.228Slukempostinstall-fix-obsolete: .NOTMAIN .PHONY 1931.212Slukem @echo " === Removing obsolete files ===" 1941.268Ssketch AWK=${TOOL_AWK:Q} MAKE=${MAKE:Q} ${HOST_SH} ${_POSTINSTALL} -s ${.CURDIR} -d ${DESTDIR}/ fix obsolete 1951.212Slukem @echo " ===============================" 1961.169Slukem 1971.108Serh 1981.193Slukem# 1991.137Stv# Targets (in order!) called by "make build". 2001.193Slukem# 2011.256Sgmcgarry.if defined(HAVE_GCC) 2021.245Smrg.if ${HAVE_GCC} == "3" 2031.220SmrgLIBGCC_EXT=3 2041.245Smrg.else 2051.244SmrgLIBGCC_EXT=4 2061.220Smrg.endif 2071.256Sgmcgarry.endif 2081.123Smrg 2091.156StvBUILDTARGETS+= check-tools 2101.214Slukem.if ${MKUPDATE} == "no" && !defined(NOCLEANDIR) 2111.155StvBUILDTARGETS+= cleandir 2121.155Stv.endif 2131.261Sapb.if ${MKOBJDIRS} != "no" 2141.261SapbBUILDTARGETS+= do-top-obj 2151.261Sapb.endif 2161.261Sapb.if ${USETOOLS} == "yes" # { 2171.149Stv.if ${MKOBJDIRS} != "no" 2181.260SapbBUILDTARGETS+= do-tools-obj 2191.123Smrg.endif 2201.152StvBUILDTARGETS+= do-tools 2211.261Sapb.endif # USETOOLS # } 2221.260Sapb.if ${MKOBJDIRS} != "no" 2231.260SapbBUILDTARGETS+= obj 2241.260Sapb.endif 2251.270SapbBUILDTARGETS+= clean_METALOG 2261.137Stv.if !defined(NODISTRIBDIRS) 2271.137StvBUILDTARGETS+= do-distrib-dirs 2281.131Stv.endif 2291.137Stv.if !defined(NOINCLUDES) 2301.137StvBUILDTARGETS+= includes 2311.131Stv.endif 2321.202SthorpejBUILDTARGETS+= do-tools-compat 2331.231SskrllBUILDTARGETS+= do-lib-csu 2341.207Sdrochner.if ${MKGCC} != "no" 2351.249SlukemBUILDTARGETS+= do-libgcc 2361.207Sdrochner.endif 2371.256Sgmcgarry.if ${MKPCC} != "no" 2381.256SgmcgarryBUILDTARGET+= do-libpcc 2391.256Sgmcgarry.endif 2401.231SskrllBUILDTARGETS+= do-lib-libc 2411.281SplunkyBUILDTARGETS+= do-lib 2421.273Sdyoung.if (${MACHINE} != "evbppc") && ${MKKMOD} != "no" 2431.265SpookaBUILDTARGETS+= do-sys-modules 2441.265Spooka.endif 2451.277SpookaBUILDTARGETS+= do-sys-rump-dev-lib do-sys-rump-fs-lib 2461.277SpookaBUILDTARGETS+= do-sys-rump-kern-lib do-sys-rump-net-lib 2471.262Smrg.if ${MKCOMPAT} != "no" 2481.262SmrgBUILDTARGETS+= do-compat-lib-csu 2491.262SmrgBUILDTARGETS+= do-compat-libgcc 2501.262SmrgBUILDTARGETS+= do-compat-lib-libc 2511.262Smrg.endif 2521.224SlukemBUILDTARGETS+= do-ld.so 2531.224SlukemBUILDTARGETS+= do-build 2541.263Smrg.if ${MKX11} != "no" 2551.227SlukemBUILDTARGETS+= do-x11 2561.227Slukem.endif 2571.275Suebayasi.if ${MKEXTSRC} != "no" 2581.275SuebayasiBUILDTARGETS+= do-extsrc 2591.275Suebayasi.endif 2601.200SlukemBUILDTARGETS+= do-obsolete 2611.131Stv 2621.193Slukem# 2631.137Stv# Enforce proper ordering of some rules. 2641.193Slukem# 2651.123Smrg 2661.137Stv.ORDER: ${BUILDTARGETS} 2671.228Slukemincludes-lib: .PHONY includes-include includes-sys 2681.228Slukemincludes-gnu: .PHONY includes-lib 2691.123Smrg 2701.193Slukem# 2711.137Stv# Build the system and install into DESTDIR. 2721.193Slukem# 2731.123Smrg 2741.191SlukemSTART_TIME!= date 2751.191Slukem 2761.242Sdslbuild: .PHONY .MAKE 2771.137Stv.if defined(BUILD_DONE) 2781.137Stv @echo "Build already installed into ${DESTDIR}" 2791.137Stv.else 2801.191Slukem @echo "Build started at: ${START_TIME}" 2811.145Stv.for tgt in ${BUILDTARGETS} 2821.232Slukem ${MAKEDIRTARGET} . ${tgt} 2831.145Stv.endfor 2841.232Slukem ${MAKEDIRTARGET} etc install-etc-release 2851.191Slukem @echo "Build started at: ${START_TIME}" 2861.172Sbjh21 @printf "Build finished at: " && date 2871.71Smycroft.endif 2881.160Sthorpej 2891.193Slukem# 2901.160Sthorpej# Build a full distribution, but not a release (i.e. no sets into 2911.193Slukem# ${RELEASEDIR}). "buildworld" enforces a build to ${DESTDIR} != / 2921.193Slukem# 2931.160Sthorpej 2941.242Sdsldistribution buildworld: .PHONY .MAKE 2951.194Slukem.if make(buildworld) && \ 2961.194Slukem (!defined(DESTDIR) || ${DESTDIR} == "" || ${DESTDIR} == "/") 2971.193Slukem @echo "Won't make ${.TARGET} with DESTDIR=/" 2981.193Slukem @false 2991.193Slukem.endif 3001.232Slukem ${MAKEDIRTARGET} . build NOPOSTINSTALL=1 3011.232Slukem ${MAKEDIRTARGET} etc distribution INSTALL_DONE=1 3021.181Sthorpej.if defined(DESTDIR) && ${DESTDIR} != "" && ${DESTDIR} != "/" 3031.232Slukem ${MAKEDIRTARGET} . postinstall-fix-obsolete 3041.232Slukem ${MAKEDIRTARGET} distrib/sets checkflist 3051.181Sthorpej.endif 3061.192Slukem @echo "make ${.TARGET} started at: ${START_TIME}" 3071.185Slukem @printf "make ${.TARGET} finished at: " && date 3081.123Smrg 3091.193Slukem# 3101.193Slukem# Install the distribution from $DESTDIR to $INSTALLWORLDDIR (defaults to `/') 3111.193Slukem# If installing to /, ensures that the host's operating system is NetBSD and 3121.193Slukem# the host's `uname -m` == ${MACHINE}. 3131.193Slukem# 3141.193Slukem 3151.193SlukemHOST_UNAME_S!= uname -s 3161.193SlukemHOST_UNAME_M!= uname -m 3171.193Slukem 3181.242Sdslinstallworld: .PHONY .MAKE 3191.194Slukem.if (!defined(DESTDIR) || ${DESTDIR} == "" || ${DESTDIR} == "/") 3201.193Slukem @echo "Can't make ${.TARGET} to DESTDIR=/" 3211.193Slukem @false 3221.193Slukem.endif 3231.193Slukem.if !defined(INSTALLWORLDDIR) || \ 3241.193Slukem ${INSTALLWORLDDIR} == "" || ${INSTALLWORLDDIR} == "/" 3251.193Slukem.if (${HOST_UNAME_S} != "NetBSD") 3261.193Slukem @echo "Won't cross-make ${.TARGET} from ${HOST_UNAME_S} to NetBSD with INSTALLWORLDDIR=/" 3271.193Slukem @false 3281.193Slukem.endif 3291.193Slukem.if (${HOST_UNAME_M} != ${MACHINE}) 3301.193Slukem @echo "Won't cross-make ${.TARGET} from ${HOST_UNAME_M} to ${MACHINE} with INSTALLWORLDDIR=/" 3311.193Slukem @false 3321.193Slukem.endif 3331.193Slukem.endif 3341.232Slukem ${MAKEDIRTARGET} distrib/sets installsets \ 3351.232Slukem INSTALLDIR=${INSTALLWORLDDIR:U/} INSTALLSETS= 3361.232Slukem ${MAKEDIRTARGET} . postinstall-check DESTDIR=${INSTALLWORLDDIR} 3371.193Slukem @echo "make ${.TARGET} started at: ${START_TIME}" 3381.193Slukem @printf "make ${.TARGET} finished at: " && date 3391.199Slukem 3401.199Slukem# 3411.206Slukem# Create sets from $DESTDIR or $NETBSDSRCDIR into $RELEASEDIR 3421.199Slukem# 3431.199Slukem 3441.241Sapb.for tgt in sets sourcesets syspkgs 3451.242Sdsl${tgt}: .PHONY .MAKE 3461.232Slukem ${MAKEDIRTARGET} distrib/sets ${tgt} 3471.206Slukem.endfor 3481.193Slukem 3491.193Slukem# 3501.240Slukem# Build a release or snapshot (implies "make distribution"). Note that 3511.181Sthorpej# in this case, the set lists will be checked before the tar files 3521.181Sthorpej# are made. 3531.193Slukem# 3541.123Smrg 3551.242Sdslrelease snapshot: .PHONY .MAKE 3561.240Slukem ${MAKEDIRTARGET} . distribution 3571.240Slukem ${MAKEDIRTARGET} etc release DISTRIBUTION_DONE=1 3581.192Slukem @echo "make ${.TARGET} started at: ${START_TIME}" 3591.185Slukem @printf "make ${.TARGET} finished at: " && date 3601.123Smrg 3611.193Slukem# 3621.243Sapb# Create a CD-ROM image. 3631.243Sapb# 3641.243Sapb 3651.243Sapbiso-image: .PHONY 3661.247Sbouyer ${MAKEDIRTARGET} distrib iso_image 3671.243Sapb ${MAKEDIRTARGET} etc iso-image 3681.243Sapb @echo "make ${.TARGET} started at: ${START_TIME}" 3691.243Sapb @printf "make ${.TARGET} finished at: " && date 3701.243Sapb 3711.248Sjnemethiso-image-source: .PHONY 3721.248Sjnemeth ${MAKEDIRTARGET} distrib iso_image CDSOURCE=true 3731.248Sjnemeth ${MAKEDIRTARGET} etc iso-image 3741.248Sjnemeth @echo "make ${.TARGET} started at: ${START_TIME}" 3751.248Sjnemeth @printf "make ${.TARGET} finished at: " && date 3761.248Sjnemeth 3771.243Sapb# 3781.137Stv# Special components of the "make build" process. 3791.193Slukem# 3801.156Stv 3811.228Slukemcheck-tools: .PHONY 3821.223Slukem.if ${TOOLCHAIN_MISSING} != "no" && !defined(EXTERNAL_TOOLCHAIN) 3831.187Sthorpej @echo '*** WARNING: Building on MACHINE=${MACHINE} with missing toolchain.' 3841.187Sthorpej @echo '*** May result in a failed build or corrupt binaries!' 3851.187Sthorpej.elif defined(EXTERNAL_TOOLCHAIN) 3861.187Sthorpej @echo '*** Using external toolchain rooted at ${EXTERNAL_TOOLCHAIN}.' 3871.156Stv.endif 3881.173Ssommerfe.if defined(NBUILDJOBS) 3891.173Ssommerfe @echo '*** WARNING: NBUILDJOBS is obsolete; use -j directly instead!' 3901.173Ssommerfe.endif 3911.123Smrg 3921.270Sapb# Delete or sanitise a leftover METALOG from a previous build. 3931.270Sapbclean_METALOG: .PHONY .MAKE 3941.270Sapb.if ${MKUPDATE} != "no" 3951.270Sapb ${MAKEDIRTARGET} distrib/sets clean_METALOG 3961.270Sapb.endif 3971.270Sapb 3981.242Sdsldo-distrib-dirs: .PHONY .MAKE 3991.147Sjmc.if !defined(DESTDIR) || ${DESTDIR} == "" 4001.232Slukem ${MAKEDIRTARGET} etc distrib-dirs DESTDIR=/ 4011.147Sjmc.else 4021.232Slukem ${MAKEDIRTARGET} etc distrib-dirs DESTDIR=${DESTDIR} 4031.147Sjmc.endif 4041.190Slukem 4051.190Slukem.for targ in cleandir obj includes 4061.228Slukemdo-${targ}: .PHONY ${targ} 4071.190Slukem @true 4081.190Slukem.endfor 4091.123Smrg 4101.256Sgmcgarry.if defined(HAVE_GCC) 4111.280Sskrll.if ${USE_COMPILERCRTSTUFF} == "yes" 4121.256SgmcgarryBUILD_CC_LIB= gnu/lib/crtstuff${LIBGCC_EXT} 4131.280Sskrll.endif 4141.256SgmcgarryBUILD_CC_LIB+= gnu/lib/libgcc${LIBGCC_EXT} 4151.256Sgmcgarry.elif defined(HAVE_PCC) 4161.256SgmcgarryBUILD_CC_LIB+= external/bsd/pcc/crtstuff 4171.256SgmcgarryBUILD_CC_LIB+= external/bsd/pcc/libpcc 4181.256Sgmcgarry.endif 4191.256Sgmcgarry 4201.281Splunky.for dir in tools tools/compat lib/csu ${BUILD_CC_LIB} lib/libc lib sys/rump/dev/lib sys/rump/fs/lib sys/rump/kern/lib sys/rump/net/lib sys/modules 4211.242Sdsldo-${dir:S/\//-/g}: .PHONY .MAKE 4221.137Stv.for targ in dependall install 4231.232Slukem ${MAKEDIRTARGET} ${dir} ${targ} 4241.137Stv.endfor 4251.184Slukem.endfor 4261.184Slukem 4271.276Smrg.if ${MKCOMPAT} != "no" 4281.276SmrgCOMPAT_SUBDIR_LIST=lib/csu ${BUILD_CC_LIB} lib/libc 4291.276Smrg.for dir in ${COMPAT_SUBDIR_LIST} 4301.276Smrgdo-compat-${dir:S/\//-/g}: .PHONY .MAKE 4311.281Splunky.for targ in dependall install 4321.276Smrg ${MAKEDIRTARGET} compat ${targ} BOOTSTRAP_SUBDIRS="../../../${dir}" 4331.276Smrg.endfor 4341.276Smrg.endfor 4351.276Smrg.endif 4361.276Smrg 4371.261Sapbdo-top-obj: .PHONY .MAKE 4381.261Sapb ${MAKEDIRTARGET} . obj NOSUBDIR= 4391.261Sapb 4401.260Sapbdo-tools-obj: .PHONY .MAKE 4411.260Sapb ${MAKEDIRTARGET} tools obj 4421.260Sapb 4431.249Slukemdo-libgcc: .PHONY .MAKE 4441.256Sgmcgarry.if defined(HAVE_GCC) 4451.249Slukem.if ${MKGCC} != "no" 4461.280Sskrll.if ${USE_COMPILERCRTSTUFF} == "yes" 4471.249Slukem.if (${HAVE_GCC} == "3" || ${HAVE_GCC} == "4") 4481.249Slukem ${MAKEDIRTARGET} . do-gnu-lib-crtstuff${LIBGCC_EXT} 4491.249Slukem.endif 4501.280Sskrll.endif 4511.249Slukem ${MAKEDIRTARGET} . do-gnu-lib-libgcc${LIBGCC_EXT} 4521.249Slukem.endif 4531.256Sgmcgarry.endif 4541.256Sgmcgarry 4551.262Smrgdo-compat-libgcc: .PHONY .MAKE 4561.262Smrg.if defined(HAVE_GCC) 4571.262Smrg.if ${MKGCC} != "no" 4581.280Sskrll.if ${USE_COMPILERCRTSTUFF} == "yes" 4591.262Smrg ${MAKEDIRTARGET} . do-compat-gnu-lib-crtstuff${LIBGCC_EXT} 4601.280Sskrll.endif 4611.262Smrg ${MAKEDIRTARGET} . do-compat-gnu-lib-libgcc${LIBGCC_EXT} 4621.262Smrg.endif 4631.262Smrg.endif 4641.262Smrg 4651.256Sgmcgarrydo-libpcc: .PHONY .MAKE 4661.256Sgmcgarry.if defined(HAVE_PCC) 4671.256Sgmcgarry.if ${MKPCC} != "no" 4681.280Sskrll.if ${USE_COMPILERCRTSTUFF} == "yes" 4691.256Sgmcgarry ${MAKEDIRTARGET} . do-pcc-lib-crtstuff 4701.280Sskrll.endif 4711.256Sgmcgarry ${MAKEDIRTARGET} . do-pcc-lib-libpcc 4721.256Sgmcgarry.endif 4731.256Sgmcgarry.endif 4741.249Slukem 4751.242Sdsldo-ld.so: .PHONY .MAKE 4761.184Slukem.for targ in dependall install 4771.232Slukem ${MAKEDIRTARGET} libexec/ld.elf_so ${targ} 4781.137Stv.endfor 4791.143Stv 4801.242Sdsldo-build: .PHONY .MAKE 4811.154Stv.for targ in dependall install 4821.232Slukem ${MAKEDIRTARGET} . ${targ} BUILD_tools=no BUILD_lib=no 4831.154Stv.endfor 4841.200Slukem 4851.242Sdsldo-x11: .PHONY .MAKE 4861.263Smrg.if ${MKX11} != "no" 4871.263Smrg.if ${X11FLAVOUR} == "Xorg" 4881.254Smrg ${MAKEDIRTARGET} external/mit/xorg build 4891.263Smrg.else 4901.257Slukem ${MAKEDIRTARGET} x11 build 4911.263Smrg.endif 4921.254Smrg.else 4931.263Smrg @echo "MKX11 is not enabled" 4941.257Slukem @false 4951.254Smrg.endif 4961.227Slukem 4971.275Suebayasido-extsrc: .PHONY .MAKE 4981.275Suebayasi.if ${MKEXTSRC} != "no" 4991.275Suebayasi ${MAKEDIRTARGET} extsrc build 5001.275Suebayasi.else 5011.275Suebayasi @echo "MKEXTSRC is not enabled" 5021.275Suebayasi @false 5031.275Suebayasi.endif 5041.275Suebayasi 5051.242Sdsldo-obsolete: .PHONY .MAKE 5061.232Slukem ${MAKEDIRTARGET} etc install-obsolete-lists 5071.87Scjs 5081.193Slukem# 5091.137Stv# Speedup stubs for some subtrees that don't need to run these rules. 5101.137Stv# (Tells <bsd.subdir.mk> not to recurse for them.) 5111.193Slukem# 5121.129Stv 5131.152Stv.for dir in bin etc distrib games libexec regress sbin usr.sbin tools 5141.228Slukemincludes-${dir}: .PHONY 5151.152Stv @true 5161.152Stv.endfor 5171.152Stv.for dir in etc distrib regress 5181.228Slukeminstall-${dir}: .PHONY 5191.152Stv @true 5201.152Stv.endfor 5211.152Stv 5221.193Slukem# 5231.152Stv# XXX this needs to change when distrib Makefiles are recursion compliant 5241.193Slukem# XXX many distrib subdirs need "cd etc && make snap_pre snap_kern" first... 5251.193Slukem# 5261.228Slukemdependall-distrib depend-distrib all-distrib: .PHONY 5271.136Snathanw @true 5281.130Stv 5291.211Slukem.include <bsd.sys.mk> 5301.151Stv.include <bsd.obj.mk> 5311.209Slukem.include <bsd.kernobj.mk> 5321.146Stv.include <bsd.subdir.mk> 5331.144Stv 5341.228Slukembuild-docs: .PHONY ${.CURDIR}/BUILDING 5351.188Slukem${.CURDIR}/BUILDING: doc/BUILDING.mdoc 5361.230Slukem ${_MKMSG_CREATE} ${.TARGET} 5371.216Slukem ${TOOL_GROFF} -mdoc -Tascii -P-bou $> >$@ 5381.209Slukem 5391.209Slukem 5401.209Slukem# 5411.209Slukem# Display current make(1) parameters 5421.209Slukem# 5431.242Sdslparams: .PHONY .MAKE 5441.232Slukem ${MAKEDIRTARGET} etc params 545