diff options
| author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-07-20 03:46:26 -0400 |
|---|---|---|
| committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-07-25 10:25:28 -0400 |
| commit | a2ff4040151ace5be20e4de34220468b9e842e4d (patch) | |
| tree | 16b254a3361baa567921950e51810018a91b0ac5 /scripts/kconfig/util.c | |
| parent | 08b220b37ffe9ae8f2f0fe4618d03f7c25805fb3 (diff) | |
kconfig: rename file_write_dep and move it to confdata.c
file_write_dep() is called only from conf_write_autoconf().
Move it from util.c to confdata.c to make it static.
Also, rename it to conf_write_dep() since it should belong to
the group of conf_write* functions.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts/kconfig/util.c')
| -rw-r--r-- | scripts/kconfig/util.c | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/scripts/kconfig/util.c b/scripts/kconfig/util.c index a365594770d9..d999683bb2a7 100644 --- a/scripts/kconfig/util.c +++ b/scripts/kconfig/util.c | |||
| @@ -29,36 +29,6 @@ struct file *file_lookup(const char *name) | |||
| 29 | return file; | 29 | return file; |
| 30 | } | 30 | } |
| 31 | 31 | ||
| 32 | /* write a dependency file as used by kbuild to track dependencies */ | ||
| 33 | int file_write_dep(const char *name) | ||
| 34 | { | ||
| 35 | struct file *file; | ||
| 36 | FILE *out; | ||
| 37 | |||
| 38 | if (!name) | ||
| 39 | name = ".kconfig.d"; | ||
| 40 | out = fopen("..config.tmp", "w"); | ||
| 41 | if (!out) | ||
| 42 | return 1; | ||
| 43 | fprintf(out, "deps_config := \\\n"); | ||
| 44 | for (file = file_list; file; file = file->next) { | ||
| 45 | if (file->next) | ||
| 46 | fprintf(out, "\t%s \\\n", file->name); | ||
| 47 | else | ||
| 48 | fprintf(out, "\t%s\n", file->name); | ||
| 49 | } | ||
| 50 | fprintf(out, "\n%s: \\\n" | ||
| 51 | "\t$(deps_config)\n\n", conf_get_autoconfig_name()); | ||
| 52 | |||
| 53 | env_write_dep(out, conf_get_autoconfig_name()); | ||
| 54 | |||
| 55 | fprintf(out, "\n$(deps_config): ;\n"); | ||
| 56 | fclose(out); | ||
| 57 | rename("..config.tmp", name); | ||
| 58 | return 0; | ||
| 59 | } | ||
| 60 | |||
| 61 | |||
| 62 | /* Allocate initial growable string */ | 32 | /* Allocate initial growable string */ |
| 63 | struct gstr str_new(void) | 33 | struct gstr str_new(void) |
| 64 | { | 34 | { |
