kbuild: Abort build if SUBDIRS used
authorBen Hutchings <benh@debian.org>
Mon, 26 Apr 2021 16:27:16 +0000 (18:27 +0200)
committerBen Hutchings <benh@debian.org>
Mon, 19 May 2025 17:24:37 +0000 (19:24 +0200)
commit50012bd4384ca8fff92c12b9d7d25ad0872f6dd3
tree94e14ef6279c1261274c1d7d2ee8bb249cb3ff32
parentd7c105654e56b2fdd9f47abb8b9439f1992458b0
kbuild: Abort build if SUBDIRS used

Forwarded: not-needed
Bug-Debian: https://bugs.debian.org/987575

DKMS and module-assistant both build OOT modules as root.  If they
build an old OOT module that still use SUBDIRS this causes Kbuild
to try building a full kernel, which obviously fails but not before
deleting files from the installed headers package.

To avoid such mishaps, detect this situation and abort the build.

The error message is based on that used in commit 0126be38d988
"kbuild: announce removal of SUBDIRS if used".

Gbp-Pq: Topic debian
Gbp-Pq: Name kbuild-abort-build-if-subdirs-used.patch
Makefile