|
Boost-Build : |
Subject: Re: [Boost-build] Identifying target-name in jamfile
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2016-05-29 16:59:15
AMDG
On 05/29/2016 02:37 PM, Edward Diener wrote:
> On 5/29/2016 3:18 PM, Steven Watanabe wrote:
>>
>> The rules like exe, run, obj, etc, register
>> the targets. Each project essentially stores
>> a map of target names to main-target's.
>
> What does "registering a target" entail ? I have a non-local rule in a
> jamfile that evidently Boost Build recognizes as creating a target, but
> I don't know how Boost Build recognizes it as a target. Whatever
> "registering a target" means I am not doing this for the rule.
>
From the point of view of Boost.Build internals,
a project is effectively a container for targets.
When you call the rules for creating targets, they:
a) Call [ project.current ] to find the project
that is currently being loaded.
b) Create an object that represents the target,
e.g. [ new typed-target ... ]
c) Insert the object (b) in the project (a),
via targets.main-target-alternative.
If your rule calls any of the builtin rules,
then they'll handle the registration for you.
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