X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=config%2Fconfdata.c;h=7ba857cad240383e2e85fc8f9bb4771171682af1;hb=5507c2910ab536990c3d966a70c761121699f347;hp=b70ef117a01e5284e6dd1296073ac4dd17de97ee;hpb=bee1f6ef5c608d96bee9504492815982ba616ef7;p=carl9170fw.git diff --git a/config/confdata.c b/config/confdata.c index b70ef11..7ba857c 100644 --- a/config/confdata.c +++ b/config/confdata.c @@ -363,7 +363,7 @@ load: sym = sym_find(line + 2 + strlen(CONFIG_)); if (!sym) { sym_add_change_count(1); - goto setsym; + continue; } } else { sym = sym_lookup(line + 2 + strlen(CONFIG_), 0); @@ -397,7 +397,7 @@ load: sym = sym_find(line + strlen(CONFIG_)); if (!sym) { sym_add_change_count(1); - goto setsym; + continue; } } else { sym = sym_lookup(line + strlen(CONFIG_), 0); @@ -416,7 +416,7 @@ load: continue; } -setsym: + if (sym && sym_is_choice_value(sym)) { struct symbol *cs = prop_get_symbol(sym_get_choice_prop(sym)); switch (sym->def[def].tri) { @@ -945,11 +945,14 @@ static int conf_write_dep(const char *name) fprintf(out, "\n$(deps_config): ;\n"); fclose(out); + + if (make_parent_dir(name)) + return 1; rename("..config.tmp", name); return 0; } -static int conf_split_config(void) +static int conf_touch_deps(void) { const char *name; char path[PATH_MAX+1]; @@ -961,6 +964,8 @@ static int conf_split_config(void) conf_read_simple(name, S_DEF_AUTO); sym_calc_value(modules_sym); + if (make_parent_dir("include/generated/foo.h")) + return 1; if (chdir("include/generated")) return 1; @@ -1037,6 +1042,7 @@ static int conf_split_config(void) res = 1; goto out; } + /* Try it again. */ fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, 0644); if (fd == -1) { @@ -1064,7 +1070,7 @@ int conf_write_autoconf(void) conf_write_dep("include/generated/auto.conf.cmd"); - if (conf_split_config()) + if (conf_touch_deps()) return 1; out = fopen(".tmpconfig", "w"); @@ -1121,19 +1127,31 @@ int conf_write_autoconf(void) name = getenv("KCONFIG_AUTOHEADER"); if (!name) name = "include/generated/autoconf.h"; + if (make_parent_dir(name)) + return 1; if (rename(".tmpconfig.h", name)) return 1; + name = getenv("KCONFIG_TRISTATE"); if (!name) name = "include/generated/tristate.conf"; + if (make_parent_dir(name)) + return 1; if (rename(".tmpconfig_tristate", name)) return 1; + name = getenv("KCONFIG_CMAKE"); if (!name) name = "config.cmake"; + if (make_parent_dir(name)) + return 1; if (rename(".tmpconfig.cmake", name)) return 1; + name = conf_get_autoconfig_name(); + if (make_parent_dir(name)) + return 1; + /* * This must be the last step, kbuild has a dependency on auto.conf * and this marks the successful completion of the previous steps.