Ticket #3544: boost_build_pythonid.patch

File boost_build_pythonid.patch, 2.7 KB (added by Gaudenz Steinlin <gaudenz@…>, 13 years ago)
  • Jamroot

    old new  
    339339    constant BUILD_ID : [ regex.replace $(build-id) "[*\\/:.\"\' ]" "_" ] ;
    340340}
    341341
     342# Python build id (only for Python libraries)
     343local python-id = [ MATCH "^--pythonid=(.*)" : [ modules.peek : ARGV ] ] ;
     344if $(python-id)
     345{
     346    constant PYTHON_ID : [ regex.replace $(python-id) "[*\\/:.\"\']" "_" ] ;
     347}
    342348
    343349# This rule is called by Boost.Build to determine the name of target. We use it
    344350# to encode the build variant, compiler name and boost version in the target
  • libs/python/build/Jamfile.v2

    old new  
    33# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
    44
    55import os ;
     6import indirect ;
    67import modules ;
    78
    89import python ;
     
    2425
    2526project boost/python
    2627  : source-location ../src
     28  : requirements
     29    -<tag>@$(BOOST_JAMROOT_MODULE)%$(BOOST_JAMROOT_MODULE).tag
     30    <tag>@$(__name__).tag
    2731  ;
    2832
     33rule tag ( name : type ? : property-set )
     34{
     35    local result = $(name) ;
     36    if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB
     37    {
     38        if $(name) = boost_python && $(PYTHON_ID)
     39        {
     40            result = $(result)-$(PYTHON_ID) ;
     41        }
     42    }
     43   
     44    # forward to the boost tagging rule
     45    return  [ indirect.call $(BOOST_JAMROOT_MODULE)%$(BOOST_JAMROOT_MODULE).tag
     46                $(result) : $(type) : $(property-set) ] ;
     47}
     48
    2949rule cond ( test ? : yes * : no * ) { if $(test) { return $(yes) ; } else { return $(no) ; } }
    3050rule unless ( test ? : yes * : no * ) { if ! $(test) { return $(yes) ; } else { return $(no) ; } }
    3151
  • libs/mpi/build/Jamfile.v2

    old new  
    99#           Andrew Lumsdaine
    1010
    1111import mpi ;
     12import indirect ;
    1213import python ;
    1314
    1415libraries = ;
     
    1819
    1920project boost/mpi
    2021  : source-location ../src
     22  : requirements
     23    -<tag>@$(BOOST_JAMROOT_MODULE)%$(BOOST_JAMROOT_MODULE).tag
     24    <tag>@$(__name__).tag
    2125  ;
    2226
     27rule tag ( name : type ? : property-set )
     28{
     29    local result = $(name) ;
     30    if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB
     31    {
     32        if $(name) = boost_mpi_python && $(PYTHON_ID)
     33        {
     34            result = $(result)-$(PYTHON_ID) ;
     35        }
     36    }
     37   
     38    # forward to the boost tagging rule
     39    return  [ indirect.call $(BOOST_JAMROOT_MODULE)%$(BOOST_JAMROOT_MODULE).tag
     40                $(result) : $(type) : $(property-set) ] ;
     41}
     42
    2343lib boost_mpi
    2444  :
    2545    broadcast.cpp