On Sat, 2010-11-27 at 22:17 +0100, Sven Barth wrote: > On 27.11.2010 22:10, Darius Blaszyk wrote: > >> Well, fpmake contains the dependencies of the units. > >> Therefor you should be able to place the units in the correct order. > >> So my idea would be to enforce the order by looking at the dependencies. > >> > >> All that is needed is to list the units that should be documented; > >> The engine can then look in the list of dependencies, and if there > >> are dependencies found, they can be added first. > > > > I suppose it should look like this then: > > > > T := P.Targets.AddFPDoc('input.pas', 'descr.xml'); > > T.Dependencies.Add('myunit1.pas'); > > T.Dependencies.Add('myunit2.pas'); > > > > Will generate the following command; > > > > fpdoc --input=myunit1.pas --input=myunit2.pas --input=input.pas > > --descr=descr.xml > > > > Did I understand it correctly? > > I believe he meant that you can get the dependencies from the already > added units. > > E.g. (from rtl/fpmake.pp): > > T:=P.Targets.AddUnit('classes.pp'); > T.IncludePath.Add('objpas/classes'); > With T.Dependencies do > begin > AddUnit('sysutils'); > AddUnit('types'); > AddUnit('typinfo'); > AddUnit('unix',AllUnixOSes); > AddUnit('windows',AllWindowsOSes); > end; > > You already know from here that 'classes.pp' depends on those units, so > you might use those already defined dependencies to automatically add > those units to fpdoc as well (I don't know how exactly you can and need > to do it, but that's the theory) if you want to generate the > documentation for 'classes'.
Yup, we're talking about the same (though I should have used AddUnit as you did). I just wanted to have confirmation (also regarding fpdoc command-line options). Darius _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel