2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-16 01:12:13 +00:00

Boost Build code cleanup - minor stylistic changes.

[SVN r79954]
This commit is contained in:
Jurko Gospodnetić
2012-08-10 13:56:54 +00:00
parent 9bb216654a
commit e60fe481a8
2 changed files with 20 additions and 23 deletions

View File

@@ -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 toolset ;
import utility ;
import version ;
import virtual-target ;
import generators ;
import configure ;
################################################################################
@@ -151,13 +151,10 @@ local rule actual-clean-targets ( )
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 @@ local rule process-explicit-toolset-requests
}
# 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 ;

View File

@@ -135,7 +135,7 @@ rule find ( name : current-location )
# 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 @@ rule module-name ( jamfile-location )
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 @@ JAMFILE ?= [Bb]uild.jam [Jj]amfile.v2 [Jj]amfile [Jj]amfile.jam ;
# 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 @@ local rule load-jamfile ( dir : jamfile-module )
# 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 @@ class project-attributes
#
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) ;