Masahiro Yamada b1992c3772 kbuild: use $(src) instead of $(srctree)/$(src) for source directory
Kbuild conventionally uses $(obj)/ for generated files, and $(src)/ for
checked-in source files. It is merely a convention without any functional
difference. In fact, $(obj) and $(src) are exactly the same, as defined
in scripts/Makefile.build:

    src := $(obj)

When the kernel is built in a separate output directory, $(src) does
not accurately reflect the source directory location. While Kbuild
resolves this discrepancy by specifying VPATH=$(srctree) to search for
source files, it does not cover all cases. For example, when adding a
header search path for local headers, -I$(srctree)/$(src) is typically
passed to the compiler.

This introduces inconsistency between upstream and downstream Makefiles
because $(src) is used instead of $(srctree)/$(src) for the latter.

To address this inconsistency, this commit changes the semantics of
$(src) so that it always points to the directory in the source tree.

Going forward, the variables used in Makefiles will have the following
meanings:

  $(obj)     - directory in the object tree
  $(src)     - directory in the source tree  (changed by this commit)
  $(objtree) - the top of the kernel object tree
  $(srctree) - the top of the kernel source tree

Consequently, $(srctree)/$(src) in upstream Makefiles need to be replaced
with $(src).

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
2024-05-10 04:34:52 +09:00
..
2024-01-11 20:11:35 -08:00
2024-04-15 11:01:11 -07:00
2024-04-17 18:25:40 -07:00
2024-03-27 13:17:15 +01:00
2024-03-12 13:17:36 -07:00
2024-03-18 15:39:48 -07:00
2024-03-21 09:47:12 -07:00
\n
2024-03-13 14:30:58 -07:00
2024-03-27 13:17:15 +01:00
2024-03-27 13:17:15 +01:00
2024-03-25 10:53:39 -07:00
2023-12-29 11:58:34 -08:00
2024-03-11 09:38:17 -07:00
2024-03-11 09:38:17 -07:00
2024-03-27 13:17:15 +01:00
2024-03-12 14:27:37 -07:00
2024-03-16 11:44:00 -07:00
2024-04-15 14:09:47 -07:00
2024-03-27 13:17:15 +01:00
2024-03-27 13:17:15 +01:00
2024-03-12 17:44:08 -07:00
2024-03-12 20:03:34 -07:00
2023-10-30 19:28:19 -10:00
2024-03-11 10:07:03 -07:00
2024-03-06 10:52:12 +01:00
2024-03-11 09:38:17 -07:00
2024-03-12 17:44:08 -07:00
2024-03-27 09:57:30 -07:00
2024-03-11 10:07:03 -07:00
2024-03-12 20:03:34 -07:00
2023-12-12 14:24:14 +01:00
2024-03-15 09:00:09 -07:00
2024-03-13 12:53:53 -07:00
2024-02-12 13:13:59 +01:00
2024-03-13 12:53:53 -07:00
2024-03-11 10:21:06 -07:00
2024-03-13 12:53:53 -07:00
2024-03-12 20:03:34 -07:00
2024-03-13 12:53:53 -07:00
2024-02-02 13:11:49 +01:00
2024-03-12 20:03:34 -07:00
2024-01-08 10:57:34 -08:00
2024-03-27 13:17:15 +01:00
2024-02-15 23:43:47 -05:00