summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorMartin Roth <gaumless@gmail.com>2022-11-13 15:20:57 -0700
committerFelix Held <felix-coreboot@felixheld.de>2022-11-17 23:37:48 +0000
commit35e09ec8ae5557bd4e458ef5e3c9de8bfa117aac (patch)
tree71d561613043948f17abfb26775445e0f5bd05f4 /util
parent2e65e9cb69de5a0e8bfae1ab79016af8c5c5316f (diff)
util/kconfig: Move Kconfig deps back into build/config
revert commit 1b9e740a8 (kconfig: fix failing to generate auto.conf) [1] The above change caused all of the enabled kconfig options to be written into the top level build directory. We don't want that, so go back to the old behavior for the coreboot tree. [1] https://web.archive.org/web/20220316120807/https://github.com/torvalds/linux/commit/1b9e740a81f91ae338b29ed70455719804957b80 Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I2904f69a5d85337ad0a6b48590ccd4b4a6e38b70 Reviewed-on: https://review.coreboot.org/c/coreboot/+/69536 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com> Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Diffstat (limited to 'util')
-rw-r--r--util/kconfig/confdata.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/util/kconfig/confdata.c b/util/kconfig/confdata.c
index 95fb960179..3da9e8b38d 100644
--- a/util/kconfig/confdata.c
+++ b/util/kconfig/confdata.c
@@ -230,6 +230,13 @@ static const char *conf_get_autoheader_name(void)
return name ? name : "include/generated/autoconf.h";
}
+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,19 +1031,14 @@ static int conf_write_autoconf_cmd(const char *autoconf_name)
static int conf_touch_deps(void)
{
- const char *name, *tmp;
+ const char *name;
struct symbol *sym;
int res, i;
- 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;
+ strcpy(depfile_path, conf_get_autobase_name());
+ depfile_prefix_len = strlen(depfile_path);
+ name = conf_get_autoconfig_name();
conf_read_simple(name, S_DEF_AUTO);
sym_calc_value(modules_sym);