|
Boost-Build : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-05-03 09:59:44
On Friday 29 April 2005 18:10, David Abrahams wrote:
> > 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.
Neither do I, but the real problem is that conditions in usage requirements
are evaluated when main target is build. So, inside 'alias', <target-type>
won't be "DLL", but most likely undefined.
> 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?
This would prevent making a non-extension DLL that links to Python. But if we
replace
!<target-type>DLL:<library-path>$(libraries)
!<target-type>DLL:<find-shared-library>python$(version)
with
!<target-type>PYTHON_EXTENSION:<library-path>$(libraries)
!<target-type>PYTHON_EXTENSION:<find-shared-library>python$(version)
Thing start looking nicer. But since we don't have negation in conditionals
and conditionals are evaluated immediately, this is not easy to make work.
- Volodya
-- Vladimir Prus http://vladimir_prus.blogspot.com Boost.Build V2: http://boost.org/boost-build2
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