Boost logo

Boost-Build :

From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-08-08 16:17:10


Ray Lambert wrote:
> I've had some success in the past using SHELL, which appears to execute
> the named command immediately when the SHELL rule is parsed. However,
> this relied on a shell script which I need to eliminate (and shell
> scripts don't need to be built). I've tried invoking an external copy
> of bjam using SHELL and it seemed to work in isolation (despite not
> being able to sense build failure or to participate in --clean) but, now
> that I've integrated it with the main build, I'm finding that it causes
> an endless string of recursive invocations of bjam, which I can only
> stop by logging out (on windows).

You can prevent this with something like

if ! --in-recursive-invocation-of-bjam in [ modules.peek : ARGV ] {
    SHELL bjam --in-recursive-invocation-of-bjam ... ;

> I've had a real frustrating time getting this to work and I hope that
> someone can point me in the right direction.

This is not really an easy problem.
bjam decides what targets it needs to build
before building anything. A full solution would
have to modify bjam to allow actions that might
update a target.

rule foo {
    ALWAYS $(<) ;

actions delay-checking-dependents foo {

In Christ,
Steven Watanabe

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