From f0055186869e9b448b07522ec52a8ac39836683a Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Thu, 18 Oct 2007 16:11:41 +0000 Subject: [PATCH] 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. [SVN r40156] --- build/Jamfile.v2 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index dbb16b09..53691502 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -12,6 +12,9 @@ project boost/python : 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 @@ lib boost_python # 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. - /python//python_for_extensions + [ cond [ python.configured ] : /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 ] : no ] : # default build shared