]> xenbits.xensource.com Git - libvirt.git/commitdiff
docs: make xmllint & xsltproc compulsory
authorDaniel P. Berrange <berrange@redhat.com>
Wed, 26 Jul 2017 16:40:44 +0000 (17:40 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Wed, 2 Aug 2017 16:00:11 +0000 (17:00 +0100)
We already require libxml to be installed, so it is not unreasonable
to require xmllint and xsltproc to be installed too - any platform
with the former will have the latter too.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
docs/Makefile.am
m4/virt-external-programs.m4

index 53eb27f9f6dc314aab8cde88dc8ea0d5a136e8a3..633a0fa50c33b3d64e29b21e7ff4bb018734ae1c 100644 (file)
@@ -228,17 +228,14 @@ $(srcdir)/hvsupport.html.in: $(srcdir)/hvsupport.pl $(api_DATA) \
 news.html.in: \
          $(srcdir)/news.xml \
          $(srcdir)/news-html.xsl
-       $(AM_V_GEN) \
-       if [ -x $(XSLTPROC) ]; then \
-         $(XSLTPROC) --nonet \
+       $(AM_V_GEN)$(XSLTPROC) --nonet \
            $(srcdir)/news-html.xsl \
            $(srcdir)/news.xml \
          >$@-tmp \
            || { rm -f $@-tmp; exit 1; }; \
          sed 's/ xmlns=""//g' $@-tmp >$@ \
            || { rm -f $@-tmp; exit 1; }; \
-         rm -f $@-tmp; \
-       fi
+         rm -f $@-tmp
 EXTRA_DIST += \
        $(srcdir)/news.xml \
        $(srcdir)/news.rng \
@@ -251,9 +248,7 @@ MAINTAINERCLEANFILES += \
 
 %.html.tmp: %.html.in site.xsl subsite.xsl page.xsl \
                $(acl_generated)
-       @if [ -x $(XSLTPROC) ] ; then \
-         echo "Generating $@"; \
-         name=`echo $@ | sed -e 's/.tmp//'`; \
+       $(AM_V_GEN)name=`echo $@ | sed -e 's/.tmp//'`; \
          dir=`dirname $@` ; \
          if test "$$dir" = "."; \
          then \
@@ -265,45 +260,36 @@ MAINTAINERCLEANFILES += \
          $(XSLTPROC) --stringparam pagename $$name \
            --stringparam timestamp $(timestamp) --nonet \
            $(top_srcdir)/docs/$$style $< > $@ \
-           || { rm $@ && exit 1; }; fi
+           || { rm $@ && exit 1; }
 
 %.html: %.html.tmp
-       @if test -x $(XMLLINT) ; then \
-         echo "Validating $@" ; \
-         $(XMLLINT) --nonet --format $< > $(srcdir)/$@ \
-         || { rm $(srcdir)/$@ && exit 1; }; fi
+       $(AM_V_GEN)$(XMLLINT) --nonet --format $< > $(srcdir)/$@ \
+         || { rm $(srcdir)/$@ && exit 1; }
 
 %.php.tmp: %.php.in site.xsl page.xsl
-       if [ -x $(XSLTPROC) ] ; then \
-         echo "Generating $@"; \
-         $(XSLTPROC) --stringparam pagename $(@:.tmp=) \
+       $(AM_V_GEN)$(XSLTPROC) --stringparam pagename $(@:.tmp=) \
            --stringparam timestamp $(timestamp) --nonet \
            $(top_srcdir)/docs/site.xsl $< > $@ \
-           || { rm $@ && exit 1; }; fi
+           || { rm $@ && exit 1; }
 
 %.php: %.php.tmp %.php.code.in
-       @if [ -x $(XSLTPROC) ] ; then \
-         echo "Scripting $@"; \
-           sed -e '/<span id="php_placeholder"><\/span>/r '"$(srcdir)/$@.code.in" \
+       $(AM_V_GEN)sed -e '/<span id="php_placeholder"><\/span>/r '"$(srcdir)/$@.code.in" \
            -e /php_placeholder/d < $@.tmp > $(srcdir)/$@ \
-           || { rm $(srcdir)/$@ && exit 1; }; fi
+           || { rm $(srcdir)/$@ && exit 1; }
 
 $(apihtml_generated): html/index.html
 
 html/index.html: libvirt-api.xml newapi.xsl page.xsl $(APIBUILD_STAMP)
-       $(AM_V_GEN)if [ -x $(XSLTPROC) ] ; then \
-         $(XSLTPROC) --nonet -o $(srcdir)/ \
+       $(AM_V_GEN)$(XSLTPROC) --nonet -o $(srcdir)/ \
          --stringparam builddir '$(abs_top_builddir)' \
          --stringparam timestamp $(timestamp) \
-         $(srcdir)/newapi.xsl $(srcdir)/libvirt-api.xml ; fi && \
-       if test -x $(XMLLINT) ; then \
-         $(XMLLINT) --nonet --noout $(srcdir)/html/*.html ; fi
+         $(srcdir)/newapi.xsl $(srcdir)/libvirt-api.xml && \
+         $(XMLLINT) --nonet --noout $(srcdir)/html/*.html
 
 $(addprefix $(srcdir)/,$(devhelphtml)): $(srcdir)/libvirt-api.xml $(devhelpxsl)
-       $(AM_V_GEN)if [ -x $(XSLTPROC) ] ; then \
-         $(XSLTPROC) --stringparam timestamp $(timestamp) \
-           --nonet -o $(srcdir)/devhelp/ \
-         $(top_srcdir)/docs/devhelp/devhelp.xsl $(srcdir)/libvirt-api.xml ; fi
+       $(AM_V_GEN)$(XSLTPROC) --stringparam timestamp $(timestamp) \
+         --nonet -o $(srcdir)/devhelp/ \
+         $(top_srcdir)/docs/devhelp/devhelp.xsl $(srcdir)/libvirt-api.xml
 
 
 python_generated_files = \
index 4a10c85adcf81126e5542854eb66d5305aa242aa..ab6149288fac92c0e87f8ddf89b976a5df74ee0e 100644 (file)
@@ -23,8 +23,16 @@ AC_DEFUN([LIBVIRT_CHECK_EXTERNAL_PROGRAMS], [
   AM_CONDITIONAL([HAVE_RPCGEN], [test "x$ac_cv_path_RPCGEN" != "xno"])
 
   dnl Miscellaneous external programs.
-  AC_PATH_PROG([XMLLINT], [xmllint], [/usr/bin/xmllint])
-  AC_PATH_PROG([XSLTPROC], [xsltproc], [/usr/bin/xsltproc])
+  AC_PATH_PROG([XMLLINT], [xmllint], [])
+  if test -z "$XMLLINT"
+  then
+    AC_MSG_ERROR("xmllint is required to build libvirt")
+  fi
+  AC_PATH_PROG([XSLTPROC], [xsltproc], [])
+  if test -z "$XSLTPROC"
+  then
+    AC_MSG_ERROR("xsltproc is required to build libvirt")
+  fi
   AC_PATH_PROG([AUGPARSE], [augparse], [/usr/bin/augparse])
   AC_PROG_MKDIR_P
   AC_PROG_LN_S