olena: olena-2.0-579-g96e67f6 Have configure find rst2html.

* configure.ac: Check for rst2html. Define RST2HTML and use it... * doc/Makefile.am (contributors.html): ...here. --- ChangeLog | 8 ++++++++ configure.ac | 19 +++++++++++++++++++ doc/Makefile.am | 9 ++++++--- 3 files changed, 33 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3537bea..e4f81c6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2013-06-28 Roland Levillain <roland@lrde.epita.fr> + + Have configure find rst2html. + + * configure.ac: Check for rst2html. + Define RST2HTML and use it... + * doc/Makefile.am (contributors.html): ...here. + 2013-06-18 Roland Levillain <roland@lrde.epita.fr> Mention bibtex2html and bib2bib as documentation build dependencies. diff --git a/configure.ac b/configure.ac index 08bc85c..8c6b59c 100644 --- a/configure.ac +++ b/configure.ac @@ -160,6 +160,25 @@ if test -z "$TESTS_CXXFLAGS_DEBUG"; then fi +## --------------- ## +## Documentation. ## +## --------------- ## + +# Tools used to build the documentation. + +# rst2html can have many names, especially in the MacPorts, where +# py-docutils binaries include their version numbers in their names. +AC_ARG_VAR([RST2HTML], [reStructuredText-to-HTML translator]) +AC_CHECK_PROGS([RST2HTML], + m4_do([rst2html], + [ rst2html.py], + [ rst2html-3.3.py rst2html-3.2.py rst2html-3.1.py], + [ rst2html-2.7.py rst2html-2.6.py rst2html-2.5.py rst2html-2.4.py])) +if test -z "$RST2HTML"; then + AC_MSG_WARN([rst2html not found, documentation rebuild will not be possible]) +fi + + ## ------------------------------ ## ## ``Enable Everything'' Switch. ## ## ------------------------------ ## diff --git a/doc/Makefile.am b/doc/Makefile.am index eeb417c..bab9ffb 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -149,9 +149,12 @@ EXTRA_DIST += $(USER_REFMAN) ## -------------- ## contributors.html: $(top_srcdir)/AUTHORS - rst2html --stylesheet-path=$(srcdir)/doxygen.css --link-stylesheet \ - --input-encoding=latin1 --output-encoding=latin1 \ - $(top_srcdir)/AUTHORS > contributors.html + @test -n "$(RST2HTML)" \ + || { echo "error: rst2html not found during configure" >&2; \ + exit 1; } + $(RST2HTML) --input-encoding=latin1 --output-encoding=latin1 \ + --stylesheet-path=$(srcdir)/doxygen.css --link-stylesheet \ + $< >$@ ## -------------- ## -- 1.7.10.4
participants (1)
-
Roland Levillain