diff options
author | Roman Zippel <zippel@linux-m68k.org> | 2005-11-09 00:34:51 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-09 10:55:53 -0500 |
commit | 7a88488bbc231e48a4a88ee2569bc0cc5d706f0a (patch) | |
tree | 2fd6b51b5cf76dd37a2a369a29c50b5121c12a92 /scripts/kconfig/Makefile | |
parent | 491d711035dc08071ed58cf470f15efadb67cb1c (diff) |
[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/Makefile | 11 |
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 | |||
114 | endif | 114 | endif |
115 | 115 | ||
116 | clean-files := lkc_defs.h qconf.moc .tmp_qtcheck \ | 116 | clean-files := lkc_defs.h qconf.moc .tmp_qtcheck \ |
117 | .tmp_gtkcheck zconf.tab.c lex.zconf.c | 117 | .tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c |
118 | 118 | ||
119 | # Needed for systems without gettext | 119 | # Needed for systems without gettext |
120 | KBUILD_HAVE_NLS := $(shell \ | 120 | KBUILD_HAVE_NLS := $(shell \ |
@@ -201,7 +201,7 @@ $(obj)/.tmp_gtkcheck: | |||
201 | fi | 201 | fi |
202 | endif | 202 | endif |
203 | 203 | ||
204 | $(obj)/zconf.tab.o: $(obj)/lex.zconf.c | 204 | $(obj)/zconf.tab.o: $(obj)/lex.zconf.c $(obj)/zconf.hash.c |
205 | 205 | ||
206 | $(obj)/kconfig_load.o: $(obj)/lkc_defs.h | 206 | $(obj)/kconfig_load.o: $(obj)/lkc_defs.h |
207 | 207 | ||
@@ -217,7 +217,7 @@ $(obj)/lkc_defs.h: $(src)/lkc_proto.h | |||
217 | 217 | ||
218 | 218 | ||
219 | ### | 219 | ### |
220 | # The following requires flex/bison | 220 | # The following requires flex/bison/gperf |
221 | # By default we use the _shipped versions, uncomment the following line if | 221 | # By default we use the _shipped versions, uncomment the following line if |
222 | # you are modifying the flex/bison src. | 222 | # you are modifying the flex/bison src. |
223 | # LKC_GENPARSER := 1 | 223 | # LKC_GENPARSER := 1 |
@@ -226,6 +226,7 @@ ifdef LKC_GENPARSER | |||
226 | 226 | ||
227 | $(obj)/zconf.tab.c: $(src)/zconf.y | 227 | $(obj)/zconf.tab.c: $(src)/zconf.y |
228 | $(obj)/lex.zconf.c: $(src)/zconf.l | 228 | $(obj)/lex.zconf.c: $(src)/zconf.l |
229 | $(obj)/zconf.hash.c: $(src)/zconf.gperf | ||
229 | 230 | ||
230 | %.tab.c: %.y | 231 | %.tab.c: %.y |
231 | bison -l -b $* -p $(notdir $*) $< | 232 | bison -l -b $* -p $(notdir $*) $< |
@@ -235,4 +236,8 @@ lex.%.c: %.l | |||
235 | flex -L -P$(notdir $*) -o$@ $< | 236 | flex -L -P$(notdir $*) -o$@ $< |
236 | cp $@ $@_shipped | 237 | cp $@ $@_shipped |
237 | 238 | ||
239 | %.hash.c: %.gperf | ||
240 | gperf < $< > $@ | ||
241 | cp $@ $@_shipped | ||
242 | |||
238 | endif | 243 | endif |