Boost logo

Boost-Build :

Subject: Re: [Boost-build] Problem with notfile target
From: Ian Emmons (iemmons_at_[hidden])
Date: 2008-11-30 16:12:53


Thanks for your help.

On Nov 29, 2008, at 1:05 PM, Steven Watanabe wrote:

> Ian Emmons wrote:
>>> Probably, instead of adding the target to sources, you can use
>>> <dependency>JniHeaders
>>> in requirements?
>>> - Volodya
>> Thanks for the quick reply.
>> Your suggestion does indeed cause the JniHeaders target to run
>> before the library is built, but it has two undesirable side effects:
>> * It causes the library is completely rebuilt every time, as if I
>> did a bjam --clean beforehand.
> notfile targets are always built. You can try something like:
> make JniHeaders.txt : : @BuildJniHeaders ;
> alias JniHeaders : JniHeaders.txt ;
> actions BuildJniHeaders
> {
> ant jniHeaders
> echo Updated >$(<)
> }
> so that bjam has something to check the timestamp of.

I haven't had time to try this yet, but I will soon. I may well be
able to use this as a starting point for doing fewer of the build
steps in the ant script and more in the jam file, which is probably
the right way to do this anyway. (Ultimately, it would be great to
extend so that it has built-in support for JNI header
generation, and even Java compilation.)

>> * It causes the JniHeaders target to run after the library is built
>> as well (i.e., it runs twice).
> explicit JniHeaders ;

That works!

>> It would be nice if the lib rule could just ignore source
>> dependency targets of unknown type.
> How would that help?

You're right, it wouldn't help at all. That was an ill-considered
newbie comment -- sorry.

One more question: What does AMDG stand for?

Thanks again,


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