|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r80026 - trunk/tools/build/v2/build
From: jurko.gospodnetic_at_[hidden]
Date: 2012-08-14 01:13:21
Author: jurko
Date: 2012-08-14 01:13:21 EDT (Tue, 14 Aug 2012)
New Revision: 80026
URL: http://svn.boost.org/trac/boost/changeset/80026
Log:
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.
Text files modified:
trunk/tools/build/v2/build/project.jam | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
Modified: trunk/tools/build/v2/build/project.jam
==============================================================================
--- trunk/tools/build/v2/build/project.jam (original)
+++ trunk/tools/build/v2/build/project.jam 2012-08-14 01:13:21 EDT (Tue, 14 Aug 2012)
@@ -166,6 +166,22 @@
# 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)) ;
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk