[Asterisk-Dev] generation of config files from source code ?

Kevin P. Fleming kpfleming at digium.com
Mon Nov 21 13:54:33 MST 2005


Olle E. Johansson wrote:
> I think we should split up the sample configs into good examples and
> find a way to create reference configs with *all* config options, and
> call them "documentation". The configuration examples now are not very
> good examples any more.
> 
> I tried to find a way to use Doxygen for this, since it's already one
> tool we use, but could not come up with a good solution.

During some discussions last week at the IP4IT conference, we agreed 
that moving option names/descriptions/values/etc. into a file external 
to the C source file (probably in XML) and then parsing it to generate 
the needed bits (C source for parsing the config file, sample configs, 
HTML docs, etc) is the best way to go. This will also allow us to build 
a more generic config parser that can understand multi-valued options or 
options with valid ranges and remove all that repeated code from the 
modules using the config files.



More information about the asterisk-dev mailing list