|
Boost-Build : |
From: Rene Rivera (grafik666_at_[hidden])
Date: 2002-03-27 11:09:28
On 2002-03-26 at 11:54 PM, david.abrahams_at_[hidden] (David Abrahams) wrote:
>
>----- Original Message -----
>From: "Rene Rivera" <grafik666_at_[hidden]>
>
>> Ahh, scary, yes. But it doesn't have be written in Jam.
>
>But it would be so much cooler!
And now that I think of it given what I say below it's not that hard. And
doesn't require HDR*.
>> >> So maybe a few rules that provide documentation in the form of
>long,
>> >short,
>> >> and brief. We can tie this either to modules or rule, or both. And
>> >then it
>> >> becomes possible to provide the "bjam --help-<module/rule-name>"
>> >> functionality.
>> >
>> >Well, let's be sure to pick something reasonably achievable, please,
>or
>> >nobody will write docs OR code! This sounds like a bit more of a
>> >challenge than I'd be ready to take on...
>>
>> Doesn't sound like all that difficult to me, more famous last words
>:-]
>>
>> For example:
>>
>> module X
>> {
>> doc "brief description" : "short doescription" : "long
>description" ;
>> ...
>> }
>
>Oh, sure, no problem. It was the --help-rule-name idea that made me
>worried. How would you provide rule documentation?
doc-rule stuff : "brief" : "short" : "long" ;
Transaltes to:
doc-brief.stuff = "brief" ;
doc-short.stuff = "short" ;
doc-long.stuff = "long" ;
That would be global rules. And the easy thing to assume here is that all
global rules are already loaded by the normal build system loading. So we then
parse the module/rule name find out if it's a global rule, print the docs, or
if it's not a global rule do the module docs.
For module rules it can be the same except the --help syntax might be this:
--help-module.rule. In which case we have to parse the module out of that and
load it first.
Also by extrapolating :-) we could also have a doc-variable.
For printing out all the available options, ala configure --help, we collect
the list of global docs as they get defined: doc-rules += stuff ;
For the printed version we could have a --help-print-html, that loads
everything that's known, and organizes it in some form, and prints out all the
long docs. This would be the equivalent of javadoc.
Easy, right ;-)
-- 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