|
Boost-Build : |
From: Larry Evans (cppljevans_at_[hidden])
Date: 2007-09-07 07:48:55
On 09/06/07 11:34, Larry Evans wrote:
> On 09/05/07 14:19, Vladimir Prus wrote:
> [snip]
>> Just calling a function does not automatically creates a main target.
>> There are just two ways to create a main target:
>>
>> - Call the targets.main-target-alternative
>> - Call some existing rule that creates main target. That will
>> will eventually call targets.main-target-alternative
>>
> I tried the 1st way by modifying:
>
> http://svn.boost.org/trac/boost/browser/trunk/tools/build/v2/example/customization/Jamfile
>
> as follows:
> <--- cut here ---
> import verbatim ;
> import targets ;
>
> exe codegen : codegen.cpp class.verbatim usage.verbatim
> t1.verbatim ;
>
> targets.main-target-alternative t1_cpp ;
>
> verbatim t1_cpp : t1.verbatim ;
> >--- cut here ---
[snip]
A simplified Jamfile:
<--- cut here ---
obj t1_obj : t1.verbatim ;
verbatim t1_cpp : t1.verbatim ;
>--- cut here ---
with some debug ECHO's at:
http://svn.boost.org/trac/boost/browser/trunk/tools/build/v2/build/targets.jam#L1532
shows targets.main-target-alternative is called for both t1_obj and
t1_cpp; however, the attempt to construct t1_cpp gives:
warn: Unable to construct ./t1_cpp
One difference between the processing is at:
http://svn.boost.org/trac/boost/browser/trunk/tools/build/v2/build/targets.jam#L1409
For t1_obj, r is non-null:
r='object(property-set)@9' r='object(file-target)@77'
; however, for t1_cpp, r is null at this point.
This seems like a bug because if t1.cpp is generated for
t1_obj, it should be generated for t1_cpp.
Is there some reason why a target (e.g. t1.cpp) is generated
when it's not a top-level target, but is not generated when it
is a top-level target (e.g. t1_cpp)?
( Maybe I'm mixing my terminology a bit in that I call t1.cpp
a target, when actually it's ./bin/gcc-4.1/debug/t1.cpp and
maybe should be called a "concrete target" whereas t1_cpp should be
called a meta-target or something else.)
TIA,
Larry.
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