Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r51007 - in trunk/tools/build/v2: build tools
From: ghost_at_[hidden]
Date: 2009-02-04 02:47:13


Author: vladimir_prus
Date: 2009-02-04 02:47:11 EST (Wed, 04 Feb 2009)
New Revision: 51007
URL: http://svn.boost.org/trac/boost/changeset/51007

Log:
Avoid duplicate target error when using <embed-manifest>off.
Patch from Alexey Pakhunov.

Text files modified:
   trunk/tools/build/v2/build/virtual-target.jam | 9 +++++++++
   trunk/tools/build/v2/tools/msvc.jam | 20 +++++++++++++-------
   2 files changed, 22 insertions(+), 7 deletions(-)

Modified: trunk/tools/build/v2/build/virtual-target.jam
==============================================================================
--- trunk/tools/build/v2/build/virtual-target.jam (original)
+++ trunk/tools/build/v2/build/virtual-target.jam 2009-02-04 02:47:11 EST (Wed, 04 Feb 2009)
@@ -655,6 +655,8 @@
     {
         NOTFILE $(target) ;
         ALWAYS $(target) ;
+ # TEMPORARY $(target) ;
+ NOUPDATE $(target) ;
     }
 }
 
@@ -675,6 +677,7 @@
     import property-set ;
     import indirect ;
     import path ;
+ import set : difference ;
 
     rule __init__ ( sources * : action-name + : property-set ? )
     {
@@ -700,6 +703,12 @@
         self.targets += $(targets) ;
     }
 
+ rule replace-targets ( old-targets * : new-targets * )
+ {
+ self.targets = [ set.difference $(self.targets) : $(old-targets) ] ;
+ self.targets += $(new-targets) ;
+ }
+
     rule targets ( )
     {
         return $(self.targets) ;

Modified: trunk/tools/build/v2/tools/msvc.jam
==============================================================================
--- trunk/tools/build/v2/tools/msvc.jam (original)
+++ trunk/tools/build/v2/tools/msvc.jam 2009-02-04 02:47:11 EST (Wed, 04 Feb 2009)
@@ -981,16 +981,22 @@
     {
         local result = [ linking-generator.generated-targets $(sources)
           : $(property-set) : $(project) $(name) ] ;
- if [ $(property-set).get <embed-manifest> ] = "off"
+
+ if $(result)
         {
- if ! $(name)
+ local name = [ $(result[0]).name ] ;
+ local action = [ $(result[0]).action ] ;
+
+ if [ $(property-set).get <embed-manifest> ] = "off"
             {
- name = [ determine-output-name $(sources) ] ;
+ local target = [ class.new file-target $(name) : MANIFEST : $(project) : $(action) ] ;
+ local registered-target = [ virtual-target.register $(target) ] ;
+ if $(action) && ( $(target) != $(registered-target) )
+ {
+ $(action).replace-targets $(target) : $(registered-target) ;
+ }
+ result += $(registered-target) ;
             }
-
- local action = [ $(result[0]).action ] ;
- result += [ virtual-target.register
- [ class.new file-target $(name) : MANIFEST : $(project) : $(action) ] ] ;
         }
         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