From f05c99f30589411b5dc3eeca984d47fd2be01530 Mon Sep 17 00:00:00 2001 From: Michael Hanselmann <hansmi@google.com> Date: Tue, 30 Sep 2008 12:28:14 +0000 Subject: [PATCH] Build HTML from RST input This patch also adds the design documents to Makefile.am. Reviewed-by: iustinp --- Makefile.am | 13 +++++++++++++ configure.ac | 8 ++++++++ 2 files changed, 21 insertions(+) diff --git a/Makefile.am b/Makefile.am index c329c5e54..94063d48e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 diff --git a/configure.ac b/configure.ac index a8d449972..38fae849f 100644 --- a/configure.ac +++ b/configure.ac @@ -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) -- GitLab