Build HTML from RST input
authorMichael Hanselmann <hansmi@google.com>
Tue, 30 Sep 2008 12:28:14 +0000 (12:28 +0000)
committerMichael Hanselmann <hansmi@google.com>
Tue, 30 Sep 2008 12:28:14 +0000 (12:28 +0000)
This patch also adds the design documents to Makefile.am.

Reviewed-by: iustinp

Makefile.am
configure.ac

index c329c5e..94063d4 100644 (file)
@@ -106,7 +106,16 @@ docsgml = \
        doc/rapi.sgml \
        doc/iallocator.sgml
 
+docrst = \
+       doc/design-2.0-commandline-parameters.rst \
+       doc/design-2.0-disk-handling.rst \
+       doc/design-2.0-index.rst \
+       doc/design-2.0-job-queue.rst \
+       doc/design-2.0-locking.rst \
+       doc/design-2.0-master-daemon.rst
+
 doc_DATA = \
+       $(patsubst %.rst,%.html,$(docrst)) \
        $(patsubst %.sgml,%.html,$(docsgml)) \
        $(patsubst %.sgml,%.pdf,$(docsgml))
 
@@ -134,6 +143,7 @@ EXTRA_DIST = \
        DEVNOTES \
        autotools/docbook-wrapper \
        devel/upload.in \
+       $(docrst) \
        $(docsgml) \
        doc/build-rapi-resources-doc \
        doc/examples/ganeti.initd.in \
@@ -223,6 +233,9 @@ doc/%.pdf: doc/%.in $(DOCBOOK_WRAPPER)
 doc/%.html: doc/%.in $(DOCBOOK_WRAPPER)
        $(DOCBOOK_WRAPPER) $< $@
 
+doc/%.html: doc/%.rst
+       $(RST2HTML) $< $@
+
 doc/rapi.pdf doc/rapi.html: doc/rapi-resources.sgml
 
 doc/rapi-resources.sgml: $(BUILD_RAPI_RESOURCE_DOC) lib/rapi/connector.py
index a8d4499..38fae84 100644 (file)
@@ -125,6 +125,14 @@ then
   AC_MSG_ERROR([docbook2html not found])
 fi
 
+# Check for rst programs
+AC_ARG_VAR(RST2HTML, [rst2html path])
+AC_PATH_PROG(RST2HTML, [rst2html], [])
+if test -z "$RST2HTML"
+then
+  AC_MSG_ERROR([rst2html not found])
+fi
+
 # Check for Python
 AM_PATH_PYTHON(2.4)