aboutsummaryrefslogtreecommitdiff
path: root/programs/src
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2015-02-03 20:59:54 +0100
committerKarel Kočí <cynerd@email.cz>2015-02-03 20:59:54 +0100
commita41cc012991ca1879e8f60511327ed8d01db14c3 (patch)
tree7647b6379d0b382742b312019e951229721a2f22 /programs/src
parentef85245f159402fd948ff045b56ad9095d22b39e (diff)
downloadlinux-conf-perf-a41cc012991ca1879e8f60511327ed8d01db14c3.tar.gz
linux-conf-perf-a41cc012991ca1879e8f60511327ed8d01db14c3.tar.bz2
linux-conf-perf-a41cc012991ca1879e8f60511327ed8d01db14c3.zip
Change symbol_map file divider from space to colon
Also some other tweaks in kconfigp_parser. Mostly irrelevant.
Diffstat (limited to 'programs/src')
-rw-r--r--programs/src/kconfig_parser/Makefile15
-rw-r--r--programs/src/kconfig_parser/boolexp.h1
-rw-r--r--programs/src/kconfig_parser/kconfig_parser.c1
-rw-r--r--programs/src/kconfig_parser/output.c2
4 files changed, 11 insertions, 8 deletions
diff --git a/programs/src/kconfig_parser/Makefile b/programs/src/kconfig_parser/Makefile
index cc86499..d8babae 100644
--- a/programs/src/kconfig_parser/Makefile
+++ b/programs/src/kconfig_parser/Makefile
@@ -1,20 +1,17 @@
.SUFFIXES:
-all: kconfig_parser
+all: ../../kconfig_parser
-clean:
- rm -f kconfig/zconf.tab.c kconfig/zconf.lex.c kconfig/zconf.hash.c
- rm -f ../../kconfig_parser
-
INPUT_FILES = kconfig_parser.c
INPUT_FILES += kconfig/zconf.tab.c \
boolexp.c \
symlist.c \
output.c
+CFLAGS = -O0 -w -ggdb
-kconfig_parser: $(INPUT_FILES) kconfig/zconf.lex.c kconfig/zconf.hash.c
- gcc -O0 -w -ggdb -o ../../$@ $(INPUT_FILES)
+../../kconfig_parser: $(INPUT_FILES) kconfig/zconf.lex.c kconfig/zconf.hash.c
+ gcc $(CFLAGS) -o $@ $(INPUT_FILES)
%.hash.c: %.gperf
gperf -t --output-file $@ -a -C -E -g -k '1,3,$$' -p -t $<
@@ -24,3 +21,7 @@ kconfig_parser: $(INPUT_FILES) kconfig/zconf.lex.c kconfig/zconf.hash.c
%.tab.c: %.y kconfig/zconf.lex.c kconfig/zconf.hash.c
bison -o $@ $< -p zconf -t -l
+
+clean:
+ $(RM) kconfig/zconf.tab.c kconfig/zconf.lex.c kconfig/zconf.hash.c
+ $(RM) ../../kconfig_parser
diff --git a/programs/src/kconfig_parser/boolexp.h b/programs/src/kconfig_parser/boolexp.h
index f03fc33..2a73374 100644
--- a/programs/src/kconfig_parser/boolexp.h
+++ b/programs/src/kconfig_parser/boolexp.h
@@ -1,6 +1,7 @@
#ifndef _BOOLEXP_H_
#define _BOOLEXP_H_
+#include <stdlib.h>
#include <stdbool.h>
#include "symlist.h"
#include "kconfig/lkc.h"
diff --git a/programs/src/kconfig_parser/kconfig_parser.c b/programs/src/kconfig_parser/kconfig_parser.c
index b757a8a..d936f48 100644
--- a/programs/src/kconfig_parser/kconfig_parser.c
+++ b/programs/src/kconfig_parser/kconfig_parser.c
@@ -52,6 +52,7 @@ int main(int argc, char **argv) {
asprintf(&symbol_map_file, "%s/%s", argv[2], DEFAULT_SYMBOL_MAP_FILE);
fprint_rules(gsymlist, rules_file);
fprint_symbol_map(gsymlist, symbol_map_file);
+ return 0;
}
void kconfig_menu_walker(void (*solve) (struct symbol * sym)) {
diff --git a/programs/src/kconfig_parser/output.c b/programs/src/kconfig_parser/output.c
index 5dd848b..5f8bbd6 100644
--- a/programs/src/kconfig_parser/output.c
+++ b/programs/src/kconfig_parser/output.c
@@ -76,7 +76,7 @@ void fprint_symbol_map(struct symlist *sl, char* output) {
}
int i;
for (i = 0; i < sl->pos; i++) {
- fprintf(f, "%d %s\n", sl->array[i].id, sl->array[i].name);
+ fprintf(f, "%d:%s\n", sl->array[i].id, sl->array[i].name);
}
fclose(f);
}