1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-12 09:58:36 +00:00
freebsd/targets/Makefile.inc
Simon J. Gerraty 312809fe7f Update dirdeps.mk and gendirdeps.mk
The env space consumed by exporting all libc's .meta files
left little room for command line,
so unexport when done.

Update dirdeps.mk to latest and add
dirdeps-targets.mk to simplify/update targets/Makefile

Makefile changes to go with Makefile.depend changes in D22494

Reviewed by:	 bdrewery
MFC after:	1 week
Sponsored by:   Juniper Networks
Differential Revision:  https://reviews.freebsd.org/D22495
2019-12-11 17:38:15 +00:00

55 lines
1.0 KiB
Makefile

# $FreeBSD$
.if !target(__${_this}__)
__${_this}__:
_CURDIR ?= ${.CURDIR}
_OBJDIR ?= ${.OBJDIR}
.if ${RELDIR:Mtargets/*} != "" || ${RELDIR} == "."
.if ${.MAKE.LEVEL} == 0 && ${RELDIR:Mtargets/*} != ""
.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
.MAIN: all
# The makefile in subdirs should set this to something useful
# the default should do nothing.
PKG_METHOD ?= none
none:
.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