Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r80023 - trunk/tools/build/v2/util
From: jurko.gospodnetic_at_[hidden]
Date: 2012-08-14 01:03:49


Author: jurko
Date: 2012-08-14 01:03:49 EDT (Tue, 14 Aug 2012)
New Revision: 80023
URL: http://svn.boost.org/trac/boost/changeset/80023

Log:
Boost Build cleanup - removed support for Boost Jam versions prior to version 3.1.17 in the util/path.jam module. The backward compatibility code was ugly and compatibility with such versions has already been broken in other places (not to mention that such old versions have known defects and should not be used anywhere in the first place, and even if they are, they should be used with their corresponding old Boost Build version).
Text files modified:
   trunk/tools/build/v2/util/path.jam | 39 ++-------------------------------------
   1 files changed, 2 insertions(+), 37 deletions(-)

Modified: trunk/tools/build/v2/util/path.jam
==============================================================================
--- trunk/tools/build/v2/util/path.jam (original)
+++ trunk/tools/build/v2/util/path.jam 2012-08-14 01:03:49 EDT (Tue, 14 Aug 2012)
@@ -20,7 +20,6 @@
 import regex ;
 import sequence ;
 import set ;
-import version ;
 
 
 os = [ modules.peek : OS ] ;
@@ -169,27 +168,7 @@
                 errors.error only the first element may be rooted ;
             }
         }
- if [ version.check-jam-version 3 1 17 ]
- {
- return [ NORMALIZE_PATH "$(elements)" ] ;
- }
- else
- {
- # Boost Jam prior to version 3.1.17 had problems with its
- # NORMALIZE_PATH rule in case you passed it a leading backslash
- # instead of a slash, in some cases when you sent it an empty
- # initial path element and possibly some others. At least some of
- # those cases were being hit and relied upon when calling this rule
- # from the path.make-NT rule.
- if ! $(elements[1]) && $(elements[2])
- {
- return [ NORMALIZE_PATH / "$(elements[2-])" ] ;
- }
- else
- {
- return [ NORMALIZE_PATH "$(elements)" ] ;
- }
- }
+ return [ NORMALIZE_PATH "$(elements)" ] ;
     }
 }
 
@@ -497,21 +476,7 @@
 #
 rule make-NT ( native )
 {
- local result ;
-
- if [ version.check-jam-version 3 1 17 ]
- {
- result = [ NORMALIZE_PATH $(native) ] ;
- }
- else
- {
- # This old implementation is really fragile due to a not so clear way
- # NORMALIZE_PATH rule worked in Boost.Jam versions prior to 3.1.17. E.g.
- # path.join would mostly ignore empty path elements but would root the
- # joined path in case the initial two path elements were empty or some
- # similar accidental wierdness.
- result = [ path.join [ regex.split $(native) "[/\\]" ] ] ;
- }
+ local result = [ NORMALIZE_PATH $(native) ] ;
 
     # We need to add an extra '/' in front in case this is a rooted Windows path
     # starting with a drive letter and not a path separator character since the


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