summaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/Makefile
diff options
context:
space:
mode:
authorRoman Zippel <zippel@linux-m68k.org>2005-11-08 21:34:51 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-09 07:55:53 -0800
commit7a88488bbc231e48a4a88ee2569bc0cc5d706f0a (patch)
tree2fd6b51b5cf76dd37a2a369a29c50b5121c12a92 /scripts/kconfig/Makefile
parent491d711035dc08071ed58cf470f15efadb67cb1c (diff)
downloadlinux-7a88488bbc231e48a4a88ee2569bc0cc5d706f0a.tar.bz2
[PATCH] kconfig: use gperf for kconfig keywords
Use gperf to generate a hash for the kconfig keywords. This greatly reduces the size of the generated scanner and makes it easier to extend kconfig. Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'scripts/kconfig/Makefile')
-rw-r--r--scripts/kconfig/Makefile11
1 files changed, 8 insertions, 3 deletions
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 65e3e7371251..9d67782b812f 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -114,7 +114,7 @@ gconf-objs := gconf.o kconfig_load.o zconf.tab.o
endif
clean-files := lkc_defs.h qconf.moc .tmp_qtcheck \
- .tmp_gtkcheck zconf.tab.c lex.zconf.c
+ .tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c
# Needed for systems without gettext
KBUILD_HAVE_NLS := $(shell \
@@ -201,7 +201,7 @@ $(obj)/.tmp_gtkcheck:
fi
endif
-$(obj)/zconf.tab.o: $(obj)/lex.zconf.c
+$(obj)/zconf.tab.o: $(obj)/lex.zconf.c $(obj)/zconf.hash.c
$(obj)/kconfig_load.o: $(obj)/lkc_defs.h
@@ -217,7 +217,7 @@ $(obj)/lkc_defs.h: $(src)/lkc_proto.h
###
-# The following requires flex/bison
+# The following requires flex/bison/gperf
# By default we use the _shipped versions, uncomment the following line if
# you are modifying the flex/bison src.
# LKC_GENPARSER := 1
@@ -226,6 +226,7 @@ ifdef LKC_GENPARSER
$(obj)/zconf.tab.c: $(src)/zconf.y
$(obj)/lex.zconf.c: $(src)/zconf.l
+$(obj)/zconf.hash.c: $(src)/zconf.gperf
%.tab.c: %.y
bison -l -b $* -p $(notdir $*) $<
@@ -235,4 +236,8 @@ lex.%.c: %.l
flex -L -P$(notdir $*) -o$@ $<
cp $@ $@_shipped
+%.hash.c: %.gperf
+ gperf < $< > $@
+ cp $@ $@_shipped
+
endif