Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2008-06-12 12:41:56

On Thursday 12 June 2008 19:51:41 Robert Langlois wrote:
> Hi Everyone,
> How can I get the build path of a target? For example, say I create a
> target:
> python-extension test-lib ;
> This file ends up in the following path:
> bin/programs/learn/python/gcc-4.0.2/debug/threading-multi
> I wanted to know if there is a rule that already exists to get this path in
> a platform independent way.
> The reason I need this path is that I am trying to prefix the python
> interpretor with another command (mpiexec) and the PYTHONPATH environment
> variable is nullified in some way when I do this. So, I propose to pass the
> path of the shared file to a python script to get around this problem.

Your email is a little bit obscure as to what you're trying to do. To answer
your question -- during Jamfile parsing, it's not possible to get the path
of the target, because you cna build your project with 10 different property
sets. Inside a generator, you have a specific property set, and can get a
path for a target (see virtual-target.path method). Inside an rule/action
pair you also can get a path to the target.

I suggest you describe your use-case more concretely.

- Volodya

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at