Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r84231 - trunk/tools/build/v2/build
From: steven_at_[hidden]
Date: 2013-05-10 20:28:40


Author: steven_watanabe
Date: 2013-05-10 20:28:39 EDT (Fri, 10 May 2013)
New Revision: 84231
URL: http://svn.boost.org/trac/boost/changeset/84231

Log:
Avoid accidentally changing property values by using Jam's path parsing.
Text files modified:
   trunk/tools/build/v2/build/property.jam | 53 +++++++++++++++++++++------------------
   1 files changed, 28 insertions(+), 25 deletions(-)

Modified: trunk/tools/build/v2/build/property.jam
==============================================================================
--- trunk/tools/build/v2/build/property.jam (original)
+++ trunk/tools/build/v2/build/property.jam 2013-05-10 20:28:39 EDT (Fri, 10 May 2013)
@@ -518,45 +518,48 @@
             if [ feature.is-implicit-value $(property) ]
             {
                 feature = [ feature.implied-feature $(property) ] ;
- result += $(feature)$(property) ;
+ result += $(condition:E=)$(feature)$(property) ;
             }
             else
             {
                 import errors ;
                 errors.error "'$(e)' is not a valid property specification" ;
             }
- }
- local attributes = [ feature.attributes $(feature) ] ;
- local value ;
- # Only free features should be translated
- if free in $(attributes)
- {
- if path in $(attributes)
- {
- value = [ translate-path-value $(property:G=) : $(project-location) ] ;
- }
- else if dependency in $(attributes)
+ } else {
+ local attributes = [ feature.attributes $(feature) ] ;
+ local value ;
+ # Only free features should be translated
+ if free in $(attributes)
             {
- value = [ translate-dependency-value $(property:G=) : $(project-id) : $(project-location) ] ;
- }
- else
- {
- local m = [ MATCH ^@(.+) : $(property:G=) ] ;
- if $(m)
+ if path in $(attributes)
                 {
- value = [ translate-indirect-value $(m) : $(context-module) ] ;
+ value = [ translate-path-value $(property:G=) : $(project-location) ] ;
+ result += $(condition:E=)$(feature)$(value) ;
+ }
+ else if dependency in $(attributes)
+ {
+ value = [ translate-dependency-value $(property:G=) : $(project-id) : $(project-location) ] ;
+ result += $(condition:E=)$(feature)$(value) ;
                 }
                 else
                 {
- value = $(property:G=) ;
+ local m = [ MATCH ^@(.+) : $(property:G=) ] ;
+ if $(m)
+ {
+ value = [ translate-indirect-value $(m) : $(context-module) ] ;
+ result += $(condition:E=)$(feature)$(value) ;
+ }
+ else
+ {
+ result += $(condition:E=)$(property) ;
+ }
                 }
             }
+ else
+ {
+ result += $(condition:E=)$(property) ;
+ }
         }
- else
- {
- value = $(property:G=) ;
- }
- result += $(condition:E=)$(feature)$(value) ;
     }
     return $(result) ;
 }


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