From owner-svn-src-head@freebsd.org Tue Jun 14 16:20:21 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 64353B6A8D5; Tue, 14 Jun 2016 16:20:21 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 354FA2830; Tue, 14 Jun 2016 16:20:21 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u5EGKKEA008372; Tue, 14 Jun 2016 16:20:20 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u5EGKK5O008368; Tue, 14 Jun 2016 16:20:20 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201606141620.u5EGKK5O008368@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 14 Jun 2016 16:20:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301888 - in head: . share/mk tools/build/options X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2016 16:20:21 -0000 Author: bdrewery Date: Tue Jun 14 16:20:19 2016 New Revision: 301888 URL: https://svnweb.freebsd.org/changeset/base/301888 Log: 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 Modified: head/Makefile head/share/mk/bsd.init.mk head/share/mk/sys.mk head/tools/build/options/WITH_META_MODE Modified: head/Makefile ============================================================================== --- head/Makefile Tue Jun 14 16:20:14 2016 (r301887) +++ head/Makefile Tue Jun 14 16:20:19 2016 (r301888) @@ -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. Modified: head/share/mk/bsd.init.mk ============================================================================== --- head/share/mk/bsd.init.mk Tue Jun 14 16:20:14 2016 (r301887) +++ head/share/mk/bsd.init.mk Tue Jun 14 16:20:19 2016 (r301888) @@ -28,4 +28,14 @@ _SKIP_BUILD = not building at level 0 .warning ${_SKIP_BUILD} .endif +.if ${MK_META_MODE} == "yes" +.if !exists(/dev/filemon) && \ + ${UPDATE_DEPENDFILE:Uyes:tl} != "no" && !defined(NO_FILEMON) && \ + !make(showconfig) +.warning The filemon module (/dev/filemon) is not loaded. +.warning META_MODE is less useful for incremental builds without filemon. +.warning 'kldload filemon' or pass -DNO_FILEMON to suppress this warning. +.endif +.endif # ${MK_META_MODE} == "yes" + .endif # !target(____) Modified: head/share/mk/sys.mk ============================================================================== --- head/share/mk/sys.mk Tue Jun 14 16:20:14 2016 (r301887) +++ head/share/mk/sys.mk Tue Jun 14 16:20:19 2016 (r301888) @@ -60,10 +60,6 @@ META_MODE+= missing-meta=yes META_MODE+= silent=yes .endif .if !exists(/dev/filemon) -.if ${UPDATE_DEPENDFILE:Uyes:tl} != "no" && !defined(NO_FILEMON) && \ - !make(showconfig) -.error ${.newline}ERROR: The filemon module (/dev/filemon) is not loaded. -.endif META_MODE+= nofilemon .endif # Require filemon data with bmake Modified: head/tools/build/options/WITH_META_MODE ============================================================================== --- head/tools/build/options/WITH_META_MODE Tue Jun 14 16:20:14 2016 (r301887) +++ head/tools/build/options/WITH_META_MODE Tue Jun 14 16:20:19 2016 (r301888) @@ -7,9 +7,13 @@ using The meta file is created in the OBJDIR as .Pa target.meta . These meta files track the command ran, its output, and the current directory. -When the +The .Xr filemon 4 -module is loaded, any files used by the commands executed will be tracked as +module is required unless +.Va NO_FILEMON +is defined. +When the module is loaded, any files used by the commands executed will be +tracked as dependencies for the target in its meta file. The target will be considered out-of-date and rebuilt if any of the following are true compared to the last build: