kbuild: Abort build if SUBDIRS used
authorBen Hutchings <benh@debian.org>
Mon, 26 Apr 2021 16:27:16 +0000 (18:27 +0200)
committerSalvatore Bonaccorso <carnil@debian.org>
Thu, 1 Dec 2022 06:42:33 +0000 (06:42 +0000)
commit34064ff50531f38a0895f01045a4bf5f482910a8
treee2583cdf6ebc6fbaffe055e5beddc972a5771a9a
parent7ae5f3eb57d46852cab8d0c90a37d96dfd912d99
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