From owner-svn-src-head@freebsd.org Thu Apr 14 22:00:50 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 B8BA8AECC8B; Thu, 14 Apr 2016 22:00:50 +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 92B8D1E33; Thu, 14 Apr 2016 22:00:50 +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 u3EM0npL055926; Thu, 14 Apr 2016 22:00:49 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u3EM0n9A055924; Thu, 14 Apr 2016 22:00:49 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201604142200.u3EM0n9A055924@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 14 Apr 2016 22:00:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r298007 - head/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.21 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: Thu, 14 Apr 2016 22:00:50 -0000 Author: bdrewery Date: Thu Apr 14 22:00:49 2016 New Revision: 298007 URL: https://svnweb.freebsd.org/changeset/base/298007 Log: Add more content for WITH_META_MODE/WITH_DIRDEPS_BUILD. Sponsored by: EMC / Isilon Storage Division Modified: head/tools/build/options/WITH_DIRDEPS_BUILD head/tools/build/options/WITH_META_MODE Modified: head/tools/build/options/WITH_DIRDEPS_BUILD ============================================================================== --- head/tools/build/options/WITH_DIRDEPS_BUILD Thu Apr 14 22:00:33 2016 (r298006) +++ head/tools/build/options/WITH_DIRDEPS_BUILD Thu Apr 14 22:00:49 2016 (r298007) @@ -1,9 +1,9 @@ .\" $FreeBSD$ -Enable building in meta mode. -This is an experimental build feature. +This is an experimental build system. For details see http://www.crufty.net/sjg/docs/freebsd-meta-mode.htm. -.Pp +Build commands can be seen from the top-level with: +.Dl make show-valid-targets The build is driven by dirdeps.mk using .Va DIRDEPS stored in @@ -23,17 +23,13 @@ and child directories. .Va NO_DIRDEPS_BELOW will skip building any dirdeps and only build the current directory. .Pp -As each target is made -.Xr make 1 -produces a meta file which is used to capture (and compare) -the command line, -as well as any command output. -If -.Xr filemon 4 -is available the meta file will also capture a record of files -used to produce the target by tracking syscalls. +This also utilizes the +.Va WITH_META_MODE +logic for incremental builds. .Pp The build will hide commands ran unless .Va NO_SILENT is defined. .Pp +Note that there is currently no mass install feature for this. +.Pp Modified: head/tools/build/options/WITH_META_MODE ============================================================================== --- head/tools/build/options/WITH_META_MODE Thu Apr 14 22:00:33 2016 (r298006) +++ head/tools/build/options/WITH_META_MODE Thu Apr 14 22:00:49 2016 (r298007) @@ -1,12 +1,41 @@ .\" $FreeBSD$ -Create meta files when not doing DIRDEPS_BUILD. +Creates +.Xr make 1 +meta files when building, which can provide a reliable incremental build when +using +.Xr filemon 4 . +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 .Xr filemon 4 -module is loaded, dependencies will be tracked for all commands. -If any command, its dependencies, or files it generates are missing then -the target will be considered out-of-date and rebuilt. +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: +.Bl -bullet -compact +.It +The command to execute changes. +.It +The current working directory changes. +.It +The target's meta file is missing. +.It +[requires +.Xr filemon 4 ] +Files read, executed or linked to are newer than the target. +.It +[requires +.Xr filemon 4 ] +Files read, written, executed or linked are missing. +.El The meta files can also be useful for debugging. .Pp The build will hide commands ran unless .Va NO_SILENT is defined. +.Pp +The build operates as it normally would otherwise. +This option originally invoked a different build system but that was renamed +to +.Va WITH_DIRDEPS_BUILD .