[libvirt] [PATCH]docs: exit if failed to generate html

From: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> If xhtml1 dtd not install, some html will not be generated. If we 'make install', it will succeed and message "missing XHTML1 DTD" will be hide inside a large amount of logs. So exit when this occurs. Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com> --- docs/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Makefile.am b/docs/Makefile.am index 9de3406..82c3ed8 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -223,7 +223,7 @@ internals/%.html.tmp: internals/%.html.in subsite.xsl page.xsl sitemap.html.in SGML_CATALOG_FILES='$(XML_CATALOG_FILE)' \ $(XMLLINT) --catalogs --nonet --format --valid $< > $(srcdir)/$@ \ || { rm $(srcdir)/$@ && exit 1; }; \ - else echo "missing XHTML1 DTD" ; fi ; fi + else echo "missing XHTML1 DTD" ; exit 1; fi ; fi %.php.tmp: %.php.in site.xsl page.xsl sitemap.html.in @if [ -x $(XSLTPROC) ] ; then \ @@ -249,7 +249,7 @@ html/index.html: libvirt-api.xml newapi.xsl page.xsl sitemap.html.in > /dev/null ; then \ SGML_CATALOG_FILES='$(XML_CATALOG_FILE)' \ $(XMLLINT) --catalogs --nonet --valid --noout $(srcdir)/html/*.html ; \ - else echo "missing XHTML1 DTD" ; fi ; fi + else echo "missing XHTML1 DTD" ; exit 1; fi ; fi $(addprefix $(srcdir)/,$(devhelphtml)): $(srcdir)/libvirt-api.xml $(devhelpxsl) $(AM_V_GEN)if [ -x $(XSLTPROC) ] ; then \ -- 1.8.2.1

On 10/09/2013 05:27 AM, Chen Hanxiao wrote:
From: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
If xhtml1 dtd not install, some html will not be generated. If we 'make install', it will succeed and message "missing XHTML1 DTD" will be hide inside a large amount of logs. So exit when this occurs.
NACK; this is already being worked on in a different thread, with a different approach (if DTDs aren't present, my goal is to just use unvalidated xml): https://www.redhat.com/archives/libvir-list/2013-October/msg00254.html There are too many distros that don't yet provide xhtml1 dtds easily to make it a hard requirement for validation, although my work will eventually get us to the point that xmllint is a hard requirement for doc generation when doing a git checkout. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

-----Original Message----- From: Eric Blake [mailto:eblake@redhat.com] Sent: Wednesday, October 09, 2013 9:51 PM To: Chen Hanxiao Cc: libvir-list@redhat.com Subject: Re: [libvirt] [PATCH]docs: exit if failed to generate html
On 10/09/2013 05:27 AM, Chen Hanxiao wrote:
From: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
If xhtml1 dtd not install, some html will not be generated. If we 'make install', it will succeed and message "missing XHTML1 DTD" will be hide inside a large amount of logs. So exit when this occurs.
NACK; this is already being worked on in a different thread, with a different approach (if DTDs aren't present, my goal is to just use unvalidated xml): https://www.redhat.com/archives/libvir-list/2013-October/msg00254.html
There are too many distros that don't yet provide xhtml1 dtds easily to make it a hard requirement for validation, although my work will eventually get us to the point that xmllint is a hard requirement for doc generation when doing a git checkout.
Your patch could fix my issue. Thanks for your information.
-- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (2)
-
Chen Hanxiao
-
Eric Blake