2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-11 11:42:14 +00:00

Boost Build cleanup - minor stylistic changes.

[SVN r79734]
This commit is contained in:
Jurko Gospodnetić
2012-07-25 05:36:38 +00:00
parent dff942e14b
commit 53d4c9d5b9

View File

@@ -340,7 +340,7 @@ rule all-parents ( path : upper_limit ? : cwd ? )
{
errors.error "$(upper_limit) is not prefix of $(path)" ;
}
# Create the relative paths to parents, number of elements in 'path_ele'.
local result ;
for local i in $(path_ele)
@@ -352,8 +352,8 @@ rule all-parents ( path : upper_limit ? : cwd ? )
}
# Search for 'pattern' in parent directories of 'dir', up till and including
# 'upper_limit', if it is specified, or till the filesystem root otherwise.
# Search for 'pattern' in parent directories of 'dir', up to and including
# 'upper_limit', if it is specified, or up to the filesystem root otherwise.
#
rule glob-in-parents ( dir : patterns + : upper-limit ? )
{
@@ -408,12 +408,12 @@ rule relative ( child parent : no-error ? )
else
{
errors.error $(child) is not a subdir of $(parent) ;
}
}
}
else
{
return [ join $(split2) ] ;
}
return [ join $(split2) ] ;
}
}
else
{
@@ -423,7 +423,7 @@ rule relative ( child parent : no-error ? )
}
# Returns the minimal path to path2 that is relative path1.
# Returns the minimal path to path2 that is relative to path1.
#
rule relative-to ( path1 path2 )
{
@@ -448,8 +448,8 @@ rule relative-to ( path1 path2 )
}
# Returns the list of paths which are used by the operating system for looking
# up programs.
# Returns the list of paths used by the operating system for looking up
# programs.
#
rule programs-path ( )
{
@@ -465,6 +465,7 @@ rule programs-path ( )
return $(result) ;
}
rule makedirs ( path )
{
local result = true ;
@@ -472,17 +473,18 @@ rule makedirs ( path )
if ! [ exists $(native) ]
{
if [ makedirs [ parent $(path) ] ]
{
{
if ! [ MAKEDIR $(native) ]
{
errors.error "Could not create directory '$(path)'" ;
result = ;
}
}
}
}
}
return $(result) ;
}
# Converts native Windows paths into our internal canonic path representation.
# Supports 'invalid' paths containing multiple successive path separator
# characters.
@@ -825,8 +827,8 @@ rule __test__ ( )
assert.result "/foo" : make "\\foo" ;
assert.result "/D:/My Documents" : make "D:\\My Documents" ;
assert.result "/c:/boost/tools/build/new/project.jam" : make "c:\\boost\\tools\\build\\test\\..\\new\\project.jam" ;
# Test processing 'invalid' paths containing multiple successive path
# Test processing 'invalid' paths containing multiple successive path
# separators.
assert.result "foo" : make "foo//" ;
assert.result "foo" : make "foo///" ;
@@ -843,7 +845,7 @@ rule __test__ ( )
assert.result "foo/giz" : make "foo//\\//\\\\bar///\\\\//\\\\////\\/..///giz\\//\\\\\\//\\//\\\\" ;
assert.result "../../../foo" : make "..///.//..///.//..////foo///" ;
# Test processing 'invalid' rooted paths with too many '..' path elements
# Test processing 'invalid' rooted paths with too many '..' path elements
# that would place them before the root.
assert.result : make "/.." ;
assert.result : make "/../" ;
@@ -874,7 +876,7 @@ rule __test__ ( )
modules.poke path : os : VMS ;
#
# Don't really need to poke os before these
# Do not really need to poke os before these
#
assert.result "disk:" "[dir]" "file" : split-path-VMS "disk:[dir]file" ;
assert.result "disk:" "[dir]" "" : split-path-VMS "disk:[dir]" ;
@@ -909,8 +911,8 @@ rule __test__ ( )
assert.result "/disk:/boost/tools/build/new/project.jam" : make "disk:[boost.tools.build.test.-.new]project.jam" ;
#
# Special case (adds '.' to end of file w/o extension to
# disambiguate from directory in portable path spec).
# Special case (adds '.' to end of file w/o extension to disambiguate from
# directory in portable path spec)
#
assert.result "Jamfile." : make "Jamfile" ;
assert.result "dir/Jamfile." : make "[.dir]Jamfile" ;