$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r79954 - in trunk/tools/build/v2: . build
From: jurko.gospodnetic_at_[hidden]
Date: 2012-08-10 09:56:55
Author: jurko
Date: 2012-08-10 09:56:54 EDT (Fri, 10 Aug 2012)
New Revision: 79954
URL: http://svn.boost.org/trac/boost/changeset/79954
Log:
Boost Build code cleanup - minor stylistic changes.
Text files modified: 
   trunk/tools/build/v2/build-system.jam  |    24 +++++++++++-------------                
   trunk/tools/build/v2/build/project.jam |    19 +++++++++----------                     
   2 files changed, 20 insertions(+), 23 deletions(-)
Modified: trunk/tools/build/v2/build-system.jam
==============================================================================
--- trunk/tools/build/v2/build-system.jam	(original)
+++ trunk/tools/build/v2/build-system.jam	2012-08-10 09:56:54 EDT (Fri, 10 Aug 2012)
@@ -11,7 +11,9 @@
 import build-request ;
 import builtin ;
 import "class" : new ;
+import configure ;
 import feature ;
+import generators ;
 import make ;
 import modules ;
 import os ;
@@ -25,8 +27,6 @@
 import utility ;
 import version ;
 import virtual-target ;
-import generators ;
-import configure ;
 
 
 ################################################################################
@@ -151,13 +151,10 @@
         local p = [ $(t).project ] ;
 
         # Remove only derived targets.
-        if [ $(t).action ]
+        if [ $(t).action ] && ( $(t) in $(targets-to-clean) ||
+            [ should-clean-project [ $(p).project-module ] ] )
         {
-            if $(t) in $(targets-to-clean) ||
-                [ should-clean-project [ $(p).project-module ] ] = true
-            {
-                to-clean += $(t) ;
-            }
+            to-clean += $(t) ;
         }
     }
 
@@ -501,16 +498,17 @@
 }
 
 
-# Returns 'true' if the given 'project' is equal to or is a (possibly indirect)
-# child to any of the projects requested to be cleaned in this build system run.
-# Returns 'false' otherwise. Expects the .project-targets list to have already
-# been constructed.
+# Returns whether the given project should be cleaned because it or any of its
+# parent projects have been detected as a target for the curent build system
+# run. Expects the .project-targets list to have already been constructed and
+# not change between invocations (or else the implemented result caching might
+# not work correctly).
 #
 local rule should-clean-project ( project )
 {
     if ! $(.should-clean-project.$(project))
     {
-        local r = false ;
+        local r ;
         if $(project) in $(.project-targets)
         {
             r = true ;
Modified: trunk/tools/build/v2/build/project.jam
==============================================================================
--- trunk/tools/build/v2/build/project.jam	(original)
+++ trunk/tools/build/v2/build/project.jam	2012-08-10 09:56:54 EDT (Fri, 10 Aug 2012)
@@ -135,7 +135,7 @@
         # If no project is registered for the given location, try to load it.
         # First see if we have a Jamfile. If not, then see if we might have a
         # project root willing to act as a Jamfile. In that case, project root
-        # must be placed in the directory referred by id.
+        # must be placed in the directory referred to by id.
 
         project-module = [ module-name $(location) ] ;
         if ! $(project-module) in $(.jamfile-modules)
@@ -164,7 +164,7 @@
     if ! $(.module.$(jamfile-location))
     {
         # Root the path, so that locations are always unambiguous. Without this,
-        # we can't decide if '../../exe/program1' and '.' are the same paths.
+        # we can not decide if '../../exe/program1' and '.' are the same paths.
         jamfile-location = [ path.root $(jamfile-location) [ path.pwd ] ] ;
         .module.$(jamfile-location) = Jamfile<$(jamfile-location)> ;
     }
@@ -181,7 +181,7 @@
 # Find the Jamfile at the given location. This returns the exact names of all
 # the Jamfiles in the given directory. The optional parent-root argument causes
 # this to search not the given directory but the ones above it up to the
-# directory given in it.
+# parent-root directory.
 #
 rule find-jamfile (
     dir            # The directory(s) to look for a Jamfile.
@@ -273,9 +273,9 @@
 
     # Now load the Jamfile in its own context.
     # The call to 'initialize' may load the parent Jamfile, which might contain
-    # a 'use-project' statement, causing a second attempt to load the same
-    # project we are loading now. Checking inside .jamfile-modules prevents that
-    # second attempt from messing things up.
+    # a 'use-project' or a 'project.load' call, causing a second attempt to load
+    # the same project we are loading now. Checking inside .jamfile-modules
+    # prevents that second attempt from messing things up.
     if ! $(jamfile-module) in $(.jamfile-modules)
     {
         local previous-project = $(.current-project) ;
@@ -750,11 +750,10 @@
     #
     rule print ( )
     {
-        local id = $(self.id:E=(none)) ;
-        local parent = $(self.parent:E=(none)) ;
-        print.section "'"$(id)"'" ;
+        local id = '$(self.id)' ;
+        print.section $(id:E=(none)) ;
         print.list-start ;
-        print.list-item "Parent project:" $(parent) ;
+        print.list-item "Parent project:" $(self.parent:E=(none)) ;
         print.list-item "Requirements:" [ $(self.requirements).raw ] ;
         print.list-item "Default build:" $(self.default-build) ;
         print.list-item "Source location:" $(self.source-location) ;