[ovs-dev] [RFC] make: Check for Sphinx before checking docs
Stephen Finucane
stephen at that.guru
Fri Dec 23 23:04:48 UTC 2016
Signed-off-by: Stephen Finucane <stephen at that.guru>
---
I can't get this to work. I'm getting the following error message:
Documentation/automake.mk:106: error: HAVE_SPHINX does not appear in AM_CONDITIONAL
---
Documentation/automake.mk | 4 +++-
m4/openvswitch.m4 | 14 +++++++++++++-
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/Documentation/automake.mk b/Documentation/automake.mk
index b27ad13..1e7589c 100644
--- a/Documentation/automake.mk
+++ b/Documentation/automake.mk
@@ -103,7 +103,9 @@ htmldocs:
rm -rf $(SPHINXBUILDDIR)/*
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(SPHINXBUILDDIR)/html
-.PHONY: docs-check
+if HAVE_SPHINX
ALL_LOCAL += docs-check
docs-check:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) -q $(SPHINXBUILDDIR)/linkcheck
+CLEANFILES += docs-check
+endif
diff --git a/m4/openvswitch.m4 b/m4/openvswitch.m4
index a448223..d49adf2 100644
--- a/m4/openvswitch.m4
+++ b/m4/openvswitch.m4
@@ -400,7 +400,7 @@ else:
AM_CONDITIONAL([HAVE_PYTHON3], [test "$HAVE_PYTHON3" = yes])])
-dnl Checks for dot.
+dnl Checks for flake8.
AC_DEFUN([OVS_CHECK_FLAKE8],
[AC_CACHE_CHECK(
[for flake8],
@@ -412,6 +412,18 @@ AC_DEFUN([OVS_CHECK_FLAKE8],
fi])
AM_CONDITIONAL([HAVE_FLAKE8], [test "$ovs_cv_flake8" = yes])])
+dnl Checks for sphinx.
+AC_DEFUN([OVS_CHECK_SPHINX],
+ [AC_CACHE_CHECK(
+ [for sphinx-build],
+ [ovs_cv_sphinx],
+ [if sphinx-build --version >/dev/null 2>&1; then
+ ovs_cv_sphinx=yes
+ else
+ ovs_cv_sphinx=no
+ fi])
+ AM_CONDITIONAL([HAVE_SPHINX], [test "$ovs_cv_sphinx" = yes])])
+
dnl Checks for dot.
AC_DEFUN([OVS_CHECK_DOT],
[AC_CACHE_CHECK(
--
2.9.3
More information about the dev
mailing list