Skip to contentSkip to conversation

Example 3 inclusion, Documentation/kbuild/modules.txt:250

PATCH C.J. Collier KF7BMP 2 participants 2 messages Apr 4, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hello Michal and kbuild team,

I think I've spotted an error in the module KBuild / Makefile documentation. I believe that the first condition should be executed only if KERNELRELEASE is unset, and the rest should be executed unconditionally. Let me know if I'm misreading it.

This patch is Copyright 2016 The Linux Foundation.

Cheers,

C.J. Collier
Release Engineer

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Documentation/kbuild/modules.txt +0 -0
index 3fb39e0..1c79e82 100644

- --- a/Documentation/kbuild/modules.txt
+++ b/Documentation/kbuild/modules.txt
@@ -247,8 +247,8 @@ module 8123.ko, which is built from the following files:
ifneq ($(KERNELRELEASE),)

 		# kbuild part of makefile
 		include Kbuild
+		endif

- - else

 		# normal makefile
 		KDIR ?= /lib/modules/`uname -r`/build

@@ -259,7 +259,6 @@ module 8123.ko, which is built from the following files:
genbin:
echo "X" > 8123_bin.o_shipped

- - endif

Here the "Kbuild" file is included from the makefile. This allows an older version of kbuild, which only knows of
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCgAGBQJXAZCwAAoJEMDbis1LPFKZc6wQAKezPVsxhhIoAZCcyiKNRtnR pfiwP4Xv770zA+bHU9OplMNr6uGRUqLfnub5X5dNTawiUWS0AuKp8JiOFdXA2jJf gHsq2PGM9+qsV4JWVQ1Qf9sZo1g9gHDO+c9OJNRR0YYk6pqY1vX8/hksXT7mjZmr g4JcPyqf9W0wtzt5yL9mdBforU1b+5/5K9Im1JYZoilgcEW7ZlbVhes6p3PcYbGn +5/8DIvzRcGheyMqh12NQ2D6DckTqZWl5yNAJK+N7iWfD3VdPB/R6ZVcYC7NGiuf ZQMDi59KKSf5tXXLcQnTSt/kB7yRRuM2TYpV6UvlTFV73VVLFrP17YjmirvYovKJ EQ1s8d1JXgRmh6BWX9sONtd6DuhFk99C2g2vpoTTn2lc0f1FAfICMIAiLd+FonL/ 2lPiQVBbNavKbz137lVUUtJ2rKWHyM9l/Zz1gbpHvtkvIYaKqajoZUGQmTS3RHSC 55bb8Y+13/fkmRCBRsAnEtS3Do/OPRd0+6Keed0FhsKYG/BlWtRUs7NSb2uehKu0 Qge+QT3mZgpPI2pjm0tm+98Afb6DYOpS8m5zY7MV7xof4ZAJRsvPwrIOKDyJfvDx 1LRw/CxAUK8d+RN6hpWdU2q1oHoWTxoQYXDgRu0ikiOMmAunbxNEFuGfCd7Q0ils 4ksi0j2Hv+qx4PsgKCXl
=ffMV
-----END PGP SIGNATURE-----

#1 lore raw

Dne 4.4.2016 v 02:41 C.J. Collier KF7BMP napsal(a):

Quoted 6 lines

Hello Michal and kbuild team,

I think I've spotted an error in the module KBuild / Makefile documentation. I believe that the first condition should be executed only if KERNELRELEASE is unset, and the rest should be executed unconditionally. Let me know if I'm misreading it.

The second part is there for the sake of convenience, so that one can type 'make' in the external module directory and it will try to compile it against the running kernel. It is not something kbuild needs to see.

Also, please follow Documentation/SubmittingPatches and add your signoff to patches you send. And ideally send the patch inline.

Thanks,
Michal