1b6209a9bSSimon J. Gerraty.if !target(__${_this}__) 2b6209a9bSSimon J. Gerraty__${_this}__: 3b6209a9bSSimon J. Gerraty 4b6209a9bSSimon J. Gerraty_CURDIR ?= ${.CURDIR} 5b6209a9bSSimon J. Gerraty_OBJDIR ?= ${.OBJDIR} 6b6209a9bSSimon J. Gerraty 761ad1ff5SSimon J. Gerraty.if ${RELDIR:Mtargets/*} != "" || ${RELDIR} == "." 8b6209a9bSSimon J. Gerraty 961ad1ff5SSimon J. Gerraty.if ${.MAKE.LEVEL} == 0 && ${RELDIR:Mtargets/*} != "" 10b6209a9bSSimon J. Gerraty.if make(bootstrap*) || !exists(${_CURDIR}/${.MAKE.DEPENDFILE:T}) 11b6209a9bSSimon J. Gerraty_bootstrap_dirdeps = yes 12b6209a9bSSimon J. Gerraty.else 13b6209a9bSSimon J. Gerraty# BUILD_AT_LEVEL0=no tells dirdeps.mk to use a sub-make for .CURDIR 14b6209a9bSSimon J. Gerraty# This is useful if we need to leverage DIRDEPS 15b6209a9bSSimon J. GerratyBUILD_AT_LEVEL0 = no 16b6209a9bSSimon J. Gerraty# this renders the rest harmless 17b6209a9bSSimon J. GerratyPKG_METHOD = no 18b6209a9bSSimon J. Gerraty.endif 19b6209a9bSSimon J. Gerraty.endif 20b6209a9bSSimon J. Gerraty 21312809feSSimon J. Gerraty.MAIN: all 22312809feSSimon J. Gerraty 23b6209a9bSSimon J. Gerraty# The makefile in subdirs should set this to something useful 24b6209a9bSSimon J. Gerraty# the default should do nothing. 25b6209a9bSSimon J. GerratyPKG_METHOD ?= none 26312809feSSimon J. Gerratynone: 27b6209a9bSSimon J. Gerraty 28b6209a9bSSimon J. Gerraty.if ${build-*:${M_L_TARGETS}} != "" 29b6209a9bSSimon J. Gerraty# just build the bits, skip packaging 30b6209a9bSSimon J. Gerratyall: 31b6209a9bSSimon J. GerratySHIPDIR = no 32b6209a9bSSimon J. Gerraty.if ${RELDIR} != "." 33b6209a9bSSimon J. GerratyPKG_METHOD = no 34b6209a9bSSimon J. Gerraty.endif 35b6209a9bSSimon J. Gerraty.endif 36b6209a9bSSimon J. Gerraty 37*ad34c4d8SSimon J. Gerraty.if ${PKG_METHOD:Nno*} != "" 38b6209a9bSSimon J. Gerratyall: ${PKG_METHOD} 39b6209a9bSSimon J. Gerraty 40b6209a9bSSimon J. Gerraty# set this to "no" for manual control 41b6209a9bSSimon J. GerratyUPDATE_DEPENDFILE ?= yes 42b6209a9bSSimon J. Gerraty.endif 43b6209a9bSSimon J. Gerraty 44b6209a9bSSimon J. Gerraty.if ${UPDATE_DEPENDFILE:Uno} == "yes" 45b6209a9bSSimon J. Gerraty.include <meta.autodep.mk> 46b6209a9bSSimon J. Gerraty.endif 47b6209a9bSSimon J. Gerraty 48b6209a9bSSimon J. Gerraty# all the clever packaging methods go here.... 49b6209a9bSSimon J. Gerraty 50b6209a9bSSimon J. Gerraty.endif # level 0 51b6209a9bSSimon J. Gerraty 52b6209a9bSSimon J. Gerraty.endif # _this 53