From: Rene Rivera (grafik666_at_[hidden])
Date: 2002-03-18 11:04:42
On 2002-03-14 at 08:43 AM, david.abrahams_at_[hidden] (David Abrahams) wrote:
>----- Original Message -----
>From: "Thomas Witt" <witt_at_[hidden]>
>> Attached is a new version of the template feature patch for
>> (current cvs).
Much thanks Tim :-)
I've put in the functionality into the latest CVS state. It's implemented as
"basis" per Dave's suggestion below.
I did not just apply the patch but only used it as a guide to the
functionality ;-\ It turns out we had some of the code that you wrote already
I also took the opportunity to clean up code and remove some related bugs.
>Here are the problems I noticed:
>* You left ECHOs you were using for debugging in the code
>* When a rule has an argument list, repeating "rule name ( args + :
>arg )" in the comment is redundant
>* The comments don't give enough info (e.g. "returns sources with path
>added" - added how?)
I fixed that for this, and a few other places also. More comments added to the
new code, and existing code. The code is still in dire need of more comments
but alas no time for it right now.
>* Code like the following probably ought to be done by iterating over a
>list of target categories:
> if $(gTARGET_TYPE_ID($(grist))) in $(STATIC_TYPES)
> libs += $(dependency) ;
> if $(gTARGET_TYPE_ID($(grist))) in $(SHARED_TYPES)
> dlls += $(dependency) ;
> if $(gTARGET_TYPE_ID($(grist))) in $(TEMPLATE_TYPES)
> templates += $(dependency) ;
Done. Specifically target rules are turning more and more into object like
things and in this case have a variable to indicate the above.
>* Rule declare-local-target was already getting too long. Now it's
>/really/ too long. Please refactor
Done. I think it's actually smaller now, except for the additional comments I
put in it :-)
One big thing I added is the concept of "modifiers" analogous to "generators".
The basis rule is implemented with a MODIFIER_FUNCTION that does the work of
changing the specs of the target.
>* There's no 'e' in "paths".
No, not in American English ;-]
>> I tried to reduce code duplication this time, though there are still
>> issues. I suspect there might be a better solution for grist-templates
>> add-path rules. Rene could you have a look into this ? I can't do
>grist-templates looks like a cheap but effective hack. It probably does
>too much work, though, and should be fixed up at some point.
Done. Replaced it with a much shorter and more widely used "target-id-of"
>It's not overloaded in Boost.Build, and certainly not in the context of
>target specification. Anyway, one last try at changing the name:
Basis seems fine to me.
-- grafik - Don't Assume Anything
-- rrivera_at_[hidden] - grafik_at_[hidden]
-- 102708583_at_icq - Grafik666_at_AIM - Grafik_at_[hidden]
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