linux/scripts/kconfig
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
..
lxdialog kconfig: Fix typo HEIGTH to HEIGHT 2024-03-31 21:09:50 +09:00
tests kconfig: remove 'optional' property support 2024-05-02 19:48:26 +09:00
.gitignore kconfig: Update all declared targets 2023-01-13 16:29:52 +09:00
array_size.h kconfig: move ARRAY_SIZE to a header 2024-02-19 18:20:41 +09:00
conf.c kconfig: remove unneeded if-conditional in conf_choice() 2024-05-02 19:48:26 +09:00
confdata.c kconfig: remove SYMBOL_NO_WRITE flag 2024-05-02 20:14:16 +09:00
expr.c kconfig: remove unreachable printf() 2023-12-28 16:22:47 +09:00
expr.h kconfig: remove SYMBOL_NO_WRITE flag 2024-05-02 20:14:16 +09:00
gconf-cfg.sh kconfig: refactor Makefile to reduce process forks 2022-12-13 22:29:10 +09:00
gconf.c kconfig: remove SYMBOL_NO_WRITE flag 2024-05-02 20:14:16 +09:00
gconf.glade scripts/kconfig/gconf.glade Update broken web addresses. 2010-09-17 16:54:42 +02:00
hashtable.h kconfig: add macros useful for hashtable 2024-02-19 18:20:41 +09:00
images.c kconfig: constify XPM data 2020-08-14 13:30:03 +09:00
images.h kconfig: constify XPM data 2020-08-14 13:30:03 +09:00
internal.h kconfig: use generic macros to implement symbol hashtable 2024-02-20 20:47:45 +09:00
lexer.l kconfig: remove 'optional' property support 2024-05-02 19:48:26 +09:00
list_types.h kconfig: import more list macros and inline functions 2024-02-19 18:20:41 +09:00
list.h kconfig: import more list macros and inline functions 2024-02-19 18:20:41 +09:00
lkc_proto.h kconfig: use generic macros to implement symbol hashtable 2024-02-20 20:47:45 +09:00
lkc.h kconfig: remove 'optional' property support 2024-05-02 19:48:26 +09:00
Makefile kbuild: use $(src) instead of $(srctree)/$(src) for source directory 2024-05-10 04:34:52 +09:00
mconf-cfg.sh kconfig: refactor Makefile to reduce process forks 2022-12-13 22:29:10 +09:00
mconf.c kconfig: Fix typo HEIGTH to HEIGHT 2024-03-31 21:09:50 +09:00
menu.c kconfig: remove 'optional' property support 2024-05-02 19:48:26 +09:00
merge_config.sh scripts: merge_config: Fix typo in variable name. 2023-03-23 15:27:40 +09:00
mnconf-common.c kconfig: factor out common code shared by mconf and nconf 2023-12-10 15:34:37 +09:00
mnconf-common.h kconfig: factor out common code shared by mconf and nconf 2023-12-10 15:34:37 +09:00
nconf-cfg.sh kconfig: refactor Makefile to reduce process forks 2022-12-13 22:29:10 +09:00
nconf.c kconfig: split list_head into a separate header 2024-02-19 18:20:41 +09:00
nconf.gui.c kconfig: nconf: Add search jump feature 2023-08-13 21:29:41 +09:00
nconf.h kconfig: nconf: Add search jump feature 2023-08-13 21:29:41 +09:00
parser.y kconfig: remove SYMBOL_NO_WRITE flag 2024-05-02 20:14:16 +09:00
preprocess.c kconfig: move ARRAY_SIZE to a header 2024-02-19 18:20:41 +09:00
preprocess.h kconfig: split preprocessor prototypes into preprocess.h 2024-02-19 18:20:40 +09:00
qconf-cfg.sh kconfig: port qconf to work with Qt6 in addition to Qt5 2023-08-16 12:06:29 +09:00
qconf.cc kconfig: associate struct menu with file name directly 2024-02-19 18:20:40 +09:00
qconf.h kconfig: qconf: remove Y, M, N columns 2020-09-25 00:37:13 +09:00
streamline_config.pl streamline_config.pl: handle also ${CONFIG_FOO} 2023-06-08 11:11:32 +09:00
symbol.c kconfig: remove SYMBOL_NO_WRITE flag 2024-05-02 20:14:16 +09:00
util.c kconfig: convert linked list of files to hash table 2024-02-20 20:44:48 +09:00