Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Nov 2017 01:10:50 +0000 (UTC)
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r325698 - head
Message-ID:  <201711110110.vAB1Aor0007544@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bdrewery
Date: Sat Nov 11 01:10:50 2017
New Revision: 325698
URL: https://svnweb.freebsd.org/changeset/base/325698

Log:
  META_MODE: Avoid some logic if disabled and allow enabling with make argument.
  
  Sponsored by:	Dell EMC Isilon

Modified:
  head/Makefile

Modified: head/Makefile
==============================================================================
--- head/Makefile	Sat Nov 11 01:10:46 2017	(r325697)
+++ head/Makefile	Sat Nov 11 01:10:50 2017	(r325698)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201711110110.vAB1Aor0007544>