Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2007-05-11 09:01:40

John Reid wrote:

> Hi,
> The custom generator in tools\build\v2\example\generator is a nice
> example and I have used it as a template to create my own generator.
> However I would like bjam --clean to remove the generated files. This
> doesn't happen (either in my generator or the example). Is there
> something I can do to enable this?

Unfortunately there was a bug in example. I've checked in the
attached patch to fix it, and now generated files are removed.
I think you should easily do the same in your code.

The virtual-target.register is exactly what collects the list
of targets to remove. It also does some pruning, so if you manage
to invoke your generator twice with exactly same sources and
properties, it will return the same set of targets, not two
different sets. Therefore, virtual-target.register should always
be called on result, but as you've noticed, it's easy to forget.


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