[fpc-devel] FPDoc improvements
Hans-Peter Diettrich
DrDiettrich1 at aol.com
Fri Jan 27 08:52:46 CET 2012
Unfortunately I managed to supply the EasyImports.patch twice, please
drop Mantis #21168 as a dupe of #21167. Sorry for the inconvenience :-(
Starting with this patch I suggest further improvements of fpdoc. Except
for the RTL docs, which require a couple of special compiler options for
every input file, a package project can be shrunk essentially to the
specification of these options:
--package the package name
--imports a list of related packages
--input-dir containing all source files
--descr-dir containing all XML files
--output-dir where the output files are created
--format the document format
Until now every --format requires special --output and --import values,
what IMO is not really required. The backend can create an standard
output filename, given only an output directory, e.g.
<output-dir>/<package-name>.chm. When the content files reside in that
directory, the content and import specifications can be created by the
backend as well, e.g. <output-dir>/<package-name>.xct. In addition to
the supplied patch, a new --imports option can accept a list of packages
to import, e.g. --imports=rtl,fcl.
The already existing --input-dir option should be extended by compiler
options, applied to every source file. Several solutions are possible,
e.g. for the FCL with an explicit file list an additional
--input-options option could specify the common compiler options. For
packages with a simpler source directory structure it would be
sufficient to specify e.g. --input-dir="../lcl,-Fi../lcl/include" or,
also applicable to the FCL, --inputs="@input.lst,-Fi../../include".
Which solution looks the best to you?
These improvements will allow to reduce e.g. the command to build the
LCL documentation to:
fpdoc --package=lcl --inputs=../lcl,-Fi../lcl/include
--descr-dir=xml/lcl --imports=rtl,fcl --output-dir=/wherever --format=html
For building e.g. CHM docs only the --format options has to be changed
as required.
I can supply another patch, if you like, covering above updates.
DoDi
More information about the fpc-devel
mailing list