From: Vladimir Prus (ghost_at_[hidden])
Date: 2006-02-10 05:30:07
On Monday 06 February 2006 18:17, Mark Evans wrote:
> Proposed implementation for the requested feature are attached to ticket
> #33 (mods to build/type.jam and build/virtual-target.jam). See
> Added a rule type.set-generated-target-prefix that follows the pattern of
> Criticism is welcome from more experienced bb2 developers. Not sure what
> documentation would have to be touched in order to adopt this.
I'm sorry that I could not review that patch when promised, but here the
Overall, the patch is in the right direction, however there are some glitches.
The 'generated-target-ps' rule has a 'ps' argument can supposed can be either
'prefix', or 'suffix'. However, the rule makes unconditional call to
'generatated-target-prefix-real'. In fact, I don't see 'ps' argument used
anywhere except for 'key' computation.
Whenever you see "some-rule" and "some-rule-real" combination in V2, the
second is the rule that does all the work, and the first adds caching on top
of the second. Because of that, 'generated-target-ps' should call
'generated-target-ps-real', forwaring the 'ps' argument.
The parameter to 'generated-target-ps-real' rule is called 'psn' in your
patch, but the rule does not use such argument -- it uses 'ps'. Such errors
sometimes go undetected due to dynamic scoping in bjam, but it's still an
There's no need to have 'generated-target-prefix-real' rule at all, or
'generated-target-suffix-real'. Say, I want to know target suffix. Then the
sequence of calls will be
3. (unless already cached) generated-target-ps-real
I see your comment that 'generated-target-suffix-real' is now unused, but if
you modify 'generated-target-ps' to call 'generated-target-ps-real', instead
of 'generated-target-prefix-real', the 'generated-target-prefix-real' will be
unused as well. Essentially, you'll inline that rule in the only caller.
After that, both 'generated-target-prefix-real' and
'generated-target-suffix-real' can be removed.
I'm looking forward to updated patch!
Concerning the patch format: if you have CVS checkout it's preferred if
patches are submitted as output of "cvs diff -u" command, as documented in
the hacking.txt file. Amount the primary advantages is that your changes can
be more conveniently merged with the independent changes made by others.
If you have techical issues with using CVS, let me know.
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