aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorArnaud Lacombe <lacombar@gmail.com>2011-05-23 02:08:52 -0400
committerArnaud Lacombe <lacombar@gmail.com>2011-06-09 14:04:44 -0400
commit378dbb2cf5cb51e41e51b115af8b3ecef086e6ff (patch)
treea7486f1f77124159ae88270dd6c80042cd5c1762 /scripts
parent674eed8a6ac9d10b4ee08f497dbe20d75bfa863d (diff)
kconfig: migrate parser to implicit rules
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kconfig/.gitignore2
-rw-r--r--scripts/kconfig/Makefile28
-rw-r--r--scripts/kconfig/zconf.y2
3 files changed, 5 insertions, 27 deletions
diff --git a/scripts/kconfig/.gitignore b/scripts/kconfig/.gitignore
index 624f6502e03e..ee120d441565 100644
--- a/scripts/kconfig/.gitignore
+++ b/scripts/kconfig/.gitignore
@@ -2,7 +2,7 @@
2# Generated files 2# Generated files
3# 3#
4config* 4config*
5lex.*.c 5*.lex.c
6*.tab.c 6*.tab.c
7*.tab.h 7*.tab.h
8zconf.hash.c 8zconf.hash.c
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index bde4529a4d4e..ee3f4fa0e04f 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -223,6 +223,9 @@ HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC)
223HOSTCFLAGS_lex.zconf.o := -I$(src) 223HOSTCFLAGS_lex.zconf.o := -I$(src)
224HOSTCFLAGS_zconf.tab.o := -I$(src) 224HOSTCFLAGS_zconf.tab.o := -I$(src)
225 225
226LEX_PREFIX_zconf := zconf
227YACC_PREFIX_zconf := zconf
228
226HOSTLOADLIBES_qconf = $(KC_QT_LIBS) -ldl 229HOSTLOADLIBES_qconf = $(KC_QT_LIBS) -ldl
227HOSTCXXFLAGS_qconf.o = $(KC_QT_CFLAGS) -D LKC_DIRECT_LINK 230HOSTCXXFLAGS_qconf.o = $(KC_QT_CFLAGS) -D LKC_DIRECT_LINK
228 231
@@ -335,28 +338,3 @@ $(obj)/gconf.glade.h: $(obj)/gconf.glade
335 $(Q)intltool-extract --type=gettext/glade --srcdir=$(srctree) \ 338 $(Q)intltool-extract --type=gettext/glade --srcdir=$(srctree) \
336 $(obj)/gconf.glade 339 $(obj)/gconf.glade
337 340
338###
339# The following requires flex/bison/gperf
340# By default we use the _shipped versions, uncomment the following line if
341# you are modifying the flex/bison src.
342# LKC_GENPARSER := 1
343
344ifdef LKC_GENPARSER
345
346$(obj)/zconf.tab.c: $(src)/zconf.y
347$(obj)/lex.zconf.c: $(src)/zconf.l
348$(obj)/zconf.hash.c: $(src)/zconf.gperf
349
350%.tab.c: %.y
351 bison -l -b $* -p $(notdir $*) $<
352 cp $@ $@_shipped
353
354lex.%.c: %.l
355 flex -L -P$(notdir $*) -o$@ $<
356 cp $@ $@_shipped
357
358%.hash.c: %.gperf
359 gperf -C < $< > $@
360 cp $@ $@_shipped
361
362endif
diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y
index 377d04d832d1..c38cc5aa8ed1 100644
--- a/scripts/kconfig/zconf.y
+++ b/scripts/kconfig/zconf.y
@@ -733,7 +733,7 @@ void zconfdump(FILE *out)
733 } 733 }
734} 734}
735 735
736#include "lex.zconf.c" 736#include "zconf.lex.c"
737#include "util.c" 737#include "util.c"
738#include "confdata.c" 738#include "confdata.c"
739#include "expr.c" 739#include "expr.c"