From a909573e5e57f8a6ee92cf4ffb031b9762642d1b Mon Sep 17 00:00:00 2001 From: Brian Aker Date: Sun, 28 Apr 2013 07:30:05 -0400 Subject: [PATCH 1/1] Update rules for sphinx` --- configure.ac | 2 +- docs/include.am | 13 ------------- m4/ax_prog_sphinx_build.m4 | 18 ++++++++---------- man/include.am | 6 ------ 4 files changed, 9 insertions(+), 30 deletions(-) diff --git a/configure.ac b/configure.ac index 6f768b15..727ee722 100644 --- a/configure.ac +++ b/configure.ac @@ -109,7 +109,7 @@ AC_PROG_SED AC_PROG_MKDIR_P AC_CHECK_PROGS([LEX],['flex'],[:]) AC_CHECK_PROGS([YACC],['bison --warnings=all'],[:]) -AX_PROG_SPHINX_BUILD +AX_PROG_SPHINX_BUILD(,[AC_MSG_ERROR([sphinx-build version 1.0 or greater is required])]) AX_PROG_MEMCACHED # Checks for libraries. diff --git a/docs/include.am b/docs/include.am index b302681d..f28079f8 100644 --- a/docs/include.am +++ b/docs/include.am @@ -19,7 +19,6 @@ clean-docs-check: -rm -rf docs/_build docs/doctrees man/.doctrees/ .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest -if HAVE_SPHINX sphinx-help: @echo "Please use \`make ' where is one of" @@ -86,15 +85,9 @@ latexpdf: latex text: docs/conf.py @PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/text -if HAVE_RECENT_SPHINX man: @PYTHONPATH=$(SPHINX_BUILDDIR)/docs $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) ${top_builddir}/man -else - -man: - -endif changes: docs/conf.py @PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/changes @@ -106,9 +99,3 @@ doctest: docs/conf.py PYTHONPATH=${top_srcdir}/docs $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(SPHINX_BUILDDIR)/doctest @echo "Testing of doctests in the sources finished, look at the " \ "results in $(SPHINX_BUILDDIR)/doctest/output.txt." - -else - -man: - -endif diff --git a/m4/ax_prog_sphinx_build.m4 b/m4/ax_prog_sphinx_build.m4 index cbbf1723..270067aa 100644 --- a/m4/ax_prog_sphinx_build.m4 +++ b/m4/ax_prog_sphinx_build.m4 @@ -4,30 +4,25 @@ # # SYNOPSIS # -# AX_PROG_SPHINX_BUILD() +# AX_PROG_SPHINX_BUILD([ACTION-IF-FOUND], [ACTION-IF-NOT_FOUND]) # # DESCRIPTION # -# Look for sphinx-build +# Look for sphinx-build and make sure it is a recent version of it. # # LICENSE # -# Copyright (c) 2012 Brian Aker +# Copyright (c) 2012-2013 Brian Aker # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 2 +#serial 3 AC_DEFUN([AX_PROG_SPHINX_BUILD], [AC_PREREQ([2.63])dnl - AC_CHECK_PROGS([PERL], [perl]) - AC_CHECK_PROGS([DPKG_GENSYMBOLS], [dpkg-gensymbols], [:]) - AC_CHECK_PROGS([LCOV], [lcov], [echo lcov not found]) - AC_CHECK_PROGS([LCOV_GENHTML], [genhtml], [echo genhtml not found]) - AC_CHECK_PROGS([SPHINXBUILD], [sphinx-build], [:]) AS_IF([test "x${SPHINXBUILD}" != "x:"],[ AC_CACHE_CHECK([if sphinx is new enough],[ac_cv_recent_sphinx],[ @@ -39,7 +34,10 @@ AC_DEFUN([AX_PROG_SPHINX_BUILD], ]) ]) - AM_CONDITIONAL([HAVE_DPKG_GENSYMBOLS],[test "x${DPKG_GENSYMBOLS}" != "x:"]) AM_CONDITIONAL([HAVE_SPHINX],[test "x${SPHINXBUILD}" != "x:"]) AM_CONDITIONAL([HAVE_RECENT_SPHINX],[test "x${ac_cv_recent_sphinx}" = "xyes"]) + + AS_IF([test "x${ac_cv_recent_sphinx}" = "xyes"], + [ifelse([$2], , :, [$2])], + [ifelse([$3], , :, [$3])]) ]) diff --git a/man/include.am b/man/include.am index 0a84bf71..f11f37a4 100644 --- a/man/include.am +++ b/man/include.am @@ -2,16 +2,10 @@ # included from Top Level Makefile.am # All paths should be given relative to the root -if HAVE_RECENT_SPHINX -if IS_VCS_CHECKOUT - # Build rule for documentation $(dist_man_MANS): man BUILT_SOURCES+= $(dist_man_MANS) -endif -endif - dist_man_MANS+= man/memaslap.1 dist_man_MANS+= man/memcapable.1 dist_man_MANS+= man/memcat.1 -- 2.30.2