Boost logo

Boost-Build :

Subject: Re: [Boost-build] Building generator (from source) that generates cpp
From: Samuel Debionne (debionne_at_[hidden])
Date: 2009-06-30 12:44:11

Thank you Volodya,
your patch worked ! Thank you for your explanation as well, I could not
have figured out this issue on my own.
Is there any chance to have this fix in future releases ?
If I had found the examples/built_tool before, I would have problably gone
this way...

> On Monday 29 June 2009 Samuel Debionne wrote:
>> Hello,
>> I'm using BBV2 to build my own projects for quite a long time. Right now
>> I'm facing the following issue : I want to generate CPP from an other
>> type
>> of file and I want this home made generator to be build from source when
>> necessary. This is basically what Quickbook toolset does so I try to
>> start
>> from that.
>> The strange thing is that, as long as I don't generate CPP but other
>> file
>> type (XML, what ever), it's fine. But when targeting CPP, I can't build
>> the generator 'automatically'.
>> I include a small test case that shows my problem. To play with the test
>> case, unzip next to your boost_1_39_0 directory.
>> If I try to build the generator directly (i.e. bjam tool/mygen with my
>> test case) it's fine. If I try to build the target that uses the
>> generator
>> (i.e. bjam) I get the following message :
>> warn: Unable to construct tool/mygen
>> error: no generators were found for type 'EXE'
>> error: and the requested properties
>> error: make sure you've configured the needed tools
> Samuel,
> what is happening is that you are building EXE target, which uses
> generator, which then recursively builds sources, invoking your custom
> generator. This, in turn, tries to build another EXE target, again using
> generator. However, there's a safety net against infinite
> recursion,
> which blocks second invocation of the same generator.
> I have just checked in patch to make this logic somewhat more relaxed,
> so if you update from SVN, your project should work.
> If you wonder why this issue did not appear earlier, there are two
> reasons:
> 1. quickbook generator is not building EXE, so this double-invocation
> of generator does not happen.
> 2. The method quickbook uses is the most flexible, but also most
> complex. The approach demonstrated by examples/built_tool is
> considerably easier, and I suspect that's what most users do. Of
> course, if your project works after SVN update, there's no reason
> for you do change anything.
> Hope this helps,
> Volodya
> _______________________________________________
> Unsubscribe & other changes:

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