diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2021-04-15 20:36:07 +0300 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2021-04-24 23:26:10 +0300 |
commit | 0e0345b77ac4605d5447b252d220e4a2ee118da7 (patch) | |
tree | fec9420efe18ffdb4fee04f0ef36ec2a25a5a465 /scripts/kconfig | |
parent | e3456056f1d935491ee9148dbae98c6b95f58910 (diff) | |
download | linux-0e0345b77ac4605d5447b252d220e4a2ee118da7.tar.xz |
kbuild: redo fake deps at include/config/*.h
Make include/config/foo/bar.h fake deps files generation simpler.
* delete .h suffix
those aren't header files, shorten filenames,
* delete tolower()
Linux filesystems can deal with both upper and lowercase
filenames very well,
* put everything in 1 directory
Presumably 'mkdir -p' split is from dark times when filesystems
handled huge directories badly, disks were round adding to
seek times.
x86_64 allmodconfig lists 12364 files in include/config.
../obj/include/config/
├── 104_QUAD_8
├── 60XX_WDT
├── 64BIT
...
├── ZSWAP_DEFAULT_ON
├── ZSWAP_ZPOOL_DEFAULT
└── ZSWAP_ZPOOL_DEFAULT_ZBUD
0 directories, 12364 files
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts/kconfig')
-rw-r--r-- | scripts/kconfig/confdata.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index 2568dbe16ed6..c7b7e1c62a9c 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c @@ -130,19 +130,14 @@ static size_t depfile_prefix_len; static int conf_touch_dep(const char *name) { int fd, ret; - const char *s; - char *d, c; + char *d; - /* check overflow: prefix + name + ".h" + '\0' must fit in buffer. */ - if (depfile_prefix_len + strlen(name) + 3 > sizeof(depfile_path)) + /* check overflow: prefix + name + '\0' must fit in buffer. */ + if (depfile_prefix_len + strlen(name) + 1 > sizeof(depfile_path)) return -1; d = depfile_path + depfile_prefix_len; - s = name; - - while ((c = *s++)) - *d++ = (c == '_') ? '/' : tolower(c); - strcpy(d, ".h"); + strcpy(d, name); /* Assume directory path already exists. */ fd = open(depfile_path, O_WRONLY | O_CREAT | O_TRUNC, 0644); @@ -465,7 +460,7 @@ load: * Reading from include/config/auto.conf * If CONFIG_FOO previously existed in * auto.conf but it is missing now, - * include/config/foo.h must be touched. + * include/config/FOO must be touched. */ conf_touch_dep(line + strlen(CONFIG_)); else |