[libvirt] [PATCH] build: Fix API docs generation in VPATH build
Daniel Veillard
veillard at redhat.com
Fri Feb 18 12:42:10 UTC 2011
On Fri, Feb 18, 2011 at 12:25:03PM +0100, Jiri Denemark wrote:
> ---
> docs/Makefile.am | 12 ++++++++----
> docs/devhelp/devhelp.xsl | 7 +++++++
> 2 files changed, 15 insertions(+), 4 deletions(-)
>
> diff --git a/docs/Makefile.am b/docs/Makefile.am
> index adf74ee..c4926d4 100644
> --- a/docs/Makefile.am
> +++ b/docs/Makefile.am
> @@ -88,7 +88,10 @@ EXTRA_DIST= \
> sitemap.html.in \
> todo.pl todo.cfg-example
>
> -MAINTAINERCLEANFILES = $(dot_html) $(apihtml) $(devhelphtml)
> +MAINTAINERCLEANFILES = \
> + $(addprefix $(srcdir)/,$(dot_html)) \
> + $(addprefix $(srcdir)/,$(apihtml)) \
> + $(addprefix $(srcdir)/,$(devhelphtml))
>
> all: web
>
> @@ -146,19 +149,20 @@ internals/%.html.tmp: internals/%.html.in subsite.xsl page.xsl sitemap.html.in
> html/index.html: libvirt-api.xml newapi.xsl page.xsl sitemap.html.in
> - at if [ -x $(XSLTPROC) ] ; then \
> echo "Rebuilding the HTML pages from the XML API" ; \
> - $(XSLTPROC) --nonet $(srcdir)/newapi.xsl $(srcdir)/libvirt-api.xml ; fi
> + $(XSLTPROC) --nonet -o $(srcdir)/ \
> + $(srcdir)/newapi.xsl $(srcdir)/libvirt-api.xml ; fi
> - at if test -x $(XMLLINT) && test -x $(XMLCATALOG) ; then \
> if $(XMLCATALOG) '$(XML_CATALOG_FILE)' "-//W3C//DTD XHTML 1.0 Strict//EN" \
> > /dev/null ; then \
> echo "Validating the resulting XHTML pages" ; \
> SGML_CATALOG_FILES='$(XML_CATALOG_FILE)' \
> - $(XMLLINT) --catalogs --nonet --valid --noout html/*.html ; \
> + $(XMLLINT) --catalogs --nonet --valid --noout $(srcdir)/html/*.html ; \
> else echo "missing XHTML1 DTD" ; fi ; fi
>
> $(addprefix $(srcdir)/,$(devhelphtml)): $(srcdir)/libvirt-api.xml $(devhelpxsl)
> - at echo Rebuilding devhelp files
> - at if [ -x $(XSLTPROC) ] ; then \
> - $(XSLTPROC) --nonet -o devhelp/libvirt.devhelp \
> + $(XSLTPROC) --nonet -o $(srcdir)/devhelp/ \
> $(top_srcdir)/docs/devhelp/devhelp.xsl $(srcdir)/libvirt-api.xml ; fi
>
> python_generated_files = \
Up to here it's rather trivial.
> diff --git a/docs/devhelp/devhelp.xsl b/docs/devhelp/devhelp.xsl
> index 6600f5f..add5794 100644
> --- a/docs/devhelp/devhelp.xsl
> +++ b/docs/devhelp/devhelp.xsl
> @@ -13,6 +13,13 @@
> <!-- Build keys for all symbols -->
> <xsl:key name="symbols" match="/api/symbols/*" use="@name"/>
>
> + <xsl:template match="/">
> + <xsl:document xmlns="http://www.devhelp.net/book" href="libvirt.devhelp"
> + method="xml" encoding="UTF-8" indent="yes">
> + <xsl:apply-templates/>
> + </xsl:document>
> + </xsl:template>
> +
> <xsl:template match="/api">
> <book title="{@name} Reference Manual" link="index.html" author="" name="{@name}">
> <xsl:apply-templates select="files"/>
But that chunk is far from clear, why are you doing this ?
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel at veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
More information about the libvir-list
mailing list