Reputation: 21
I'm trying to generate documentation information for my Ada project using GNATdoc tool. GNATdoc is able to generate information for all packages except for those packages which are marked as subunits(using the separate identifier). Example -
package body A is
x : Integer;
package B is
y : Natural;
end B;
package body B is separate;
end A;
--------------------------------
separate (A)
package body B is
b1 : Float;
b2 : Character;
end B;
For the above code snippet, GNATdoc does not generate the documentation information for the subunit package contents (b1, b2) even these are present in the .ali files of the respective parent unit.
Any insights as to what maybe wrong here will be much appreciated.
Upvotes: 2
Views: 159
Reputation: 6430
GNATdoc does not normally process the contents of package bodies. There are, however two command line switches that may change that behaviour, depending on your needs:
Process bodies to complete the spec documentation(-b)
By default GNATdoc does not process the body of packages. This switch enables looking at subprograms in package bodies, as a fallback for finding documentation. When this switch is provided, GNATdoc first looks for the documentation in the package specification; if no documentation is found in the spec and then searches for documentation in the body of the subprogram.
and
Document bodies (-d)
When this switch is passed, GNATdoc processes bodies and extracts documentation for library-level entities. In the HTML output, GNATdoc emits separate pages for the documentaion extracted from bodies. This switch is incompatible with the -b switch.
Upvotes: 3