Subject: Re: [Boost-build] dynamically editing the bjam dependency graph
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2017-09-01 03:39:14
On 08/31/2017 09:10 PM, Stefan Seefeld via Boost-build wrote:
> I'm still struggling with implementing the dynamic editing of the bjam
> dependency graph (as outlined in
> https://github.com/stefanseefeld/faber/wiki/Workflow). While I believe I
> have worked out the Python frontend, the bjam backend isn't quite
> cooperating the way I expect.
> Consider this test code:
The reason this fails is that dependencies
are processed once by make1a, when the target
is first pushed into the stack. This happens
before 'gen' is executed, so the additional
dependencies that it adds are ignored. Handling
this correctly probably requires significant
changes to make1.
Also, I notice that b is marked as always, so
c will also always be updated regardless of whether
it's actually out-of-date.
> echo = action('echo', 'echo $(<) $(>)')
> c = artefact('c', attrs=notfile)
> def generate(*args, **kwds):
> """generate the graph for c."""
> a = rule('a', recipe=echo, attrs=notfile|always)
> a1 = rule('a1', a, recipe=echo, attrs=notfile|always)
> a2 = rule('a2', a1, recipe=echo, attrs=notfile|always)
> rule(c, a2, recipe=echo, attrs=notfile)
> b = rule('b', recipe=action('gen', generate), attrs=notfile|always)
> c = depend(c, b)
> default = c
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