docs: generate API reference pages for admin, qemu & lxc libraries

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2019-11-20 14:49:26 +00:00
parent fc24f22051
commit 0aa8536f14
3 changed files with 54 additions and 7 deletions

View File

@ -35,6 +35,10 @@ modules = \
virterror \
$(NULL)
modules_admin = libvirt-admin
modules_qemu = libvirt-qemu
modules_lxc = libvirt-lxc
apihtml = \
html/index.html \
$(apihtml_generated)
@ -43,6 +47,30 @@ apihtml_generated = \
$(addprefix html/libvirt-,$(addsuffix .html,$(modules))) \
$(NULL)
apiadminhtml = \
html/index-admin.html \
$(apiadminhtml_generated)
apiadminhtml_generated = \
$(addprefix html/libvirt-,$(addsuffix .html,$(modules_admin))) \
$(NULL)
apiqemuhtml = \
html/index-qemu.html \
$(apiqemuhtml_generated)
apiqemuhtml_generated = \
$(addprefix html/libvirt-,$(addsuffix .html,$(modules_qemu))) \
$(NULL)
apilxchtml = \
html/index-lxc.html \
$(apilxchtml_generated)
apilxchtml_generated = \
$(addprefix html/libvirt-,$(addsuffix .html,$(modules_lxc))) \
$(NULL)
apipng = \
html/left.png \
html/up.png \
@ -50,7 +78,7 @@ apipng = \
html/right.png
apirefdir = $(HTML_DIR)/html
apiref_DATA = $(apihtml) $(apipng)
apiref_DATA = $(apihtml) $(apiadminhtml) $(apiqemuhtml) $(apilxchtml) $(apipng)
css = \
generic.css \
@ -188,6 +216,9 @@ aclperms.htmlinc: $(top_srcdir)/src/access/viraccessperm.h \
CLEANFILES = \
$(dot_html) \
$(apihtml) \
$(apiadminhtml) \
$(apiqemuhtml) \
$(apilxchtml) \
$(internals_html) \
$(kbase_html) \
$(api_DATA) \
@ -252,6 +283,9 @@ EXTRA_DIST += \
|| { rm $@ && exit 1; }
$(apihtml_generated): html/index.html
$(apiadminhtml_generated): html/index-admin.html
$(apiqemuhtml_generated): html/index-qemu.html
$(apilxchtml_generated): html/index-lxc.html
html/index.html: libvirt-api.xml newapi.xsl page.xsl $(APIBUILD_STAMP)
$(AM_V_GEN)$(XSLTPROC) --nonet -o ./ \
@ -260,6 +294,14 @@ html/index.html: libvirt-api.xml newapi.xsl page.xsl $(APIBUILD_STAMP)
$(srcdir)/newapi.xsl libvirt-api.xml && \
$(XMLLINT) --nonet --noout html/*.html
html/index-%.html: libvirt-%-api.xml newapi.xsl page.xsl $(APIBUILD_STAMP)
$(AM_V_GEN)$(XSLTPROC) --nonet -o ./ \
--stringparam builddir '$(abs_top_builddir)' \
--stringparam timestamp $(timestamp) \
--stringparam indexfile $(@:html/%=%) \
$(srcdir)/newapi.xsl $< && \
$(XMLLINT) --nonet --noout html/*.html
python_generated_files = \
html/libvirt-libvirt-lxc.html \
html/libvirt-libvirt-qemu.html \

View File

@ -106,6 +106,10 @@
<a href="html/libvirt-libvirt-secret.html">secret</a>,
<a href="html/libvirt-libvirt-storage.html">storage</a>,
<a href="html/libvirt-libvirt-stream.html">stream</a>
and
<a href="html/index-admin.html">admin</a>,
<a href="html/index-qemu.html">QEMU</a>,
<a href="html/index-lxc.html">LXC</a> libs
</dd>
<dt><a href="drivers.html">Drivers</a></dt>

View File

@ -23,6 +23,7 @@
<xsl:key name="symbols" match="/api/symbols/*" use="@name"/>
<xsl:param name="builddir" select="'..'"/>
<xsl:param name="indexfile" select="'index.html'"/>
<!-- the target directory for the HTML output -->
<xsl:variable name="htmldir">html</xsl:variable>
@ -101,10 +102,10 @@
<td><a accesskey="p" href="libvirt-{$previous/@name}.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></img></a></td>
<th align="left"><a href="libvirt-{$previous/@name}.html"><xsl:value-of select="$previous/@name"/></a></th>
</xsl:if>
<td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></img></a></td>
<th align="left"><a href="index.html">API documentation</a></th>
<td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></img></a></td>
<th align="center"><a href="../index.html">The virtualization API</a></th>
<td><a accesskey="u" href="{$indexfile}"><img src="up.png" width="24" height="24" border="0" alt="Up"></img></a></td>
<th align="left"><a href="{$indexfile}">API documentation</a></th>
<td><a accesskey="h" href="../{$indexfile}"><img src="home.png" width="24" height="24" border="0" alt="Home"></img></a></td>
<th align="center"><a href="../{$indexfile}">The virtualization API</a></th>
<xsl:if test="$next">
<th align="right"><a href="libvirt-{$next/@name}.html"><xsl:value-of select="$next/@name"/></a></th>
<td><a accesskey="n" href="libvirt-{$next/@name}.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></img></a></td>
@ -830,12 +831,12 @@
<xsl:call-template name="mainpage"/>
</xsl:variable>
<xsl:document
href="{concat($htmldir, '/index.html')}"
href="{concat($htmldir, '/', $indexfile)}"
method="xml"
indent="yes"
encoding="UTF-8">
<xsl:apply-templates select="exsl:node-set($mainpage)" mode="page">
<xsl:with-param name="pagename" select="concat($htmldir, '/index.html')"/>
<xsl:with-param name="pagename" select="concat($htmldir, '', $indexfile)"/>
<xsl:with-param name="timestamp" select="$timestamp"/>
</xsl:apply-templates>
</xsl:document>