diff options
author | Bryan Drewery <bdrewery@FreeBSD.org> | 2017-11-11 01:10:50 +0000 |
---|---|---|
committer | Bryan Drewery <bdrewery@FreeBSD.org> | 2017-11-11 01:10:50 +0000 |
commit | d8d24cec9fe17c4341d91cbf65ba276b3385c6dd (patch) | |
tree | eb85a893fee109e72dbe61f7e9bdf0fb33d858aa /Makefile | |
parent | 58d86ed34287f54a5d080cfe9697eb5d7c69f3c7 (diff) | |
download | src-test-d8d24cec9fe17c4341d91cbf65ba276b3385c6dd.tar.gz src-test-d8d24cec9fe17c4341d91cbf65ba276b3385c6dd.zip |
META_MODE: Avoid some logic if disabled and allow enabling with make argument.
Sponsored by: Dell EMC Isilon
Notes
Notes:
svn path=/head/; revision=325698
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/Makefile b/Makefile index bf6d4c221584e..6aece21ecdc82 100644 --- a/Makefile +++ b/Makefile @@ -247,8 +247,11 @@ SUB_MAKE= ${MAKE} -m ${.CURDIR}/share/mk _MAKE= PATH=${PATH} MAKE_CMD="${MAKE}" ${SUB_MAKE} -f Makefile.inc1 \ TARGET=${_TARGET} TARGET_ARCH=${_TARGET_ARCH} +.if defined(MK_META_MODE) && ${MK_META_MODE} == "yes" # Only allow meta mode for the whitelisted targets. See META_TGT_WHITELIST -# above. +# above. If overridden as a make argument then don't bother trying to +# disable it. +.if empty(.MAKEOVERRIDES:MMK_META_MODE) .for _tgt in ${META_TGT_WHITELIST} .if make(${_tgt}) _CAN_USE_META_MODE?= yes @@ -256,17 +259,22 @@ _CAN_USE_META_MODE?= yes .endfor .if !defined(_CAN_USE_META_MODE) _MAKE+= MK_META_MODE=no +MK_META_MODE= no .if defined(.PARSEDIR) .unexport META_MODE .endif -.elif defined(MK_META_MODE) && ${MK_META_MODE} == "yes" +.endif # !defined(_CAN_USE_META_MODE) +.endif # empty(.MAKEOVERRIDES:MMK_META_MODE) + +.if ${MK_META_MODE} == "yes" .if !exists(/dev/filemon) && !defined(NO_FILEMON) && !make(showconfig) # Require filemon be loaded to provide a working incremental build .error ${.newline}ERROR: The filemon module (/dev/filemon) is not loaded. \ ${.newline}ERROR: WITH_META_MODE is enabled but requires filemon for an incremental build. \ ${.newline}ERROR: 'kldload filemon' or pass -DNO_FILEMON to suppress this error. .endif # !exists(/dev/filemon) && !defined(NO_FILEMON) -.endif # !defined(_CAN_USE_META_MODE) +.endif # ${MK_META_MODE} == yes +.endif # defined(MK_META_MODE) && ${MK_META_MODE} == yes # 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 |