Although it checked for rst2html, it still would fail to install if it
was missing

Signed-off-by: Ben Lipton <[email protected]>
---
 configure.ac    |    1 +
 doc/Makefile.am |   13 +++++++++----
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 61895a2..358aff8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,6 +21,7 @@ AC_PROG_INSTALL
 AC_PROG_LN_S
 
 AC_PATH_PROG([RST2HTML], [rst2html])
+AM_CONDITIONAL([RST2HTML], [test -n "$RST2HTML"])
 
 AC_CONFIG_FILES([ Makefile
         instance-p2v-target/Makefile
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 40a4b51..cfc8165 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -3,12 +3,17 @@ docrst = \
 
 dochtml = $(docrst:.rst=.html)
 
-nodist_doc_DATA = $(dochtml)
+if RST2HTML
+  nodist_doc_DATA = $(dochtml)
+endif
+
 dist_doc_DATA = $(docrst)
 
 %.html: %.rst
-       @test -n "$(RST2HTML)" || \
-           { echo 'rst2html' not found, docs will not be built; exit 1; }
-       $(RST2HTML) $< > $@
+       @if test -n "$(RST2HTML)"; then\
+           $(RST2HTML) $< > $@;\
+       else\
+           echo 'rst2html' not found, docs will not be built;\
+       fi
 
 CLEANFILES = $(dochtml)
-- 
1.7.3.1

Reply via email to