summaryrefslogtreecommitdiff
path: root/scripts/kconfig/confdata.c
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2024-02-02 18:58:05 +0300
committerMasahiro Yamada <masahiroy@kernel.org>2024-02-19 12:20:40 +0300
commit56e634b06fd554b819ac9c45fc77a41500861ced (patch)
treeda7da38591efbae297cd7eb9baa6d279abbf3256 /scripts/kconfig/confdata.c
parent526396b723a38dbeed35cb9e80814084b9f56329 (diff)
downloadlinux-56e634b06fd554b819ac9c45fc77a41500861ced.tar.xz
kconfig: call env_write_dep() right after yyparse()
This allows preprocess.c to free up all of its resources when the parse stage is finished. It also ensures conf_write_autoconf_cmd() produces consistent results even if called multiple times for any reason. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts/kconfig/confdata.c')
-rw-r--r--scripts/kconfig/confdata.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index f6a96fdddb7e..dafc572e7b7e 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -994,13 +994,9 @@ static int conf_write_autoconf_cmd(const char *autoconf_name)
return -1;
}
- fputs(str_get(&autoconf_cmd), out);
-
- fprintf(out, "\n%s: $(deps_config)\n\n", autoconf_name);
+ fprintf(out, "autoconfig := %s\n", autoconf_name);
- env_write_dep(out, autoconf_name);
-
- fprintf(out, "\n$(deps_config): ;\n");
+ fputs(str_get(&autoconf_cmd), out);
fflush(out);
ret = ferror(out); /* error check for all fprintf() calls */