When sphinx-build is installed, the docs were being re-generated during every invocation of "make". This patch sets up dependencies such that sphinx-build will only be executed if one of the documentation files has changed.
Signed-off-by: Russell Bryant <russ...@ovn.org> --- .gitignore | 1 + Documentation/automake.mk | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 4f50440..cd26dfe 100644 --- a/.gitignore +++ b/.gitignore @@ -30,6 +30,7 @@ .libs .tmp_versions .gitattributes +.htmldocs /Makefile /Makefile.in /aclocal.m4 diff --git a/Documentation/automake.mk b/Documentation/automake.mk index c4076aa..3872ad0 100644 --- a/Documentation/automake.mk +++ b/Documentation/automake.mk @@ -1,4 +1,4 @@ -EXTRA_DIST += \ +DOC_SOURCE = \ Documentation/group-selection-method-property.txt \ Documentation/_static/logo.png \ Documentation/_static/overview.png \ @@ -90,6 +90,8 @@ EXTRA_DIST += \ Documentation/internals/contributing/submitting-patches.rst \ Documentation/requirements.txt +EXTRA_DIST += $(DOC_SOURCE) + # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build @@ -106,9 +108,9 @@ 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 +.htmldocs: $(DOC_SOURCE) + $(AM_V_GEN)$(SPHINXBUILD) $(sphinx_verbose) -b html $(ALLSPHINXOPTS) $(SPHINXBUILDDIR)/html && touch $@ +ALL_LOCAL += .htmldocs check-docs: $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(SPHINXBUILDDIR)/linkcheck @@ -119,6 +121,5 @@ clean-docs: rm -rf $(SPHINXBUILDDIR)/linkcheck CLEAN_LOCAL += clean-docs endif -.PHONY: htmldocs .PHONY: check-docs .PHONY: clean-docs -- 2.9.3 _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev