Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r83850 - trunk/tools/build/v2/util
From: steven_at_[hidden]
Date: 2013-04-11 17:22:24


Author: steven_watanabe
Date: 2013-04-11 17:22:24 EDT (Thu, 11 Apr 2013)
New Revision: 83850
URL: http://svn.boost.org/trac/boost/changeset/83850

Log:
Optimize path.native
Text files modified:
   trunk/tools/build/v2/util/path.jam | 15 +++++++--------
   1 files changed, 7 insertions(+), 8 deletions(-)

Modified: trunk/tools/build/v2/util/path.jam
==============================================================================
--- trunk/tools/build/v2/util/path.jam (original)
+++ trunk/tools/build/v2/util/path.jam 2013-04-11 17:22:24 EDT (Thu, 11 Apr 2013)
@@ -493,16 +493,12 @@
 
 rule native-NT ( path )
 {
- local result ;
- if [ is-rooted $(path) ] && ! [ regex.match "^/(.:)" : $(path) ]
+ local remove-slash = [ MATCH "^/(.:.*)" : $(path) ] ;
+ if $(remove-slash)
     {
- result = $(path) ;
+ path = $(remove-slash) ;
     }
- else
- {
- result = [ MATCH "^/?(.*)" : $(path) ] ;
- }
- return [ regex.replace $(result) / \\ ] ;
+ return [ regex.replace $(path) / \\ ] ;
 }
 
 
@@ -707,6 +703,9 @@
     return $(native) ;
 }
 
+# Remove one level of indirection
+IMPORT $(__name__) : make-$(os) native-$(os) : $(__name__) : make native ;
+EXPORT $(__name__) : make native ;
 
 rule __test__ ( )
 {


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