Boost logo

Boost-Build :

From: Daniel Einspanjer (deinspanjer_at_[hidden])
Date: 2006-02-13 10:41:45

"Vladimir Prus" <ghost_at_[hidden]> wrote in message
>> > 1. The '<implicit-dependency>' won't automatically build 'msg'. It just
>> > means
>> > 'I think there's header in 'msg' that this target depends on'. This is
>> > by
>> > design (though if you think that's wrong design, I'm open to
>> > arguments).
>> I would expect msg to be built by a bjam test if the mc file changed
>> since
>> the header is a dependant of that file. Would you agree?
> No, not quite. The header should be rebuilt, because it's dependendant of
> ".mc" file and it's included by 'log.cpp' and 'log.cpp' is being built.
> But you did not request build of the 'msg' target, so it's not build. If
> you
> want 'msg' to be always built when you build 'test', you add the
> <dependency>msg. Otherwise, only required target, in this case the
> generated
> header, will be built.

I understand the distinction you are making here. I agree that, in this
case, only the header should be built, not the dll.

>> If msg were a static lib instead of a shared lib, building an exe that
>> depended on msg should cause msg to be rebuilt if msg.cpp.
> Seems like you've omitted something in that sentence. I assume "if msg.cpp
> is
> out-of-date". Yes, if "exe" target depends on "msg", then "msg" will be
> rebuild if is modified.
>> In this case
>> however, I would agree that <implicit-dependency> alone shouldn't cause
>> that behavior. In that case, I think the exe target should have both
>> <implicit-dependency> and <dependency> to indicate the two subtly
>> different
>> dependencies on the msg target.
> If your exe uses the library at link time, then add the library to the
> sources, and use extra <implicit-dependency> as a hint about generated
> headers.
> If you exe uses a shared library as plugin, it might be desirable to build
> the
> library whenever the exe is built, without linking to it. In that case
> <dependency> + <implicit-dependency> is best.

This all makes sense to me.

> Ok, great. I've just comitted the *right* fix for this problem:
> it differs only by the location where new code is added, and extra
> comments
> and tests.
> Can you undo the patch I've sent previously, update to current CVS and see
> if
> everything's OK.
Done and my targets continue to build in the fashion you indicated above.

Thanks for helping me with this!


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