2012-11-09 05:44:34 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
.if !target(__${_this}__)
|
|
|
|
__${_this}__:
|
|
|
|
|
|
|
|
_CURDIR ?= ${.CURDIR}
|
|
|
|
_OBJDIR ?= ${.OBJDIR}
|
|
|
|
|
2014-11-30 18:45:46 +00:00
|
|
|
.if ${RELDIR:Mtargets/*} != "" || ${RELDIR} == "."
|
2012-11-09 05:44:34 +00:00
|
|
|
|
2014-11-30 18:45:46 +00:00
|
|
|
.if ${.MAKE.LEVEL} == 0 && ${RELDIR:Mtargets/*} != ""
|
2012-11-09 05:44:34 +00:00
|
|
|
.if make(bootstrap*) || !exists(${_CURDIR}/${.MAKE.DEPENDFILE:T})
|
|
|
|
_bootstrap_dirdeps = yes
|
|
|
|
.else
|
|
|
|
# BUILD_AT_LEVEL0=no tells dirdeps.mk to use a sub-make for .CURDIR
|
|
|
|
# This is useful if we need to leverage DIRDEPS
|
|
|
|
BUILD_AT_LEVEL0 = no
|
|
|
|
# this renders the rest harmless
|
|
|
|
PKG_METHOD = no
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
|
2019-12-11 17:38:15 +00:00
|
|
|
.MAIN: all
|
|
|
|
|
2012-11-09 05:44:34 +00:00
|
|
|
# The makefile in subdirs should set this to something useful
|
|
|
|
# the default should do nothing.
|
|
|
|
PKG_METHOD ?= none
|
2019-12-11 17:38:15 +00:00
|
|
|
none:
|
2012-11-09 05:44:34 +00:00
|
|
|
|
|
|
|
.if ${build-*:${M_L_TARGETS}} != ""
|
|
|
|
# just build the bits, skip packaging
|
|
|
|
all:
|
|
|
|
SHIPDIR = no
|
|
|
|
.if ${RELDIR} != "."
|
|
|
|
PKG_METHOD = no
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${PKG_METHOD:Mno*} != ""
|
|
|
|
all: ${PKG_METHOD}
|
|
|
|
|
|
|
|
# set this to "no" for manual control
|
|
|
|
UPDATE_DEPENDFILE ?= yes
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${UPDATE_DEPENDFILE:Uno} == "yes"
|
|
|
|
.include <meta.autodep.mk>
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# all the clever packaging methods go here....
|
|
|
|
|
|
|
|
.endif # level 0
|
|
|
|
|
|
|
|
.endif # _this
|