mirror of
https://github.com/boostorg/build.git
synced 2026-02-01 20:32:17 +00:00
Unbreak path.glob on Windows.
[SVN r28061]
This commit is contained in:
@@ -209,18 +209,18 @@ rule glob ( dirs * : patterns + )
|
||||
for local p in $(patterns)
|
||||
{
|
||||
local pattern = [ path.root $(p) $(d) ] ;
|
||||
result += [ glob-really $(pattern) ] ;
|
||||
result += [ glob-really [ path.native $(pattern) ] ] ;
|
||||
}
|
||||
}
|
||||
|
||||
# Windows is not case-sensitive, so if you're globbing
|
||||
# for Jamroot and jamroot, the result will include 'Jamroot'
|
||||
# twice. Remove duplicates.
|
||||
return [ sequence.unique $(result) ] ;
|
||||
return [ sequence.transform path.make : [ sequence.unique $(result) ] ] ;
|
||||
}
|
||||
|
||||
# Looks for file matching 'pattern' in 'directory'.
|
||||
# Does not recurse.
|
||||
# Does not recurse. Directory is in the native format.
|
||||
rule glob-one ( dir : p )
|
||||
{
|
||||
local result ;
|
||||
@@ -241,17 +241,17 @@ rule glob-one ( dir : p )
|
||||
|
||||
if $(p) != ".."
|
||||
{
|
||||
result += [ sequence.transform make
|
||||
: [ GLOB [ native $(dir) ] : $(p) ] ] ;
|
||||
result += [ GLOB $(dir) : $(p) ] ;
|
||||
}
|
||||
else
|
||||
{
|
||||
result += [ path.join $(dir) .. ] ;
|
||||
}
|
||||
return $(result) ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
# Searches for a single pattern and returns matches.
|
||||
# Both pattern and result are in native format.
|
||||
rule glob-really ( pattern )
|
||||
{
|
||||
local result ;
|
||||
@@ -264,7 +264,6 @@ rule glob-really ( pattern )
|
||||
|
||||
# First glob for directory part.
|
||||
local globbed-dirs = [ glob-really $(pattern:D) ] ;
|
||||
|
||||
for local dir in $(globbed-dirs)
|
||||
{
|
||||
local x = [ glob-one $(dir) : $(pattern:D="") ] ;
|
||||
@@ -272,7 +271,7 @@ rule glob-really ( pattern )
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
if $(pattern:D) = $(pattern)
|
||||
{
|
||||
# Just return the result.
|
||||
|
||||
Reference in New Issue
Block a user