From: Vladimir Prus (ghost_at_[hidden])
Date: 2008-05-05 11:44:11
On Sunday 04 May 2008 07:46:06 Jurko GospodnetiÄ wrote:
> Hi all.
> Attached is a patch for the NORMALIZE_PATH builtin rule as well as an
> appropriate update for the path.jam module where that rule was being
> used to implement path.join and related operations.
> As it was written before the rule had some 'random' behavior in some
> borderline cases such as: passing it a folder whose path starts with a
> backslash (not a slash) or passing it an empty initial path element or
> some other combinations with empty path elements. In those cases it
> would sometimes 'incorrectly' root or un-root the path (add or remove
> the leading slash).
> Also, now it works correctly with multiple successive path separator
> characters in any position (beginning, middle or end) which makes native
> path processing more general.
> Due to this rule having some 'messy' behavior the path.join rule and
> its user make-NT rule had some twisted logic in them to work around all
> the problems this causes. This patch invalidates this logic and it has
> been replaced now with much simpler one (detailed comments added).
> Other NORMALIZE_PATH callers should not be affected since both the
> old and the new version work the same on 'regular' paths (i.e. those not
> mentioned above).
> The new functionality for recognizing Boost Jam versions has been
> used to make Boost Build scripts use the old path functionality when
> using Boost Jam older than 3.1.17 and use the new functionlity otherwise.
> As consequence, if and when this patch is applied everyone using the
> trunk version of Boost Build and an older 3.1.17 version of Boost.Jam
> will need to recompile their Boost Jam executable.
> The patch does not affect any Boost Build test results.
> Could someone please review this and let me know if it is ok to
> commit it?
Oh, this patch is big and scary :-) I trust your judgement on this one --
if you think it's ready to go in, please commit.
Boost-Build 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