Commit a77a05dc authored by Masahiro Yamada's avatar Masahiro Yamada
Browse files

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
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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 −0
Original line number Diff line number Diff line
/* 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 */
+1 −0
Original line number Diff line number Diff line
@@ -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.";

+2 −3
Original line number Diff line number Diff line
@@ -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"