[PATCH 03/23] kbuild: doc: remove outdated description of the limitation on -I usage

Masahiro Yamada posted 23 patches 2 months, 1 week ago
There is a newer version of this series
[PATCH 03/23] kbuild: doc: remove outdated description of the limitation on -I usage
Posted by Masahiro Yamada 2 months, 1 week ago
Kbuild used to manipulate header search paths, enforcing the odd
limitation of "no space after -I".

Commit cdd750bfb1f7 ("kbuild: remove 'addtree' and 'flags' magic for
header search paths") stopped doing that. This limitation no longer
exists. Instead, you need to accurately specify the header search path.
(In this case, $(src)/include)

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 Documentation/kbuild/modules.rst | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/Documentation/kbuild/modules.rst b/Documentation/kbuild/modules.rst
index 268ebbd2ab74..7eceb9a65e9c 100644
--- a/Documentation/kbuild/modules.rst
+++ b/Documentation/kbuild/modules.rst
@@ -328,13 +328,9 @@ according to the following rule:
 		--> filename: Kbuild
 		obj-m := 8123.o
 
-		ccflags-y := -Iinclude
+		ccflags-y := -I $(src)/include
 		8123-y := 8123_if.o 8123_pci.o 8123_bin.o
 
-	Note that in the assignment there is no space between -I and
-	the path. This is a limitation of kbuild: there must be no
-	space present.
-
 4.3 Several Subdirectories
 --------------------------
 
-- 
2.43.0
Re: [PATCH 03/23] kbuild: doc: remove outdated description of the limitation on -I usage
Posted by Nicolas Schier 2 months, 1 week ago
On Tue, Sep 17, 2024 at 11:16:31PM +0900, Masahiro Yamada wrote:
> Kbuild used to manipulate header search paths, enforcing the odd
> limitation of "no space after -I".
> 
> Commit cdd750bfb1f7 ("kbuild: remove 'addtree' and 'flags' magic for
> header search paths") stopped doing that. This limitation no longer
> exists. Instead, you need to accurately specify the header search path.
> (In this case, $(src)/include)
> 
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---

Reviewed-by: Nicolas Schier <n.schier@avm.de>