From patchwork Thu Mar 16 17:01:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell Bryant X-Patchwork-Id: 739918 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vkZWS5krRz9rvt for ; Fri, 17 Mar 2017 04:01:40 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 32531BC5; Thu, 16 Mar 2017 17:01:39 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 7F552BC4 for ; Thu, 16 Mar 2017 17:01:37 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id AE587163 for ; Thu, 16 Mar 2017 17:01:36 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 102C2804F7; Thu, 16 Mar 2017 17:01:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 102C2804F7 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=ovn.org Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=russell@ovn.org DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 102C2804F7 Received: from t460s.redhat.com (unknown [10.10.121.193]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9B9A5183A6; Thu, 16 Mar 2017 17:01:36 +0000 (UTC) From: Russell Bryant To: dev@openvswitch.org Date: Thu, 16 Mar 2017 13:01:32 -0400 Message-Id: <20170316170132.6486-1-russell@ovn.org> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 16 Mar 2017 17:01:37 +0000 (UTC) X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH] build: Only re-gen HTML docs when needed. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org 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 Acked-by: Ben Pfaff --- .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