Commit a77a05dc authored by Masahiro Yamada's avatar Masahiro Yamada

kconfig: split menu.c out of parser.y

Compile menu.c as an independent compilation unit.
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
parent 08718745
...@@ -143,8 +143,8 @@ help: ...@@ -143,8 +143,8 @@ help:
# =========================================================================== # ===========================================================================
# object files used by all kconfig flavours # object files used by all kconfig flavours
common-objs := confdata.o expr.o lexer.lex.o parser.tab.o preprocess.o \ common-objs := confdata.o expr.o lexer.lex.o menu.o parser.tab.o \
symbol.o util.o preprocess.o symbol.o util.o
$(obj)/lexer.lex.o: $(obj)/parser.tab.h $(obj)/lexer.lex.o: $(obj)/parser.tab.h
HOSTCFLAGS_lexer.lex.o := -I $(srctree)/$(src) HOSTCFLAGS_lexer.lex.o := -I $(srctree)/$(src)
......
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef INTERNAL_H
#define INTERNAL_H
struct menu;
extern struct menu *current_menu, *current_entry;
#endif /* INTERNAL_H */
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include <string.h> #include <string.h>
#include "lkc.h" #include "lkc.h"
#include "internal.h"
static const char nohelp_text[] = "There is no help available for this option."; static const char nohelp_text[] = "There is no help available for this option.";
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include <stdbool.h> #include <stdbool.h>
#include "lkc.h" #include "lkc.h"
#include "internal.h"
#define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt) #define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt)
...@@ -28,7 +29,7 @@ static bool zconf_endtoken(const char *tokenname, ...@@ -28,7 +29,7 @@ static bool zconf_endtoken(const char *tokenname,
struct symbol *symbol_hash[SYMBOL_HASHSIZE]; struct symbol *symbol_hash[SYMBOL_HASHSIZE];
static struct menu *current_menu, *current_entry; struct menu *current_menu, *current_entry;
%} %}
...@@ -713,5 +714,3 @@ void zconfdump(FILE *out) ...@@ -713,5 +714,3 @@ void zconfdump(FILE *out)
} }
} }
} }
#include "menu.c"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment