<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>8584</bug_id>
          
          <creation_ts>2015-10-27 08:50:12 +0000</creation_ts>
          <short_desc>Enable building API documentation</short_desc>
          <delta_ts>2017-05-26 18:44:18 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>devtools / tool chain</component>
          <version>2.0</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>21 Nov 2016: RESOLVED</status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>2.3 M1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ross Burton">ross.burton</reporter>
          <assigned_to name="Juan Ramos">juan.fernandox.ramos.frayle</assigned_to>
          <cc>alex.kanavin</cc>
    
    <cc>alexandru.c.georgescu</cc>
    
    <cc>bluelightning</cc>
    
    <cc>jose.perez.carranza</cc>
    
    <cc>juan.fernandox.ramos.frayle</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>song.liu</cc>
    
    <cc>srifenbark</cc>
          
          <qa_contact name="Jose Perez C">jose.perez.carranza</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Done (doc changes complete)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>55799</commentid>
    <comment_count>0</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2015-10-27 08:50:12 +0000</bug_when>
    <thetext>For people using a OE-generated SDK it would be useful to have a corresponding API documentation bundle for all of the packages in the SDK.

This would mean enabling at least the following:
- man page generation (troff, texinfo, etc)
- doxygen
- gtk-doc</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55996</commentid>
    <comment_count>1</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2015-10-29 13:48:19 +0000</bug_when>
    <thetext>I finally found the bug I thought already covered this - it&apos;s a bit short on details, but it&apos;s bug 1619.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56366</commentid>
    <comment_count>2</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2015-11-10 17:19:41 +0000</bug_when>
    <thetext>*** Bug 1619 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65585</commentid>
    <comment_count>3</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2016-08-29 12:24:28 +0000</bug_when>
    <thetext>The gtk-doc patchset has been sent for review, but there&apos;s still significant amount of work to do (doxygen in particular requires lots of small tweaks to recipes), so the whole thing is postponed to 2.3.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66411</commentid>
    <comment_count>4</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2016-09-21 10:19:39 +0000</bug_when>
    <thetext>I&apos;ve finished the survey of doxygen support in upstream projects, and here are the findings:

1) doxygen api documentation generation is supported in some way by 67 recipes

2) of those, only 9 support doxygen in a way that is distribution-friendly, specifically:
- there is a configure switch to enable/disable usage of doxygen
- generation of html documentation happens with make&apos;s default target, and installation happens with &apos;make install&apos;

Those recipes are dbus, flac, libexif, libfakekey, libvorbis, libxcb, libxcbcommon, mc, source-highlight.

3) The rest of the recipes do things in various different ways:

- the most common way is that there is a separate make target to build doxygen (make apidocs, make doxygen, make docs, make html and so on - everyone names it differently), and no configure switches or installation targets. 

- another common approach is to ship only doxyfile (the config file for doxygen) and provide no makefile support at all.

4) The conclusion I have is that upstreams, by and large, don&apos;t see doxygen documentation as something that distributions should package or worry about. To upstream projects, doxygen support is their own internal thing, that they use to put the html output on their websites. I&apos;d say we should not struggle against this by doing a ton of recipe fixing and tweaking - there are more beneficial things to do.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66545</commentid>
    <comment_count>5</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2016-09-23 13:18:15 +0000</bug_when>
    <thetext>Okay, now onto manpages. A large amount of upstream projects ship and install ready-to-use manpages, for them nothing needs to be done. Then there projects where manpages can be conditionally built. A few of those can be found by looking for &quot;--enable/disable-manpages&quot; in recipe directory, but there might be others lurking - so I&apos;ll look for &quot;enable-man&quot; and its variants in the build tree as well.

I first wanted to be more generic and look for variants of &quot;manpage&quot; in the source tree, but quickly realized that it&apos;s a road to insanity, caused by monotonous, astronomical amount of false positives.

