From nobody Thu May 15 22:08:45 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 150109151248654.294029114981186; Wed, 26 Jul 2017 10:51:52 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8D14278EA4; Wed, 26 Jul 2017 17:51:50 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3586486E91; Wed, 26 Jul 2017 17:51:50 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id C4C2E4BB78; Wed, 26 Jul 2017 17:51:49 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v6QHpdhm025535 for ; Wed, 26 Jul 2017 13:51:39 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8BC1917106; Wed, 26 Jul 2017 17:51:39 +0000 (UTC) Received: from t460.redhat.com (ovpn-116-106.ams2.redhat.com [10.36.116.106]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3F22169316; Wed, 26 Jul 2017 17:51:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 8D14278EA4 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: "Daniel P. Berrange" To: libvir-list@redhat.com Date: Wed, 26 Jul 2017 18:51:06 +0100 Message-Id: <20170726175115.400-4-berrange@redhat.com> In-Reply-To: <20170726175115.400-1-berrange@redhat.com> References: <20170726175115.400-1-berrange@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 03/12] docs: make xmllint & xsltproc compulsory X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 26 Jul 2017 17:51:51 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 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 --- docs/Makefile.am | 44 +++++++++++++++-------------------------= ---- m4/virt-external-programs.m4 | 12 ++++++++++-- 2 files changed, 25 insertions(+), 31 deletions(-) diff --git a/docs/Makefile.am b/docs/Makefile.am index f478d9505..d6c9d0091 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -221,17 +221,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=3D""//g' $@-tmp >$@ \ || { rm -f $@-tmp; exit 1; }; \ - rm -f $@-tmp; \ - fi + rm -f $@-tmp EXTRA_DIST +=3D \ $(srcdir)/news.xml \ $(srcdir)/news.rng \ @@ -244,9 +241,7 @@ MAINTAINERCLEANFILES +=3D \ =20 %.html.tmp: %.html.in site.xsl subsite.xsl page.xsl \ $(acl_generated) - @if [ -x $(XSLTPROC) ] ; then \ - echo "Generating $@"; \ - name=3D`echo $@ | sed -e 's/.tmp//'`; \ + $(AM_V_GEN)name=3D`echo $@ | sed -e 's/.tmp//'`; \ dir=3D`dirname $@` ; \ if test "$$dir" =3D "."; \ then \ @@ -257,42 +252,33 @@ MAINTAINERCLEANFILES +=3D \ fi; \ $(XSLTPROC) --stringparam pagename $$name --nonet \ $(top_srcdir)/docs/$$style $< > $@ \ - || { rm $@ && exit 1; }; fi + || { rm $@ && exit 1; } =20 %.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; } =20 %.php.tmp: %.php.in site.xsl page.xsl - @if [ -x $(XSLTPROC) ] ; then \ - echo "Generating $@"; \ - $(XSLTPROC) --stringparam pagename $(@:.tmp=3D) --nonet \ + $(AM_V_GEN)$(XSLTPROC) --stringparam pagename $(@:.tmp=3D) --nonet \ $(top_srcdir)/docs/site.xsl $< > $@ \ - || { rm $@ && exit 1; }; fi + || { rm $@ && exit 1; } =20 %.php: %.php.tmp %.php.code.in - @if [ -x $(XSLTPROC) ] ; then \ - echo "Scripting $@"; \ - sed -e '/<\/span>/r '"$(srcdir)/$@.code.= in" \ + $(AM_V_GEN)sed -e '/<\/span>/r '"$(srcdir)/$= @.code.in" \ -e /php_placeholder/d < $@.tmp > $(srcdir)/$@ \ - || { rm $(srcdir)/$@ && exit 1; }; fi + || { rm $(srcdir)/$@ && exit 1; } =20 $(apihtml_generated): html/index.html =20 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)' \ - $(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 =20 $(addprefix $(srcdir)/,$(devhelphtml)): $(srcdir)/libvirt-api.xml $(devhel= pxsl) - $(AM_V_GEN)if [ -x $(XSLTPROC) ] ; then \ - $(XSLTPROC) --nonet -o $(srcdir)/devhelp/ \ - $(top_srcdir)/docs/devhelp/devhelp.xsl $(srcdir)/libvirt-api.xml ; fi + $(AM_V_GEN)$(XSLTPROC) --nonet -o $(srcdir)/devhelp/ \ + $(top_srcdir)/docs/devhelp/devhelp.xsl $(srcdir)/libvirt-api.xml =20 =20 python_generated_files =3D \ diff --git a/m4/virt-external-programs.m4 b/m4/virt-external-programs.m4 index 4a10c85ad..ab6149288 100644 --- a/m4/virt-external-programs.m4 +++ b/m4/virt-external-programs.m4 @@ -23,8 +23,16 @@ AC_DEFUN([LIBVIRT_CHECK_EXTERNAL_PROGRAMS], [ AM_CONDITIONAL([HAVE_RPCGEN], [test "x$ac_cv_path_RPCGEN" !=3D "xno"]) =20 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 --=20 2.13.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list