Boost logo

Boost-Commit :

From: grafikrobot_at_[hidden]
Date: 2007-10-18 12:11:41


Author: grafik
Date: 2007-10-18 12:11:41 EDT (Thu, 18 Oct 2007)
New Revision: 40156
URL: http://svn.boost.org/trac/boost/changeset/40156

Log:
Fix build system error when Python is not configured, without preventing the BPL target from being declared. Instead the target is now unbuildable, and will be skipped when Python is not configured.
Text files modified:
   trunk/libs/python/build/Jamfile.v2 | 10 +++++++++-
   1 files changed, 9 insertions(+), 1 deletions(-)

Modified: trunk/libs/python/build/Jamfile.v2
==============================================================================
--- trunk/libs/python/build/Jamfile.v2 (original)
+++ trunk/libs/python/build/Jamfile.v2 2007-10-18 12:11:41 EDT (Thu, 18 Oct 2007)
@@ -12,6 +12,9 @@
   : source-location ../src
   ;
 
+rule cond ( test ? : yes * : no * ) { if $(test) { return $(yes) ; } else { return $(no) ; } }
+rule unless ( test ? : yes * : no * ) { if ! $(test) { return $(yes) ; } else { return $(no) ; } }
+
 lib boost_python
     : # sources
     numeric.cpp
@@ -60,7 +63,12 @@
         # python_for_extensions is a target defined by Boost.Build to
         # provide the Python include paths, and on Windows, the Python
         # import library, as usage requirements.
- <library>/python//python_for_extensions
+ [ cond [ python.configured ] : <library>/python//python_for_extensions ]
+
+ # we prevent building when there is no python available
+ # as it's not possible anyway, and to cause dependents to
+ # fail to build
+ [ unless [ python.configured ] : <build>no ]
       
     : # default build
         <link>shared


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