[libvirt] [PATCH] build: improve 'make install' for VPATH builds

Daniel Veillard veillard at redhat.com
Mon Feb 21 08:53:02 UTC 2011


On Fri, Feb 18, 2011 at 12:09:02PM +0100, Jiri Denemark wrote:
> On Thu, Feb 17, 2011 at 15:22:13 -0700, Eric Blake wrote:
> > On 02/17/2011 08:06 AM, Jiri Denemark wrote:
> > > I haven't tried that but xsltproc should support -o directory/
> > 
> > My recollection was that it didn't quite work:
> > https://www.redhat.com/archives/libvir-list/2010-June/msg00675.html
> 
> Quoting from that email:
> 
>     I am officially stumped.  I cannot, for the life of me, figure out why:
> 
>     xsltproc --nonet -o ./ ./newapi.xsl ./libvirt-api.xml
> 
>     works (outputs 4 *.html files into ./), while:
> 
>     xsltproc --nonet -o ./devhelp/ ./devhelp/devhelp.xsl ./libvirt-api.xml
> 
>     outputs 4 *.html files into ./devhelp but then tries to write to
>     ./devhelp/ as a file (hence the I/O error) rather than writing output to
>     the fifth file devhelp/libvirt.devhelp.
> 
> That's because XSLT allows for two ways of generating the output of
> transformation. Either implicit, which xsltproc prints to stdout and can be
> redirected to a file using -o file. Or explicit, which means the stylesheet
> contains <xsl:document> element(s) which specifies where the output should be
> saved. This can be used for generating more files by a single run of xsltproc
> and -o directory/ can change the directory where the output files will be
> stored. And since this is cool, why not combine these two approaches in a
> single file? And that's exactly what happened in devhelp.xsl. It generates 4
> html files explicitly and one xml file implicitly. So -o can't ever work for
> this. A patch to fix this is coming soon.

  Confirm, the ability to generate extra documents is an extension to XSLT-1.0
you normally create one document per run, and -o option tells libxml2 to use
this for the main output document. The fact that the main output may be empty
it's still an empty file, and that can and should be saved :-)
  Just use -o ./devhelp/empty and it should work just fine, that's another
option

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