doc-rst: fixed cleandoc target when used with O=dir

Message ID 1485856661-23095-1-git-send-email-markus.heiser@darmarit.de (mailing list archive)
State Not Applicable, archived
Headers

Commit Message

Markus Heiser Jan. 31, 2017, 9:57 a.m. UTC
  The cleandocs target won't work if I use a different output folder::

  $ make O=/tmp/kernel SPHINXDIRS="process" cleandocs
  make[1]: Entering directory '/tmp/kernel'
  make[3]: *** No rule to make target 'clean'.  Stop.
  ... Documentation/Makefile.sphinx:100: recipe for target 'cleandocs' failed

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
---
 Documentation/Makefile.sphinx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Jonathan Corbet Feb. 1, 2017, 8:10 p.m. UTC | #1
On Tue, 31 Jan 2017 10:57:41 +0100
Markus Heiser <markus.heiser@darmarit.de> wrote:

> The cleandocs target won't work if I use a different output folder::
> 
>   $ make O=/tmp/kernel SPHINXDIRS="process" cleandocs
>   make[1]: Entering directory '/tmp/kernel'
>   make[3]: *** No rule to make target 'clean'.  Stop.
>   ... Documentation/Makefile.sphinx:100: recipe for target 'cleandocs' failed

Applied, thanks.

jon
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  

Patch

diff --git a/Documentation/Makefile.sphinx b/Documentation/Makefile.sphinx
index e14d82a..be1936e 100644
--- a/Documentation/Makefile.sphinx
+++ b/Documentation/Makefile.sphinx
@@ -98,7 +98,7 @@  installmandocs:
 
 cleandocs:
 	$(Q)rm -rf $(BUILDDIR)
-	$(Q)$(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) -C Documentation/media clean
+	$(Q)$(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) $(build)=Documentation/media clean
 
 endif # HAVE_SPHINX