path: root/Makefile
diff options
authorBryan Drewery <bdrewery@FreeBSD.org>2016-06-14 16:20:19 +0000
committerBryan Drewery <bdrewery@FreeBSD.org>2016-06-14 16:20:19 +0000
commitb8ef21b88a8c7ae04e7831f24b0dd5680dfef426 (patch)
treed1e0c6050bda0f77d2375ce2a282fce36c2359c1 /Makefile
parent2c6fc926b377c52f887a28d7534df725b69146ee (diff)
WITH_META_MODE: Lessen the filemon(4) requirement scope.
- Move the sys.mk filemon requirement to bsd.init.mk as a warning. This is intended only to show when building directly in a subdirectory without filemon loaded. - Move the error into Makefile and only apply it when building from the META_TGT_WHITELIST target list. -DNO_FILEMON can be used to suppress both the warning and the error but makes WITH_META_MODE less useful. It will only compare build commands in this mode rather than track all dependencies. This fixes installing from a jail which doesn't need filemon in this phase [1]. Reported by: Nikolai Lifanov <lifanov@mail.lifanov.com> [1] Approved by: re (implicit) Sponsored by: EMC / Isilon Storage Division
Notes: svn path=/head/; revision=301888
Diffstat (limited to 'Makefile')
1 files changed, 7 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 5e2f951aa579..b829916916dc 100644
--- a/Makefile
+++ b/Makefile
@@ -219,6 +219,13 @@ _CAN_USE_META_MODE?= yes
.if !defined(_CAN_USE_META_MODE)
.unexport META_MODE
+.elif ${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)
# Guess machine architecture from machine type, and vice versa.