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