+.PHONY: all clean
.SUFFIXES:
+all: parser
+
+KCONFIG_PREFIX = ../shared/kconfig
+include $(KCONFIG_PREFIX)/files.mk
+
SRC = parser.c \
cnfexpr.c \
symlist.c \
output.c
-SRC += kconfig/zconf.tab.c
CFLAGS = -O0 -w -ggdb
-parser: $(SRC) kconfig/zconf.lex.c kconfig/zconf.hash.c
- gcc $(CFLAGS) -o $@ $(SRC)
-
-%.hash.c: %.gperf
- gperf -t --output-file $@ -a -C -E -g -k '1,3,$$' -p -t $<
-
-%.lex.c: %.l
- flex -o $@ -L -P zconf $<
-
-%.tab.c: %.y kconfig/zconf.lex.c kconfig/zconf.hash.c
- bison -o $@ $< -p zconf -t -l
+parser: $(SRC) $(KCONFIG_SRC)
+ gcc $(CFLAGS) -o $@ $^ -I$(KCONFIG_PREFIX)
-clean:
- $(RM) kconfig/zconf.tab.c kconfig/zconf.lex.c kconfig/zconf.hash.c
+clean::
$(RM) parser
#include <stdbool.h>
#include <stdio.h>
#include "symlist.h"
-#include "kconfig/lkc.h"
+#include "lkc.h"
enum cnfexpr_type {
CT_EXPR, CT_FALSE, CT_TRUE
#include <locale.h>
#include <stdbool.h>
#include <argp.h>
-#include "kconfig/lkc.h"
+#include "lkc.h"
#include "symlist.h"
#include "output.h"
#include "macros.h"
textdomain(PACKAGE);
conf_parse(argv[1]);
- sym_clear_all_valid();
+ //sym_clear_all_valid();
gsymlist = symlist_create();
va_start(ap, fmt);
if (conf_message_callback)
conf_message_callback(fmt, ap);
+ va_end(ap);
}
const char *conf_get_configname(void)
--- /dev/null
+.PHONY: clean
+
+ifndef KCONFIG_PREFIX
+ $(error "Please specify variable KCONFIG_SRC in your makefile before importing kconfig files.mk")
+endif
+
+KCONFIG_SRC = $(KCONFIG_PREFIX)/zconf.tab.c
+
+%.hash.c: %.gperf
+ gperf -t --output-file $@ -a -C -E -g -k '1,3,$$' -p -t $<
+
+%.lex.c: %.l
+ flex -o $@ -L -P zconf $<
+
+%.tab.c: %.y %.lex.c %.hash.c
+ bison -o $@ $< -p zconf -t -l
+
+
+clean::
+ $(RM) $(KCONFIG_PREFIX)/zconf.tab.c
+ $(RM) $(KCONFIG_PREFIX)/zconf.lex.c
+ $(RM) $(KCONFIG_PREFIX)/zconf.hash.c
* list_entry - get the struct for this entry
* @ptr: the &struct list_head pointer.
* @type: the type of the struct this is embedded in.
- * @member: the name of the list_struct within the struct.
+ * @member: the name of the list_head within the struct.
*/
#define list_entry(ptr, type, member) \
container_of(ptr, type, member)
* list_for_each_entry - iterate over list of given type
* @pos: the type * to use as a loop cursor.
* @head: the head for your list.
- * @member: the name of the list_struct within the struct.
+ * @member: the name of the list_head within the struct.
*/
#define list_for_each_entry(pos, head, member) \
for (pos = list_entry((head)->next, typeof(*pos), member); \
* @pos: the type * to use as a loop cursor.
* @n: another type * to use as temporary storage
* @head: the head for your list.
- * @member: the name of the list_struct within the struct.
+ * @member: the name of the list_head within the struct.
*/
#define list_for_each_entry_safe(pos, n, head, member) \
for (pos = list_entry((head)->next, typeof(*pos), member), \
{
int i, j;
struct menu *submenu[8], *menu, *location = NULL;
- struct jump_key *jump;
+ struct jump_key *jump = NULL;
str_printf(r, _("Prompt: %s\n"), _(prop->text));
menu = prop->menu->parent;
str_printf(r, _(" Location:\n"));
for (j = 4; --i >= 0; j += 2) {
menu = submenu[i];
- if (head && location && menu == location)
+ if (jump && menu == location)
jump->offset = strlen(r->s);
str_printf(r, "%*c-> %s", j, ' ',
_(menu_get_prompt(menu)));