[Lazarus] Documentation update (CHM building, lazutils)
Hans-Peter Diettrich
DrDiettrich1 at aol.com
Sun Jan 1 12:01:18 CET 2012
Bernd schrieb:
> 2011/12/30 Hans-Peter Diettrich <DrDiettrich1 at aol.com>:
>
>> I don't understand why (platform specific) shell scripts shall be used for
>> documentation purposes - is Pascal not suited for such tasks? ;-)
>
> How about putting all the functionality necessary to build the
> documentation into lazbuild? It already has an option to build the IDE
> (lazbuild --build-ide), it has all units needed to read current
> Lazarus configuration, paths, etc, wouldn't it be consequent to make
> it also able to replace the shell scripts to build the docs (lazbuild
> --build-chmdoc)?
IMO there exist too many user options, which are not reflected in a
standard build, e.g. the output documentation directories on the server
or user machine.
At least the generation of the documentation projects should be
automated somehow, then every user can modify these projects according
to his needs. I go different ways for building FPC and Lazarus
documentation projects:
The RTL and FCL documentation is generated by a Makefile, so that the
generated commandline can be recorded instead of excecuted (-n
>mydoc.bat). The LazDoc Manager imports these commandlines and creates
the project files. An additional Makefile option could write the project
files immediately, instead of creating the output.
The documentation of Lazarus packages instead shall be collected from
the LPK files (not yet complete). The Makefile here is of little help,
because the only mentioned source file is the synthetic allunits.pas
file, which would deserve another parse. But of course options could be
added (to LazBuild or the Makefile) to create the documentation
(projects) like for the FPC documentation.
Once these project files exist, they can be modified or configured by
the user, and the final documentation can be built in a simple script,
containing lines like ("?" to be substituted):
fpdoc --project=? --format=? --output=?
Merging multiple documentation packages into one output file is not
supported by fpdoc, so that e.g. the LCL documentation in one file would
require to import the LCL, LCLBase and LazUtils packages into the same
LCL package. I've put this feature into the LazDoc Manager already.
DoDi
More information about the Lazarus
mailing list