Boost logo

Boost-Build :

From: K. Noel Belcourt (kbelco_at_[hidden])
Date: 2006-09-22 22:57:52

On Sep 21, 2006, at 12:55 AM, Ilya Sokolov wrote:

> [snip]
>>> read
>>> Boost.Build_V2/UsingBuiltTool
>> This is an elegant solution if only I could make it work. The
>> COMMAND is not built before it's used in the actions. It may be that
>> the way I'm using it is the problem, not sure. This is what I've got
>> so far.
>> # xmldb.jam
>> feature inline-binary : : free dependency ;
>> toolset.flags xmldb.concat.xml COMMAND <inline-binary> ;
>> type.register XML : xml ;
>> type.register XMLDB : xmldb ;
>> generators.register-composing xmldb.concat.xml : XML : XMLDB ;
>> actions xmldb.concat.xml bind COMMAND
>> {
>> $(COMMAND) $(<) $(>)
>> }
>> # xmlconcat.jam
>> exe xmlc : $(source-files) ;
>> # parser.jam
>> import xmldb ;
>> xmldb foo.db : main.xml : <inline-binary>/xmlconcat//xmlc ;

Hi Ilya,

I was mistaken, again. Using this form of <inline-binary> works
fine. The reason I thought it failed is that I was building -j2. If
I build serially both the alias and the project // target syntax work
fine. But when I build in parallel, both the alias and project //
target form fail.

I think the reason it fails in parallel is that the action is
correctly queued up behind the executable it depends on but the
action tries to invoke the executable before the previous action has
finished linking it.

Here's an example where the xmldb.concat.xml action uses the xmlc
executable. This works fine in serial but in parallel, the
xmldb.concat.xml action tries to invoke the xmlc executable before
it's finished linking. /var/scratch2/noel_db/scms/2.01/gcc-3.4.3/debug/xmlc
xmldb.concat.xml /var/scratch2/noel_db/presto/votd/gcc-3.4.3/debug/

Does that make sense? Is there any easy way to make the action wait
until the executable it depends on has finished linking?

-- Noel

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