From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Chen Miao <chenmiao.ku@gmail.com>
Cc: corbet@lwn.net, alexs@kernel.org, si.yanteng@linux.dev,
skhan@linuxfoundation.org, dzm91@hust.edu.cn, mchehab@kernel.org,
wy@wyuan.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 3/6] docs: sphinx-pre-install: check GNU Make version
Date: Wed, 12 Aug 2026 22:17:15 +0200 [thread overview]
Message-ID: <20260812221715.41f9c365@foz.lan> (raw)
In-Reply-To: <20260812182327.53694-4-chenmiao.ku@gmail.com>
On Thu, 13 Aug 2026 02:23:20 +0800
Chen Miao <chenmiao.ku@gmail.com> wrote:
> The kernel documentation build requires GNU Make 4.0 or newer, but the
> Sphinx dependency checker only verifies that a make executable exists. This
> lets incompatible make implementations pass the check and fail later during
> the build.
>
> Check the GNU Make version on all supported systems. Prefer a compatible
> gmake command, which is how Homebrew provides GNU Make on macOS, and fall
> back to make. Use the common kdoc detector so the dependency checker and
> build wrapper apply the same selection logic. Document the requirement and
> the macOS gmake invocation.
LGTM.
Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> # For sphinx-pre-install
>
> Signed-off-by: Chen Miao <chenmiao.ku@gmail.com>
> ---
> Documentation/doc-guide/sphinx.rst | 4 +++-
> tools/docs/sphinx-pre-install | 10 +++++++++-
> 2 files changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/doc-guide/sphinx.rst b/Documentation/doc-guide/sphinx.rst
> index 1e105542a..4fb716e77 100644
> --- a/Documentation/doc-guide/sphinx.rst
> +++ b/Documentation/doc-guide/sphinx.rst
> @@ -147,7 +147,9 @@ documentation. After installing MacTeX, restart the terminal or run
> ``eval "$(/usr/libexec/path_helper)"`` so its command-line tools are visible.
> The default virtualenv mode is recommended on macOS because PyYAML is
> installed from ``Documentation/sphinx/requirements.txt`` rather than from a
> -Homebrew formula.
> +Homebrew formula. The script also checks for GNU Make 4.0 or newer; when
> +Homebrew provides it as ``gmake``, use ``gmake htmldocs`` instead of
> +``make htmldocs``.
>
> Installing Sphinx Minimal Version
> ---------------------------------
> diff --git a/tools/docs/sphinx-pre-install b/tools/docs/sphinx-pre-install
> index 1956f1369..7625ac5a4 100755
> --- a/tools/docs/sphinx-pre-install
> +++ b/tools/docs/sphinx-pre-install
> @@ -37,6 +37,7 @@ import os.path
> src_dir = os.path.dirname(os.path.realpath(__file__))
> sys.path.insert(0, os.path.join(src_dir, '../lib/python'))
> from kdoc.python_version import PythonVersion
> +from kdoc.gmake_detect import find_gmake
>
> RECOMMENDED_VERSION = PythonVersion("3.4.3").version
> MIN_PYTHON_VERSION = PythonVersion("3.7").version
> @@ -308,6 +309,13 @@ class MissingCheckers(AncillaryMethods):
>
> return None
>
> + def check_make(self):
> + """Check for GNU Make 4.0 or newer."""
> + if find_gmake(os.environ.get("MAKE")):
> + return
> +
> + self.deps.add_package("make", DepManager.SYSTEM_MANDATORY)
> +
> def check_perl_module(self, prog, dtype):
> """
> Does perl have a dependency? Is it available?
> @@ -1559,7 +1567,7 @@ class SphinxDependencyChecker(MissingCheckers):
> # Check for needed programs/tools
> self.check_perl_module("Pod::Usage", DepManager.SYSTEM_MANDATORY)
>
> - self.check_program("make", DepManager.SYSTEM_MANDATORY)
> + self.check_make()
> self.check_program("which", DepManager.SYSTEM_MANDATORY)
>
> self.check_program("dot", DepManager.SYSTEM_OPTIONAL)
Thanks,
Mauro
next prev parent reply other threads:[~2026-08-12 20:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-12 18:23 [PATCH v3 0/6] docs: sphinx-pre-install: improve dependency checks Chen Miao
2026-08-12 18:23 ` [PATCH v3 1/6] docs: kdoc: add GNU Make detection Chen Miao
2026-08-12 20:13 ` Mauro Carvalho Chehab
2026-08-12 18:23 ` [PATCH v3 2/6] docs: sphinx-pre-install: add macOS Homebrew support Chen Miao
2026-08-12 20:15 ` Mauro Carvalho Chehab
2026-08-12 18:23 ` [PATCH v3 3/6] docs: sphinx-pre-install: check GNU Make version Chen Miao
2026-08-12 20:17 ` Mauro Carvalho Chehab [this message]
2026-08-12 18:23 ` [PATCH v3 4/6] docs: sphinx-build-wrapper: prefer gmake Chen Miao
2026-08-12 20:23 ` Mauro Carvalho Chehab
2026-08-12 18:23 ` [PATCH v3 5/6] docs/zh_CN: doc-guide: document macOS Sphinx setup Chen Miao
2026-08-12 18:23 ` [PATCH v3 6/6] docs/zh_CN: how-to: document case-sensitive APFS setup Chen Miao
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=20260812221715.41f9c365@foz.lan \
--to=mchehab+huawei@kernel.org \
--cc=alexs@kernel.org \
--cc=chenmiao.ku@gmail.com \
--cc=corbet@lwn.net \
--cc=dzm91@hust.edu.cn \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=si.yanteng@linux.dev \
--cc=skhan@linuxfoundation.org \
--cc=wy@wyuan.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