From: Mauro Carvalho Chehab Date: Thu, 24 Apr 2025 00:16:22 +0000 (+0800) Subject: Makefile: move KERNELDOC macro to the main Makefile X-Git-Tag: v6.16-rc1~176^2~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=110214e4ccd46afa037736516d42288e61f777fe;p=thirdparty%2Fkernel%2Flinux.git 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 Tested-by: Andy Shevchenko Signed-off-by: Jonathan Corbet Message-ID: --- diff --git a/Documentation/Makefile b/Documentation/Makefile index a006c7681412a..8c1f6a3dfc441 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 38689a0c36052..2a05988740a95 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)