Boost logo

Boost-Build :

Subject: Re: [Boost-build] Generating multiple CPP/H targets from a single source
From: Vladimir Prus (ghost_at_[hidden])
Date: 2010-08-14 05:16:43


On Friday 13 August 2010 13:13:59 Fabien Chêne wrote:

> [...]
>
> The bug is quite complex to describe, and I can imagine that I am not
> perfectly clear.
> So, I have created a reduced testcase that triggers the problem.
>
> Any help would be greatly appreciated.

Thank you for a testcase. Could you please try the attached patch?
It fixes your testcase, and if it fixes your real project as well,
I'll commit it.

It appears like we have an old bug inside Boost.Jam, inherited from
Perforce Jam. The bug is that if there is an action producing targets
T1 and T2, and other targets T'1 and T'2 depend on T1 and T2 respectively,
then then arriving at T2 Jam will notice that no further commands must
be run, since the command to update both T1 and T2 was already run.
However, it then, mistakenly, decides that since T2 has no commands, it's
built and starts building T'2. In your case, T'2 is testSK.o and T2
is testSK.cpp.

This is somewhat dependent on the order of targets, as you have noticed.
My patch is a workaround, which is easier than fixing C code.

Thanks,

--
Vladimir Prus
http://vladimir_prus.blogspot.com
Boost.Build: http://boost.org/boost-build2



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