mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Jim Davis <jim.epost@gmail.com>,
	linux-doc <linux-doc@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Cc: jani.nikula@intel.com
Subject: [PATCH] Documentation/sphinx: make targets independent of Sphinx work for HAVE_SPHINX=0
Date: Mon, 30 Jan 2017 18:58:15 +0200	[thread overview]
Message-ID: <1485795495-22680-1-git-send-email-jani.nikula@intel.com> (raw)
In-Reply-To: <CA+r1ZhjRVqkjPXGOGB_BOAX2Hkfb+qQCtTzFfBMFeH1Mfeej7w@mail.gmail.com>

Make targets that don't depend on Sphinx work without warnings about
missing Sphinx. 'make cleandocs' will work without Sphinx just fine, and
the targets that are no-ops for Sphinx should just be skipped. Move them
outside of the HAVE_SPHINX checks to take precedence over the .DEFAULT
target for HAVE_SPHINX=0.

Reported-by: Jim Davis <jim.epost@gmail.com>
Reference: http://lkml.kernel.org/r/CA+r1ZhjRVqkjPXGOGB_BOAX2Hkfb+qQCtTzFfBMFeH1Mfeej7w@mail.gmail.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 Documentation/Makefile.sphinx | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/Documentation/Makefile.sphinx b/Documentation/Makefile.sphinx
index 707c65337ebf..d1aa7ffdea64 100644
--- a/Documentation/Makefile.sphinx
+++ b/Documentation/Makefile.sphinx
@@ -90,6 +90,11 @@ epubdocs:
 xmldocs:
 	@$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,xml,$(var),xml,$(var)))
 
+endif # HAVE_SPHINX
+
+# The following targets are independent of HAVE_SPHINX, and the rules should
+# work or silently pass without Sphinx.
+
 # no-ops for the Sphinx toolchain
 sgmldocs:
 psdocs:
@@ -100,8 +105,6 @@ cleandocs:
 	$(Q)rm -rf $(BUILDDIR)
 	$(Q)$(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) -C Documentation/media clean
 
-endif # HAVE_SPHINX
-
 dochelp:
 	@echo  ' Linux kernel internal documentation in different formats (Sphinx):'
 	@echo  '  htmldocs        - HTML'
-- 
2.1.4

  reply	other threads:[~2017-01-30 16:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-27 22:47 Extra messages from Makefile.sphinx Jim Davis
2017-01-30 16:58 ` Jani Nikula [this message]
2017-01-30 17:12   ` [PATCH] Documentation/sphinx: make targets independent of Sphinx work for HAVE_SPHINX=0 Jani Nikula
2017-02-01 20:13   ` Jonathan Corbet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1485795495-22680-1-git-send-email-jani.nikula@intel.com \
    --to=jani.nikula@intel.com \
    --cc=jim.epost@gmail.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome