On 3 December 2011 01:59, Michael Van Canneyt wrote: >> Already included: all XML files are discarded, when they don't contribute >> to the current package :-) > > > Because of the loose coupling between XML files and source files, there is > no way to know if a XML file is contributing or not, unless you impose some > convention like 1 unit = 1 file with equal filenames, or parse the XML file > to detect the module it documents or start moving XML files to directories.
I've always wonder about the very verbose command line parameters used with fpdoc. Why couldn't the XML simply mention which unit(s) it documents. You could also include macros [eg: $(somemacro) ] which fpdoc could substitute when the xml file is processed. The macros could be defined in some fpdoc.ini file, or passed as command line option. I would opt for the ini file choice, but the command line param could be used to override the macro if needed. eg: -----------[ fpg_base.xml ]--------- <?xml version="1.0"?> <fpdoc-descriptions> <package name="fpGUI"> <!-- multiple files could be describe in a single xml file too --> <files> <unit>$(fpgui_src)/corelib/fpg_base.pas</unit> </files> <module name="fpg_base"> <short>....</short> <descr>...</descr> </module> </package> </fpdoc-descriptions> -------------------------------------- That way you only need to tell fpdoc what XML files to process (even my passing it a directory, instead of file by file). No project file needed. One could even extend the <unit> tag, to include the unit name, and search path for that unit. eg: <unit> <name>$(fpgui_src)/corelib/fpg_base.pas</name> <searchpath>-Fu$(fpgui_src)/corelib/ -Fi$(fpgui_src)/corelib/</searchpath> </unit> So the xml file is really self-describing. Containing everything it relates too. No project file per-se required at all? No extra tools needed to generate project files etc. -- Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel