Boost logo

Boost-Build :

From: Richard Peters (richard_at_[hidden])
Date: 2006-03-28 11:26:01


>> > I noticed a problem with executing actions where one of the commands
>> > exits with a failure.
>> > I'm running on Windows 2000, Boost.Build V2 (Milestone 10) from CVS,
>> > Boost.Jam 03.1.12, and using MS VC, trying to compile an idl file.
>> > This is the action used:
>> >
>> > actions compile.idl
>> > {
>> > $(.IDL) <...>
>> > $(TOUCH_FILE) "$(<[4]:W)"
>> > $(TOUCH_FILE) "$(<[5]:W)"
>> > }
>
> You can use this:
>
> $(.IDL) <...> &&
> $(TOUCH_FILE) "$(<[4]:W)" &&
> $(TOUCH_FILE) "$(<[5]:W)"
>
> to achieve the effect you want.

 The problem also occurs with normal linking:

    ..\..\..\nt\libs\std\bin\msvc\debug\std.dll : fatal error LNK1120: 4
    unresolved externals
    ...updated 124 targets...

 This is the result of a normal lib rule. In msvc.jam, an if statement
 follows the link action, giving this incorrect 'updated 124 targets'
result,
 and as a result, the destination library is not removed by bjam.

 Appending && to all multiline actions seems like an ugly hack for a quite
 general problem. Surely there must be a better way to make bjam stop on an
 error on any line in an action, not just the last?

 FWIW, applying the proposed fix in msvc.jam, I get bjam to exit with an
 error :

    ..\..\..\nt\libs\std\bin\msvc\debug\std.dll : fatal error LNK1120: 4
    unresolved externals

            call "C:\Program Files\Microsoft Visual Studio .NET
    <.....>

    ...failed msvc.link.dll ..\..\..\nt\libs\std\bin\msvc\debug\std.dll
    ..\..\..\nt\libs\std\bin\msvc\debug\std.lib...
    ...removing ..\..\..\nt\libs\std\bin\msvc\debug\std.lib
    ...failed updating 1 target...

 but then the && should be applied to all multi-lined actions. I hope that
 there is a better solution.

 best regards,

 Richard


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