]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
Makefile: move KERNELDOC macro to the main Makefile
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 24 Apr 2025 00:16:22 +0000 (08:16 +0800)
committerJonathan Corbet <corbet@lwn.net>
Thu, 24 Apr 2025 16:12:46 +0000 (10:12 -0600)
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>
Tested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <bb3ea3b49e76aee51dae7762db10c4d38cd67afe.1745453655.git.mchehab+huawei@kernel.org>

Documentation/Makefile
Makefile

index a006c7681412aa60de8b71e3bce1f118b67e5d79..8c1f6a3dfc441bc422876ad347cd6724209c1f8b 100644 (file)
@@ -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),)
index 38689a0c36052b4ea6541bff8b36048e9689578a..2a05988740a9581ddc2ad392f73265b3cc70dfac 100644 (file)
--- 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)