From: Masahiro Yamada Date: Fri, 21 Dec 2018 08:33:04 +0000 (+0900) Subject: kconfig: split some C files out of zconf.y X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=4d01b0b43ea5208f5722b35246d43c0bbd1b3c7e;p=carl9170fw.git kconfig: split some C files out of zconf.y I want to compile each C file independently instead of including all of them from zconf.y. Split out confdata.c, expr.c, symbol.c, and preprocess.c . These are low-hanging fruits. Signed-off-by: Masahiro Yamada Signed-off-by: Christian Lamparter --- diff --git a/config/confdata.c b/config/confdata.c index 6df907a..a143cb3 100644 --- a/config/confdata.c +++ b/config/confdata.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/config/expr.c b/config/expr.c index 3ff8c92..77ffff3 100644 --- a/config/expr.c +++ b/config/expr.c @@ -3,6 +3,8 @@ * Copyright (C) 2002 Roman Zippel */ +#include +#include #include #include #include diff --git a/config/lkc.h b/config/lkc.h index 4ff33cd..160a931 100644 --- a/config/lkc.h +++ b/config/lkc.h @@ -108,6 +108,7 @@ const char *str_get(struct gstr *gs); /* symbol.c */ void sym_clear_all_valid(void); struct symbol *sym_choice_default(struct symbol *sym); +struct property *sym_get_range_prop(struct symbol *sym); const char *sym_get_string_default(struct symbol *sym); struct symbol *sym_check_deps(struct symbol *sym); struct property *prop_alloc(enum prop_type type, struct symbol *sym); diff --git a/config/preprocess.c b/config/preprocess.c index b028a48..592dfbf 100644 --- a/config/preprocess.c +++ b/config/preprocess.c @@ -2,6 +2,7 @@ // // Copyright (C) 2018 Masahiro Yamada +#include #include #include #include @@ -9,6 +10,7 @@ #include #include "list.h" +#include "lkc.h" #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) diff --git a/config/symbol.c b/config/symbol.c index d145783..1f9266d 100644 --- a/config/symbol.c +++ b/config/symbol.c @@ -86,7 +86,7 @@ static struct property *sym_get_default_prop(struct symbol *sym) return NULL; } -static struct property *sym_get_range_prop(struct symbol *sym) +struct property *sym_get_range_prop(struct symbol *sym) { struct property *prop; diff --git a/config/zconf.y b/config/zconf.y index 4394ef9..e8bcb96 100644 --- a/config/zconf.y +++ b/config/zconf.y @@ -732,8 +732,4 @@ void zconfdump(FILE *out) #include "zconf.lex.c" #include "util.c" -#include "confdata.c" -#include "expr.c" -#include "symbol.c" #include "menu.c" -#include "preprocess.c"