Boost logo

Boost-Commit :

From: ghost_at_[hidden]
Date: 2008-04-01 13:53:45


Author: vladimir_prus
Date: 2008-04-01 13:53:45 EDT (Tue, 01 Apr 2008)
New Revision: 43987
URL: http://svn.boost.org/trac/boost/changeset/43987

Log:
Make logic for old-sprit-demanding compilers work.

The previous code was all broken, trying to mix conditional
requirements and indirect conditional requirements like:

    <toolset>borland:<conditional>@include-spirit

Text files modified:
   trunk/libs/serialization/build/Jamfile.v2 | 47 ++++++++++++++++++++++++++-------------
   1 files changed, 31 insertions(+), 16 deletions(-)

Modified: trunk/libs/serialization/build/Jamfile.v2
==============================================================================
--- trunk/libs/serialization/build/Jamfile.v2 (original)
+++ trunk/libs/serialization/build/Jamfile.v2 2008-04-01 13:53:45 EDT (Tue, 01 Apr 2008)
@@ -9,22 +9,43 @@
 project boost/serialization
     : source-location ../src
     : requirements <dependency>../../config/test//BOOST_NO_STD_LOCALE
+ <conditional>@include-spirit
 ;
 
 SPIRIT_ROOT = [ modules.peek : SPIRIT_ROOT ] ;
 rule include-spirit ( properties * )
 {
- local result ;
- if ( $(SPIRIT_ROOT) ) {
- # note - we can't use <include>$(SPIRIT_ROOT) because
- # it puts -I$(SPIRIT_ROOT) AFTER the "../../.." in the command line.
- # so use these instead
- result = <cxxflags>-I$(SPIRIT_ROOT) ;
+ local old-compiler ;
+ if <toolset>borland in $(properties)
+ {
+ old-compiler = true ;
     }
- else {
- echo **** spirit 1.6x required to build library with this compiler **** ;
- result = <build>no ;
+ else if <toolset>msvc in $(properties)
+ {
+ if <toolset-msvc:version>6.5 in $(properties)
+ || <toolset-msvc:version>7.0 in $(properties)
+ {
+ old-compiler = true ;
+ }
     }
+
+ local result ;
+ if $(old-compiler)
+ {
+ if $(SPIRIT_ROOT)
+ {
+ # note - we can't use <include>$(SPIRIT_ROOT) because
+ # it puts -I$(SPIRIT_ROOT) AFTER the "../../.." in the command line.
+ # so use these instead
+ result = <cxxflags>-I$(SPIRIT_ROOT) ;
+ }
+ else
+ {
+ echo **** spirit 1.6x required to build library with this compiler **** ;
+ result = <build>no ;
+ }
+ }
+ return $(result) ;
 }
 
 SOURCES =
@@ -72,19 +93,13 @@
     : $(SOURCES).cpp
     :
     <toolset>msvc:<cxxflags>/Gy
- <toolset>msvc-6.5:<conditional>@include-spirit
- <toolset>msvc-7.0:<conditional>@include-spirit
- <toolset>borland:<conditional>@include-spirit
     <link>shared:<define>BOOST_SERIALIZATION_DYN_LINK=1
     ;
 
 lib boost_wserialization
     : $(WSOURCES).cpp boost_serialization
- :
+ :
     <toolset>msvc:<cxxflags>/Gy
- <toolset>msvc-6.5:<conditional>@include-spirit
- <toolset>msvc-7.0:<conditional>@include-spirit
- <toolset>borland:<conditional>@include-spirit
     <dependency>../../config/test//BOOST_NO_STD_WSTREAMBUF
     <link>shared:<define>BOOST_SERIALIZATION_DYN_LINK=1
     ;


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