Boost logo

Boost-Build :

From: David Abrahams (dave_at_[hidden])
Date: 2005-04-29 09:10:46


Vladimir Prus <ghost_at_[hidden]> writes:

> On Friday 29 April 2005 05:20, David Abrahams wrote:
>> Vladimir Prus <ghost_at_[hidden]> writes:
>> >> > So, the python_extension rule will add
>> >> > /python//python_for_extensions to the passed sources.
>> >>
>> >> And what is the python alias supposed to do, then?
>> >
>> > One can use it to link to the interpreter. Say, the 'embedding' test
>> > would link to /python//python
>>
>> I think the right wayt to handle this is to have a single alias,
>> "python," with some conditional usage-requirements that determine
>> whether you're explicitly linking to the interpreter.
>
> If I understand you correctly, we'd need another feature to control that, so
> that you could write:
>
> exe a : a.cpp /python//python/<really-link-to-python>yes ;

No, I'm not suggesting that. I'm suggesting:

alias python
: # sources

: # requirements

: # default-build

: # usage-requirements
<include>$(includes)
!<target-type>DLL:<library-path>$(libraries)
!<target-type>DLL:<find-shared-library>python$(version)
;

Well, I don't know how you do negative conditions. Maybe alternatives
work?

alias python
: # sources
: # requirements
: # default-build
: # usage-requirements
<include>$(includes)
;

alias python
: # sources
: # requirements
<target-type>DLL
: # default-build
: # usage-requirements
<include>$(includes)
<library-path>$(libraries)
<find-shared-library>python$(version)
;

Then you just throw "/python//python" into your list of sources and if
it's a DLL python extension it doesn't try to link to the Python
library.

Does this make sense to you?

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com
 

Boost-Build 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