mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-19 23:02:31 +00:00
kconfig: split menu.c out of parser.y
Compile menu.c as an independent compilation unit. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
This commit is contained in:
parent
08718745d8
commit
a77a05dc9c
@ -143,8 +143,8 @@ help:
|
||||
|
||||
# ===========================================================================
|
||||
# object files used by all kconfig flavours
|
||||
common-objs := confdata.o expr.o lexer.lex.o parser.tab.o preprocess.o \
|
||||
symbol.o util.o
|
||||
common-objs := confdata.o expr.o lexer.lex.o menu.o parser.tab.o \
|
||||
preprocess.o symbol.o util.o
|
||||
|
||||
$(obj)/lexer.lex.o: $(obj)/parser.tab.h
|
||||
HOSTCFLAGS_lexer.lex.o := -I $(srctree)/$(src)
|
||||
|
9
scripts/kconfig/internal.h
Normal file
9
scripts/kconfig/internal.h
Normal file
@ -0,0 +1,9 @@
|
||||
/* 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 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "lkc.h"
|
||||
#include "internal.h"
|
||||
|
||||
static const char nohelp_text[] = "There is no help available for this option.";
|
||||
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "lkc.h"
|
||||
#include "internal.h"
|
||||
|
||||
#define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt)
|
||||
|
||||
@ -28,7 +29,7 @@ static bool zconf_endtoken(const char *tokenname,
|
||||
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#include "menu.c"
|
||||
|
Loading…
x
Reference in New Issue
Block a user