Skip to content

Commit

Permalink
make: Check for Sphinx before checking docs
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Finucane <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
stephenfin authored and blp committed Jan 4, 2017
1 parent f93f0e4 commit d84bdc8
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
7 changes: 5 additions & 2 deletions Documentation/automake.mk
Original file line number Diff line number Diff line change
Expand Up @@ -101,18 +101,21 @@ ALLSPHINXOPTS = -W -n -d $(SPHINXBUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHIN
sphinx_verbose = $(sphinx_verbose_@AM_V@)
sphinx_verbose_ = $(sphinx_verbose_@AM_DEFAULT_V@)
sphinx_verbose_0 = -q

if HAVE_SPHINX
htmldocs:
$(AM_V_GEN)$(SPHINXBUILD) $(sphinx_verbose) -b html $(ALLSPHINXOPTS) $(SPHINXBUILDDIR)/html
ALL_LOCAL += htmldocs
.PHONY: htmldocs

check-docs:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(SPHINXBUILDDIR)/linkcheck
.PHONY: check-docs

clean-docs:
rm -rf $(SPHINXBUILDDIR)/doctrees
rm -rf $(SPHINXBUILDDIR)/html
rm -rf $(SPHINXBUILDDIR)/linkcheck
CLEAN_LOCAL += clean-docs
endif
.PHONY: htmldocs
.PHONY: check-docs
.PHONY: clean-docs
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ OVS_CHECK_LOGDIR
OVS_CHECK_PYTHON
OVS_CHECK_PYTHON3
OVS_CHECK_FLAKE8
OVS_CHECK_SPHINX
OVS_CHECK_DOT
OVS_CHECK_IF_PACKET
OVS_CHECK_IF_DL
Expand Down
14 changes: 13 additions & 1 deletion m4/openvswitch.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand All @@ -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],
[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(
Expand Down

0 comments on commit d84bdc8

Please sign in to comment.