mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-20 22:25:23 +00:00
kconfig: fix failing to generate auto.conf
When the KCONFIG_AUTOCONFIG is specified (e.g. export \ KCONFIG_AUTOCONFIG=output/config/auto.conf), the directory of include/config/ will not be created, so kconfig can't create deps files in it and auto.conf can't be generated. Signed-off-by: Jing Leng <jleng@ambarella.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
This commit is contained in:
parent
d23a0c3718
commit
1b9e740a81
1 changed files with 9 additions and 4 deletions
|
@ -994,14 +994,19 @@ static int conf_write_autoconf_cmd(const char *autoconf_name)
|
||||||
|
|
||||||
static int conf_touch_deps(void)
|
static int conf_touch_deps(void)
|
||||||
{
|
{
|
||||||
const char *name;
|
const char *name, *tmp;
|
||||||
struct symbol *sym;
|
struct symbol *sym;
|
||||||
int res, i;
|
int res, i;
|
||||||
|
|
||||||
strcpy(depfile_path, "include/config/");
|
|
||||||
depfile_prefix_len = strlen(depfile_path);
|
|
||||||
|
|
||||||
name = conf_get_autoconfig_name();
|
name = conf_get_autoconfig_name();
|
||||||
|
tmp = strrchr(name, '/');
|
||||||
|
depfile_prefix_len = tmp ? tmp - name + 1 : 0;
|
||||||
|
if (depfile_prefix_len + 1 > sizeof(depfile_path))
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
strncpy(depfile_path, name, depfile_prefix_len);
|
||||||
|
depfile_path[depfile_prefix_len] = 0;
|
||||||
|
|
||||||
conf_read_simple(name, S_DEF_AUTO);
|
conf_read_simple(name, S_DEF_AUTO);
|
||||||
sym_calc_value(modules_sym);
|
sym_calc_value(modules_sym);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue