Don't error out when 'PATH', 'Path', or 'path' has empty elements.
[SVN r24889]
This commit is contained in:
parent
e7c04a87b7
commit
21277abf83
@ -166,7 +166,7 @@ rule get-absolute-tool-path ( command )
|
||||
# If 'path-last' is specified, path is checked after 'additional-paths'.
|
||||
rule find-tool ( name : additional-paths * : path-last ? )
|
||||
{
|
||||
local path = [ sequence.transform path.make : [ modules.peek : PATH Path path ] ] ;
|
||||
local path = [ path.programs-path ] ;
|
||||
local match = [ path.glob $(path) : $(name) $(name).exe ] ;
|
||||
local additional-match = [ path.glob $(additional-paths) : $(name) $(name).exe ] ;
|
||||
|
||||
|
@ -320,7 +320,21 @@ rule relative-to ( path1 path2 )
|
||||
return [ join . $(root_1) $(split2) ] ;
|
||||
}
|
||||
|
||||
|
||||
# Returns the list of paths which are used by the operating system
|
||||
# for looking up programs
|
||||
rule programs-path ( )
|
||||
{
|
||||
local result ;
|
||||
local raw = [ modules.peek : PATH Path path ] ;
|
||||
for local p in $(raw)
|
||||
{
|
||||
if $(p)
|
||||
{
|
||||
result += [ path.make $(p) ] ;
|
||||
}
|
||||
}
|
||||
return $(result) ;
|
||||
}
|
||||
|
||||
rule make-NT ( native )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user