Then building of manpages will be conditionally enabled if &apos;api-documentation&apos; is in distro features, as it tends to pull in the whole xml stack and other specialized tools.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66749</commentid>
    <comment_count>6</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2016-09-30 11:14:34 +0000</bug_when>
    <thetext>The patchset for manpages is now available here (will submit for review after 2 weeks of holiday):
https://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=akanavin/enable-documentation

I&apos;ve also added patches that remove the aging, difficult to maintain SGML stack to the same branch. Amazingly, nothing seems to need it in meta-oe, so it doesn&apos;t have to be moved there (unless someone using a 3rd party layer complains).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67325</commentid>
    <comment_count>7</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2016-10-18 12:01:27 +0000</bug_when>
    <thetext>Patches sent for review:
http://lists.openembedded.org/pipermail/openembedded-core/2016-October/127647.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67525</commentid>
    <comment_count>8</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2016-10-25 12:00:24 +0000</bug_when>
    <thetext>Paul, I&apos;m now ready to enable adding the generated documentation into SDKs. Can you point me to the files where SDKs generation and configuration happens, so I don&apos;t need to look for it with grep etc.? :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67551</commentid>
    <comment_count>9</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2016-10-25 19:43:06 +0000</bug_when>
    <thetext>I&apos;m not sure much needs to be done - for bitbake -c populate_sdk &lt;image&gt; you will get documentation packages in the SDK right now if you add doc-pkgs to SDKIMAGE_FEATURES.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67588</commentid>
    <comment_count>10</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2016-10-26 09:53:18 +0000</bug_when>
    <thetext>(In reply to comment #9)
&gt; I&apos;m not sure much needs to be done - for bitbake -c populate_sdk &lt;image&gt; you
&gt; will get documentation packages in the SDK right now if you add doc-pkgs to
&gt; SDKIMAGE_FEATURES.

Actually, also &apos;api-documentation&apos; must be in DISTRO_FEATURES so that additional manpages and gtk-doc based documentation is produced, so where should I place that? It&apos;s not enabled by default as it adds significantly to the build time for common images (core-image-sato etc.).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67607</commentid>
    <comment_count>11</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2016-10-26 19:27:53 +0000</bug_when>
    <thetext>I&apos;m not sure I fully understand the question. These are two different things:

* &apos;api-documentation&apos; in DISTRO_FEATURES enables building the documentation
* &apos;doc-pkgs&apos; in IMAGE_FEATURES / SDKIMAGE_FEATURES enables installing all related documentation (API or otherwise) into the image / SDK respectively.

You might perhaps trigger doc-pkgs from api-documentation I suppose, but it&apos;s possible that&apos;s not always going to be what the user wants.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67628</commentid>
    <comment_count>12</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2016-10-27 08:29:10 +0000</bug_when>
    <thetext>   (In reply to comment #11)
&gt; I&apos;m not sure I fully understand the question. These are two different things:
&gt; 
&gt; * &apos;api-documentation&apos; in DISTRO_FEATURES enables building the documentation
&gt; * &apos;doc-pkgs&apos; in IMAGE_FEATURES / SDKIMAGE_FEATURES enables installing all
&gt; related documentation (API or otherwise) into the image / SDK respectively.

The question is, for every SDK that gets generated, how do we ensure that &apos;api-documentation&apos; was enabled in DISTRO_FEATURES?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67631</commentid>
    <comment_count>13</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2016-10-27 11:37:52 +0000</bug_when>
    <thetext>The process that constructs an SDK cannot control DISTRO_FEATURES, so I can&apos;t see how that would be possible.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67633</commentid>
    <comment_count>14</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2016-10-27 12:28:40 +0000</bug_when>
    <thetext>(In reply to comment #13)
&gt; The process that constructs an SDK cannot control DISTRO_FEATURES, so I
&gt; can&apos;t see how that would be possible.

The SDK building could refuse to continue if DISTRO_FEATURES doesn&apos;t have the needed entry?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67657</commentid>
    <comment_count>15</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2016-10-27 18:34:13 +0000</bug_when>
    <thetext>I really don&apos;t think that&apos;s appropriate. There will be quite a number of people out there who don&apos;t care to have the documentation included in their SDK.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67659</commentid>
    <comment_count>16</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2016-10-27 19:07:25 +0000</bug_when>
    <thetext>(In reply to comment #15)
&gt; I really don&apos;t think that&apos;s appropriate. There will be quite a number of
&gt; people out there who don&apos;t care to have the documentation included in their
&gt; SDK.

In that case I think the work is basically complete here (when the patchset for manpages gets merged). I&apos;ll file a separate bug for changing the site configuration so that when Yocto SDKs are generated, the api-documentation distro feature is in use.

Ross, any comment?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67825</commentid>
    <comment_count>17</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-11-01 16:59:51 +0000</bug_when>
    <thetext>There&apos;s outstanding issues with adding doc-pkgs to SDK images (as they get giant) but Alex is aware of that.  I think we should also add doc-pkgs to SDKIMAGE_FEATURES (maybe if api-documentation is enabled in DISTRO_FEATURES) so that generated SDKs (not SDK images) also get the documentation (I think that docs in standalone SDKs is more important than in SDK images) but apart from that we&apos;re done.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68090</commentid>
    <comment_count>18</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2016-11-08 15:07:09 +0000</bug_when>
    <thetext>&apos;api-documentation&apos; DISTRO_FEATURE needs to be documented. Something like:

When this feature is in use, generation of API documentation during recipe builds is enabled, and the resulting documentation will be added to SDK tarballs produced by &apos;bitbake -c populate_sdk&apos;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68105</commentid>
    <comment_count>19</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-11-08 17:15:09 +0000</bug_when>
    <thetext>Regarding documenting api-documentation, here is a section in the ref-manual that lists the DISTRO_FEATURES available in YP: http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#ref-features-distro.  Would adding an entry for api-documentation cover this issue?

Note that the glossary entry for DISTRO_FEATURES does not provide an exhaustive list but rather highlights some stuff - http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#var-DISTRO_FEATURES.

In the SDK manual we have a chapter here (http://www.yoctoproject.org/docs/2.2/sdk-manual/sdk-manual.html#sdk-appendix-customizing) that talks about customizing an SDK.  Should we create a subsection on how to add API documentation?

Setting this to ACCEPTED since I own it now.

Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68182</commentid>
    <comment_count>20</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2016-11-09 13:24:16 +0000</bug_when>
    <thetext>(In reply to comment #19)
&gt; Regarding documenting api-documentation, here is a section in the ref-manual
&gt; that lists the DISTRO_FEATURES available in YP:
&gt; http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#ref-features-
&gt; distro.  Would adding an entry for api-documentation cover this issue?

Yes.

&gt; In the SDK manual we have a chapter here
&gt; (http://www.yoctoproject.org/docs/2.2/sdk-manual/sdk-manual.html#sdk-
&gt; appendix-customizing) that talks about customizing an SDK.  Should we create
&gt; a subsection on how to add API documentation?

Yes please.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68258</commentid>
    <comment_count>21</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-11-11 17:44:25 +0000</bug_when>
    <thetext>Hi, 

This api-documentation fix... Did it make it into Morty?  I am guessing that it did not.  Correct?

Thanks, 
Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68330</commentid>
    <comment_count>22</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-11-15 18:19:59 +0000</bug_when>
    <thetext>Hi,  

The fix is in for this now.  There were several areas that were touched.  Here they are:

 * http://www.yoctoproject.org/docs/2.3/sdk-manual/sdk-manual.html#sdk-appendix-customizing-standard - this is a new appendix in the SDK manual for customizing the standard SDK.  This is where we talk about adding API documentation to the SDK.  I had to put in another subsection in this appendix to justify creating a whole new appendix.  That other section was on how to add individual packages to the SDK.

 * http://www.yoctoproject.org/docs/2.3/ref-manual/ref-manual.html#var-TOOLCHAIN_HOST_TASK - I added a cross-reference from this variable description to the new section on adding packages to a standard SDK.

 * http://www.yoctoproject.org/docs/2.3/ref-manual/ref-manual.html#var-TOOLCHAIN_TARGET_TASK - same thing here.  Cross-reference to new section.

 * http://www.yoctoproject.org/docs/2.3/ref-manual/ref-manual.html#ref-features-distro - Added the api-documentation feature to this list.

Let me know of any changes or modifications. 

Thanks, 
Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68366</commentid>
    <comment_count>23</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2016-11-16 15:15:00 +0000</bug_when>
    <thetext>(In reply to comment #21)
&gt; This api-documentation fix... Did it make it into Morty?  I am guessing that
&gt; it did not.  Correct?

No, it didn&apos;t. Only gtk-doc support made it to morty, not all the other stuff, so morty documentation doesn&apos;t need to be touched.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68367</commentid>
    <comment_count>24</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2016-11-16 15:23:57 +0000</bug_when>
    <thetext>&gt; http://www.yoctoproject.org/docs/2.3/sdk-manual/sdk-manual.html#sdk-appendix-
&gt; customizing-standard - this is a new appendix in the SDK manual for
&gt; customizing the standard SDK.  This is where we talk about adding API
&gt; documentation to the SDK.  I had to put in another subsection in this
&gt; appendix to justify creating a whole new appendix.  That other section was
&gt; on how to add individual packages to the SDK.

This says:

&quot; You might want to include documentation as part of the standard SDK. For example, you might want the API documentation to be built and included with the SDK. You can include API documentation as well as any other documentation with the standard SDK by setting the SDKIMAGE_FEATURES and DISTRO_FEATURES variables:

     SDKIMAGE_FEATURES = &quot;doc-pkgs&quot;
     DISTRO_FEATURES = &quot;api-documentation&quot;
        

Setting these variables as shown here causes the OpenEmbedded build system to build the documentation and then include it in the standard SDK.&quot;

You can drop the first two sentences, they&apos;re just repeating the same thing. And also changing SDKIMAGE_FEATURES is not needed, just adding to DISTRO_FEATURES is enough.

Here&apos;s how it should be fixed:

&quot;You can include API documentation as well as any other documentation provided by recipes with the standard SDK by adding &apos;api-documentation&apos; to the DISTRO_FEATURE variable:

     DISTRO_FEATURES_append = &quot; api-documentation&quot;

Setting this variable as shown here causes the OpenEmbedded build system to build the documentation and then include it in the standard SDK.&quot;


&gt; Let me know of any changes or modifications. 

Looks ok otherwise.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68445</commentid>
    <comment_count>25</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-11-18 21:12:56 +0000</bug_when>
    <thetext>Hi, 

See http://www.yoctoproject.org/docs/2.3/sdk-manual/sdk-manual.html#adding-api-documentation-to-the-standard-sdk for the changes.

Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68454</commentid>
    <comment_count>26</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2016-11-21 12:50:51 +0000</bug_when>
    <thetext>Seems fine to me now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68474</commentid>
    <comment_count>27</comment_count>
    <who name="Scott Rifenbark">srifenbark</who>
    <bug_when>2016-11-22 00:20:13 +0000</bug_when>
    <thetext>Thanks, 

I am setting to RESOLVED and marking the doc flag to &quot;done&quot;.

Scott</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73533</commentid>
    <comment_count>28</comment_count>
    <who name="Juan Ramos">juan.fernandox.ramos.frayle</who>
    <bug_when>2017-05-26 18:44:18 +0000</bug_when>
    <thetext>Changing to verified since the documentation is here:
http://www.yoctoproject.org/docs/2.3/sdk-manual/sdk-manual.html#adding-api-documentation-to-the-standard-sdk</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>