mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf.git
synced 2026-04-24 19:25:45 -04:00
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>
This commit is contained in:
committed by
Masahiro Yamada
parent
e3456056f1
commit
0e0345b77a
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user