]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
build: don't fail when xsltproc is missing
authorEric Blake <eblake@redhat.com>
Wed, 5 Sep 2012 17:55:42 +0000 (11:55 -0600)
committerEric Blake <eblake@redhat.com>
Wed, 5 Sep 2012 18:05:55 +0000 (12:05 -0600)
On a machine without xsltproc, the build failed with:

Scripting search.php
/usr/local/bin/bash: line 1: search.php.tmp: No such file or directory
rm: ./search.php: No such file or directory

Regression introduced in commit 28183590.

* docs/Makefile.am (%.php): Skip in the same conditions when the
.tmp file is skipped.

docs/Makefile.am

index fad8979bac23ce38784f56a86e9b73dde8ed985d..91c3d33e2495b29ed9dbbe1d56245b6ded7d2517 100644 (file)
@@ -186,10 +186,11 @@ internals/%.html.tmp: internals/%.html.in subsite.xsl page.xsl sitemap.html.in
            || { rm $@ && exit 1; }; fi
 
 %.php: %.php.tmp %.php.code.in
-       @echo "Scripting $@"; \
-         sed -e '/<a id="php_placeholder"><\/a>/r '"$(srcdir)/$@.code.in" \
-         -e /php_placeholder/d < $@.tmp > $(srcdir)/$@ \
-         || { rm $(srcdir)/$@ && exit 1; }
+       @if [ -x $(XSLTPROC) ] ; then \
+         echo "Scripting $@"; \
+           sed -e '/<a id="php_placeholder"><\/a>/r '"$(srcdir)/$@.code.in" \
+           -e /php_placeholder/d < $@.tmp > $(srcdir)/$@ \
+           || { rm $(srcdir)/$@ && exit 1; }; fi
 
 html/index.html: libvirt-api.xml newapi.xsl page.xsl sitemap.html.in
        $(AM_V_GEN)if [ -x $(XSLTPROC) ] ; then \