From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Linux Doc Mailing List <linux-doc@vger.kernel.org>
Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
"Jonathan Corbet" <corbet@lwn.net>,
Masahiro Yamada <masahiroy@kernel.org>,
Nathan Chancellor <nathan@kernel.org>,
Nicolas Schier <nicolas.schier@linux.dev>,
linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v3 2/4] Makefile: move KERNELDOC macro to the main Makefile
Date: Sat, 19 Apr 2025 07:50:03 +0800 [thread overview]
Message-ID: <ba2fcdbc21e7d83586f9d010da222308abb910ce.1745019660.git.mchehab+huawei@kernel.org> (raw)
In-Reply-To: <cover.1745019660.git.mchehab+huawei@kernel.org>
As kernel-doc script is used not only on Documentation, but
also on scripts and drivers/drm Makefiles, move it to the
main makefile, as otherwise sub-makefiles may not have it.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
Documentation/Makefile | 1 -
Makefile | 5 +++++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/Documentation/Makefile b/Documentation/Makefile
index a006c7681412..8c1f6a3dfc44 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -60,7 +60,6 @@ endif #HAVE_LATEXMK
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
-KERNELDOC = $(srctree)/scripts/kernel-doc.py
ALLSPHINXOPTS = -D kerneldoc_srctree=$(srctree) -D kerneldoc_bin=$(KERNELDOC)
ALLSPHINXOPTS += $(PAPEROPT_$(PAPER)) $(SPHINXOPTS)
ifneq ($(wildcard $(srctree)/.config),)
diff --git a/Makefile b/Makefile
index 38689a0c3605..2a05988740a9 100644
--- a/Makefile
+++ b/Makefile
@@ -458,6 +458,11 @@ endif
HOSTRUSTC = rustc
HOSTPKG_CONFIG = pkg-config
+# the KERNELDOC macro needs to be exported, as scripts/Makefile.build
+# has a logic to call it
+KERNELDOC = $(srctree)/scripts/kernel-doc.py
+export KERNELDOC
+
KBUILD_USERHOSTCFLAGS := -Wall -Wmissing-prototypes -Wstrict-prototypes \
-O2 -fomit-frame-pointer -std=gnu11
KBUILD_USERCFLAGS := $(KBUILD_USERHOSTCFLAGS) $(USERCFLAGS)
--
2.49.0
next prev parent reply other threads:[~2025-04-18 23:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-18 23:50 [PATCH v3 0/4] Don't create Python bytecode when building the kernel Mauro Carvalho Chehab
2025-04-18 23:50 ` [PATCH v3 1/4] docs: Makefile: get rid of KERNELDOC_CONF env variable Mauro Carvalho Chehab
2025-04-18 23:50 ` Mauro Carvalho Chehab [this message]
2025-04-18 23:50 ` [PATCH v3 3/4] scripts/kernel-doc.py: don't create *.pyc files Mauro Carvalho Chehab
2025-04-18 23:50 ` [PATCH v3 4/4] .gitignore: ignore Python compiled bytecode Mauro Carvalho Chehab
2025-04-19 9:17 ` Miguel Ojeda
2025-04-19 9:25 ` Miguel Ojeda
2025-04-19 16:14 ` Andy Shevchenko
2025-04-19 16:14 ` [PATCH v3 0/4] Don't create Python bytecode when building the kernel Andy Shevchenko
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=ba2fcdbc21e7d83586f9d010da222308abb910ce.1745019660.git.mchehab+huawei@kernel.org \
--to=mchehab+huawei@kernel.org \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=nathan@kernel.org \
--cc=nicolas.schier@linux.dev \
/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®