|
Boost-Build : |
Subject: Re: [Boost-build] Reporting include paths for a project
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2014-01-29 17:31:07
AMDG
On 01/29/2014 02:16 PM, Nogradi, Chris wrote:
> <snip>
>
> I am trying to use this example to get all the source (C or H) for a target and then run a script against them using the original include/define for each of them. This example works much better than creating a new toolset because it can work alongside existing toolsets and features specified on the command line. But in my application the path/to/your/project/ needs to be the target specified on the command line:
>
> generate print-includes : $(target-from-command-line) : @print-all-includes ;
>
> Is there an easy way to do this? Assuming mytarget is an existing target that I want to apply the script against, I don't care much for this:
>
> bjam --target=mytarget print-includes
>
This may not be ideal, but it's probably
the most reliable solution at the moment.
I think what's really needed is the ability
to write scripts that can call into
Boost.Build from the top level. By the
time we're processing a single target,
accessing the targets specified on the
command line is not really feasible.
(Not to mention that it would create
a cyclic dependency, since the list of
command line targets would itself
contain print-includes)
> and would much prefer this:
>
> bjam mytarget print-includes
>
> Any ideas on how to accomplish this without creating another toolset since I still want to be able to do this:
>
> bjam mytarget print-includes msvc
>
> or
>
> bjam mytarget print-includes gcc
>
In Christ,
Steven Watanabe
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