mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Akira Yokosawa <akiyks@gmail.com>
To: Carlos Bilbao <carlos.bilbao@amd.com>, corbet@lwn.net, ojeda@kernel.org
Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	bilbao@vt.edu, konstantin@linuxfoundation.org
Subject: Re: [PATCH v3 2/2] docs: Integrate rustdoc generation into htmldocs
Date: Wed, 7 Dec 2022 08:11:23 +0900	[thread overview]
Message-ID: <6079a282-c802-9836-1ae7-d67526a205c9@gmail.com> (raw)
In-Reply-To: <20221206153151.771038-3-carlos.bilbao@amd.com>

On Tue, 6 Dec 2022 09:31:51 -0600, Carlos Bilbao wrote:
> Change target `make htmldocs` to combine RST Sphinx and the
> generation of Rust documentation, when support is available.
> 
> Signed-off-by: Carlos Bilbao <carlos.bilbao@amd.com>
> ---
>  Documentation/Makefile | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/Documentation/Makefile b/Documentation/Makefile
> index 64d44c1ecad3..f537cf558af6 100644
> --- a/Documentation/Makefile
> +++ b/Documentation/Makefile
> @@ -92,6 +92,10 @@ quiet_cmd_sphinx = SPHINX  $@ --> file://$(abspath $(BUILDDIR)/$3/$4)
>  	fi
>  
>  htmldocs:
> +# If Rust support is available, add rustdoc generated contents
> +ifdef CONFIG_RUST
> +	$(Q)$(MAKE) rustdoc
> +endif
>  	@$(srctree)/scripts/sphinx-pre-install --version-check
>  	@+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,html,$(var),,$(var)))
>  

What about patch below on top of this?
This way, it is possible to skip rustdoc generation by saying:

    make CONFIG_RUST=n SPHINXDIRS=doc-guide htmldocs

The reordering is to complete Sphinx runs even if rustdoc generation
ends up in error.

With this applied on top,

Reviewed-by: Akira Yokosawa <akiyks@gmail.com>

        Thanks, Akira

------
diff --git a/Documentation/Makefile b/Documentation/Makefile
index 2cf3e0fd7839..4d334468aaaf 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -92,12 +92,12 @@ quiet_cmd_sphinx = SPHINX  $@ --> file://$(abspath $(BUILDDIR)/$3/$4)
 	fi
 
 htmldocs:
+	@$(srctree)/scripts/sphinx-pre-install --version-check
+	@+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,html,$(var),,$(var)))
 # If Rust support is available, add rustdoc generated contents
-ifdef CONFIG_RUST
+ifeq ($(CONFIG_RUST),y)
 	$(Q)$(MAKE) rustdoc
 endif
-	@$(srctree)/scripts/sphinx-pre-install --version-check
-	@+$(foreach var,$(SPHINXDIRS),$(call loop_cmd,sphinx,html,$(var),,$(var)))
 
 texinfodocs:
 	@$(srctree)/scripts/sphinx-pre-install --version-check
-- 


  reply	other threads:[~2022-12-06 23:11 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-30 22:08 [PATCH] docs: Integrate rustdoc into Rust documentation Carlos Bilbao
2022-12-01 12:42 ` Miguel Ojeda
2022-12-01 20:40   ` Carlos Bilbao
2022-12-02 16:27     ` Miguel Ojeda
2022-12-02 16:30       ` Carlos Bilbao
2022-12-01 20:48 ` [PATCH v2] " Carlos Bilbao
2022-12-05  1:06   ` Akira Yokosawa
2022-12-05 16:08     ` Miguel Ojeda
2022-12-06 13:32       ` Akira Yokosawa
2022-12-06 15:02         ` Jonathan Corbet
2022-12-06 15:39         ` Miguel Ojeda
2022-12-05 16:36     ` Carlos Bilbao
2022-12-06 14:22       ` Akira Yokosawa
2022-12-06 14:55         ` Carlos Bilbao
2022-12-06 15:01         ` Carlos Bilbao
2022-12-06 15:31   ` [PATCH v3 0/2] " Carlos Bilbao
2022-12-06 15:31     ` [PATCH v3 1/2] docs: Move rustdoc output, cross-reference it Carlos Bilbao
2022-12-06 22:56       ` Akira Yokosawa
2022-12-07  8:27       ` Jani Nikula
2022-12-07 13:49         ` Carlos Bilbao
2022-12-07 14:15           ` Jani Nikula
2022-12-07 15:06             ` Carlos Bilbao
2022-12-07 19:33           ` Jonathan Corbet
2022-12-06 15:31     ` [PATCH v3 2/2] docs: Integrate rustdoc generation into htmldocs Carlos Bilbao
2022-12-06 23:11       ` Akira Yokosawa [this message]
2022-12-07  0:06         ` Randy Dunlap

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=6079a282-c802-9836-1ae7-d67526a205c9@gmail.com \
    --to=akiyks@gmail.com \
    --cc=bilbao@vt.edu \
    --cc=carlos.bilbao@amd.com \
    --cc=corbet@lwn.net \
    --cc=konstantin@linuxfoundation.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ojeda@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

all inboxes | Powered by JetHome®