1bee3d4bfSSimon J. Gerraty 2bee3d4bfSSimon J. Gerraty# For universe we want to potentially 3bee3d4bfSSimon J. Gerraty# build for multiple MACHINE_ARCH per MACHINE 4bee3d4bfSSimon J. Gerraty# so we need more than MACHINE in TARGET_SPEC 5bee3d4bfSSimon J. GerratyTARGET_SPEC_VARS?= MACHINE MACHINE_ARCH 6bee3d4bfSSimon J. Gerraty 7bee3d4bfSSimon J. Gerraty# this is sufficient for most of the tree. 8bee3d4bfSSimon J. Gerraty.MAKE.DEPENDFILE_DEFAULT = ${.MAKE.DEPENDFILE_PREFIX} 9bee3d4bfSSimon J. Gerraty 10bee3d4bfSSimon J. Gerraty# but if we have a machine qualified file it should be used in preference 11bee3d4bfSSimon J. Gerraty.MAKE.DEPENDFILE_PREFERENCE = \ 12bee3d4bfSSimon J. Gerraty ${.MAKE.DEPENDFILE_PREFIX}.${MACHINE} \ 13bee3d4bfSSimon J. Gerraty ${.MAKE.DEPENDFILE_PREFIX} 14bee3d4bfSSimon J. Gerraty 15d1c84207SSimon J. Gerraty# some corner cases 1684c84ae1SSimon J. GerratyBOOT_MACHINE_DIR.amd64 = stand/i386 17d1c84207SSimon J. Gerraty 18d1c84207SSimon J. Gerraty.-include <site.sys.dirdeps.env.mk> 19d1c84207SSimon J. Gerraty 20da1ef2d6SSimon J. GerratyALL_MACHINE_LIST?= ${TARGET_MACHINE_LIST} 21da1ef2d6SSimon J. Gerraty 22d1c84207SSimon J. Gerraty.for m in ${ALL_MACHINE_LIST:O:u} 2384c84ae1SSimon J. GerratyBOOT_MACHINE_DIR.$m ?= stand/$m 24d1c84207SSimon J. Gerraty.endfor 25d1c84207SSimon J. Gerraty 26d1c84207SSimon J. GerratyHOST_OBJTOP ?= ${OBJROOT}${HOST_TARGET} 27*f9df6097SSimon J. GerratyHOST_OBJTOP32 ?= ${OBJROOT}${HOST_TARGET32} 28d1c84207SSimon J. Gerraty 29*f9df6097SSimon J. Gerraty.if ${.MAKE.LEVEL} == 0 30d1c84207SSimon J. Gerraty.if ${REQUESTED_MACHINE:U${MACHINE}} == "host" 31d1c84207SSimon J. GerratyMACHINE= host 32d1c84207SSimon J. Gerraty.if ${TARGET_MACHINE:Uno} == ${HOST_TARGET} 33d1c84207SSimon J. Gerraty# not what we want 34d1c84207SSimon J. GerratyTARGET_MACHINE= host 35d1c84207SSimon J. Gerraty.endif 36*f9df6097SSimon J. Gerraty.elif ${REQUESTED_MACHINE:U${MACHINE}} == "host32" 37*f9df6097SSimon J. GerratyMACHINE= host32 38d1c84207SSimon J. Gerraty.endif 39*f9df6097SSimon J. Gerraty.endif 40*f9df6097SSimon J. Gerraty 41*f9df6097SSimon J. Gerraty.if ${MACHINE:Nhost*} == "" 42da1ef2d6SSimon J. GerratyMACHINE_ARCH= ${MACHINE_ARCH_${MACHINE}} 43*f9df6097SSimon J. Gerraty.if ${MACHINE} == "host32" 44*f9df6097SSimon J. Gerraty.MAKE.DEPENDFILE_PREFERENCE= \ 45*f9df6097SSimon J. Gerraty ${.CURDIR}/${.MAKE.DEPENDFILE_PREFIX}.host32 \ 46*f9df6097SSimon J. Gerraty ${.CURDIR}/${.MAKE.DEPENDFILE_PREFIX}.host \ 47*f9df6097SSimon J. Gerraty ${.CURDIR}/${.MAKE.DEPENDFILE_PREFIX} 48*f9df6097SSimon J. Gerraty.endif 49d1c84207SSimon J. Gerraty.endif 50d1c84207SSimon J. Gerraty 51d1c84207SSimon J. Gerraty 52d1c84207SSimon J. Gerraty.if ${.MAKE.LEVEL} == 0 || empty(PYTHON) 53d1c84207SSimon J. GerratyPYTHON ?= /usr/local/bin/python 54d1c84207SSimon J. Gerraty.export PYTHON 55d1c84207SSimon J. Gerraty 56d1c84207SSimon J. Gerraty# _SKIP_BUILD is not 100% as it requires wrapping all 'all:' targets to avoid 57d1c84207SSimon J. Gerraty# building in MAKELEVEL0. Just prohibit 'all' entirely in this case to avoid 58d1c84207SSimon J. Gerraty# problems. 59d1c84207SSimon J. Gerraty.if make(all) 60d1c84207SSimon J. Gerraty.error DIRDEPS_BUILD: Please run '${MAKE}' instead of '${MAKE} all'. 61d1c84207SSimon J. Gerraty.endif 62d1c84207SSimon J. Gerraty.endif 63d1c84207SSimon J. Gerraty 64d1c84207SSimon J. Gerraty.if ${.MAKE.OS} != "FreeBSD" || ${_HOST_OSREL:R} < ${OS_REVISION:R} 65d1c84207SSimon J. Gerraty# a pseudo option to indicate we need libegacy for host 66d1c84207SSimon J. GerratyMK_host_egacy= yes 67d1c84207SSimon J. Gerraty.endif 68