blob: fa21dac4b4ee784d0ff920d5429afac12e63f9b0 [file] [log] [blame]
Index: kconfig/confdata.c
===================================================================
--- kconfig.orig/confdata.c
+++ kconfig/confdata.c
@@ -241,6 +241,13 @@ static const char *conf_get_autoconfig_n
return name ? name : "include/config/auto.conf";
}
+static const char *conf_get_autobase_name(void)
+{
+ char *name = getenv("KCONFIG_SPLITCONFIG");
+
+ return name ? name : "include/config/";
+}
+
static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p)
{
char *p2;
@@ -1024,7 +1031,7 @@ static int conf_touch_deps(void)
struct symbol *sym;
int res, i;
- strcpy(depfile_path, "include/config/");
+ strcpy(depfile_path, conf_get_autobase_name());
depfile_prefix_len = strlen(depfile_path);
name = conf_get_autoconfig_name();
@@ -1102,7 +1109,10 @@ int conf_write_autoconf(int overwrite)
if (!overwrite && is_present(autoconf_name))
return 0;
- conf_write_dep("include/config/auto.conf.cmd");
+ char autoconfcmd_path[PATH_MAX];
+ snprintf(autoconfcmd_path, sizeof(autoconfcmd_path), "%s%s",
+ conf_get_autobase_name(), "auto.conf.cmd");
+ conf_write_dep(autoconfcmd_path);
if (conf_touch_deps())
return 1;