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

Quick & dirty fix to make Boost Build construct consistent Jamfile module names in cases when they are requested via different but equivalent location paths, e.g. 'd:/fOO' and 'D:\Foo\Bar\..'. This should fix currently reported Boost library documentation build failures but the used path normalization implementation still needs to be cleaned up.

[SVN r80026]
This commit is contained in:
Jurko Gospodnetić
2012-08-14 05:13:21 +00:00
parent 14bbed9be7
commit 85df6265d1

View File

@@ -166,6 +166,22 @@ rule module-name ( jamfile-location )
# Root the path, so that locations are always unambiguous. Without this,
# we can not decide if '../../exe/program1' and '.' are the same paths.
local normalized = [ path.root $(jamfile-location) [ path.pwd ] ] ;
# Quick & dirty fix to get the same module name when we supply two
# equivalent location paths, e.g. 'd:\Foo' & 'D:\fOo\bar\..' on Windows.
# Note that our current implementation will not work correctly if the
# given location references an empty folder, but in that case any later
# attempt to load a Jamfile from this location will fail anyway.
# FIXME: Implement this cleanly. Support for this type of path
# normalization already exists internally in Boost Jam and the current
# fix relies on the GLOB builtin rule using that support. Most likely we
# just need to add a new builtin rule to do this explicitly.
normalized = [ NORMALIZE_PATH $(normalized) ] ;
local glob-result = [ GLOB [ path.native $(normalized) ] : * ] ;
if $(glob-result)
{
normalized = $(glob-result[1]:D) ;
}
.module.$(jamfile-location) = Jamfile<$(normalized)> ;
}
return $(.module.$(jamfile-location)) ;