From b8ef21b88a8c7ae04e7831f24b0dd5680dfef426 Mon Sep 17 00:00:00 2001 From: Bryan Drewery Date: Tue, 14 Jun 2016 16:20:19 +0000 Subject: 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 [1] Approved by: re (implicit) Sponsored by: EMC / Isilon Storage Division --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Makefile') 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) _MAKE+= MK_META_MODE=no .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. -- cgit v1.2.3