diff options
author | Bryan Drewery <bdrewery@FreeBSD.org> | 2017-11-18 20:01:12 +0000 |
---|---|---|
committer | Bryan Drewery <bdrewery@FreeBSD.org> | 2017-11-18 20:01:12 +0000 |
commit | a7fa261e37ba3d9983e8481d34ed14ecc16d59d9 (patch) | |
tree | ca0d1cef4cf487e43a81790eefd922b51e6ae6ff /Makefile.sys.inc | |
parent | f7789552132d69ab34c89a9080b97b52c62c90e1 (diff) | |
download | src-test2-a7fa261e37ba3d9983e8481d34ed14ecc16d59d9.tar.gz src-test2-a7fa261e37ba3d9983e8481d34ed14ecc16d59d9.zip |
Notes
Diffstat (limited to 'Makefile.sys.inc')
-rw-r--r-- | Makefile.sys.inc | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/Makefile.sys.inc b/Makefile.sys.inc new file mode 100644 index 000000000000..c21ed19bdc62 --- /dev/null +++ b/Makefile.sys.inc @@ -0,0 +1,39 @@ +# $FreeBSD$ +# +# This is included very early from share/mk/src.sys.env.mk, after +# /etc/src-env.conf but before /etc/make.conf, /etc/src.conf, or OBJDIR +# handling. +# - It is not safe to use .OBJDIR/OBJTOP/OBJROOT here. +# - __ENV_ONLY_OPTIONS have been parsed by now except for opporutunistic +# MK_AUTO_OBJ. +# + +.if ${MK_DIRDEPS_BUILD} == "no" +# For AUTO_OBJ many targets do not need object directories created at top-level +# for each visited directory. Only when things are being built are they +# needed. Having AUTO_OBJ disabled in a build target is fine as it should +# fallback to running 'make obj' as needed. If a target is not in this list +# then it is ran with MK_AUTO_OBJ=no in environment. +# 'showconfig' is in the list to avoid forcing MK_AUTO_OBJ=no for it. +AUTO_OBJ_TGT_WHITELIST+= \ + _* all all-man build* depend everything *toolchain* includes \ + libraries obj objlink showconfig tags xdev xdev-build native-xtools \ + stage* create-packages* real-packages sign-packages package-pkg \ + tinderbox universe* kernel kernels world worlds bmake + +# Only allow AUTO_OBJ for the whitelisted targets. See AUTO_OBJ_TGT_WHITELIST +# above. MK_AUTO_OBJ not checked here for "yes" as it may not yet be enabled +# since it is opportunistic. +.if empty(.MAKEOVERRIDES:MMK_AUTO_OBJ) +.for _tgt in ${AUTO_OBJ_TGT_WHITELIST} +.if make(${_tgt}) +_CAN_USE_AUTO_OBJ?= yes +.endif +.endfor +.if !defined(_CAN_USE_AUTO_OBJ) +_MAKEARGS+= MK_AUTO_OBJ=no +MK_AUTO_OBJ= no +.endif +.endif # empty(.MAKEOVERRIDES:MMK_AUTO_OBJ) + +.endif # ${MK_DIRDEPS_BUILD} == "no" |