Skip to content

Commit 110214e

Browse files
mchehabJonathan Corbet
authored andcommitted
Makefile: move KERNELDOC macro to the main Makefile
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>
1 parent 76a9b59 commit 110214e

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

Documentation/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ endif #HAVE_LATEXMK
6060
# Internal variables.
6161
PAPEROPT_a4 = -D latex_paper_size=a4
6262
PAPEROPT_letter = -D latex_paper_size=letter
63-
KERNELDOC = $(srctree)/scripts/kernel-doc.py
6463
ALLSPHINXOPTS = -D kerneldoc_srctree=$(srctree) -D kerneldoc_bin=$(KERNELDOC)
6564
ALLSPHINXOPTS += $(PAPEROPT_$(PAPER)) $(SPHINXOPTS)
6665
ifneq ($(wildcard $(srctree)/.config),)

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,11 @@ endif
458458
HOSTRUSTC = rustc
459459
HOSTPKG_CONFIG = pkg-config
460460

461+
# the KERNELDOC macro needs to be exported, as scripts/Makefile.build
462+
# has a logic to call it
463+
KERNELDOC = $(srctree)/scripts/kernel-doc.py
464+
export KERNELDOC
465+
461466
KBUILD_USERHOSTCFLAGS := -Wall -Wmissing-prototypes -Wstrict-prototypes \
462467
-O2 -fomit-frame-pointer -std=gnu11
463468
KBUILD_USERCFLAGS := $(KBUILD_USERHOSTCFLAGS) $(USERCFLAGS)

0 commit comments

Comments
 (0)