aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>2025-04-24 08:16:22 +0800
committerJonathan Corbet <corbet@lwn.net>2025-04-24 10:12:46 -0600
commit110214e4ccd46afa037736516d42288e61f777fe (patch)
tree228bdeb2e77604b9931ffce067c343bdbe7d0d92 /Makefile
parent76a9b59228d5a9827d969fc3b1b420fa0a985842 (diff)
downloadlinux-next-history-110214e4ccd46afa037736516d42288e61f777fe.tar.gz
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>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 5 insertions, 0 deletions
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)