UPSTREAM: util/blobtool & sconfig: Update GENPARSER Kconfig question

blobtool uses the same sort of update mechanism for the .l & .y files,
so update the SCONFIG_GENPARSER Kconfig question to encompass both
utilities.

- Change the name to UTIL_GENPARSER, and update the help text.
- Update sconfig's makefile.
- Add the check to blobtool's makefile.
- Update the makefiles to check for y, not defined.

BUG=none
BRANCH=none
TEST=none

Change-Id: I64dbc906e3e027978cdcad1c1bd39eee4e7788b0
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: f411b701c5
Original-Change-Id: I6215791c9a019bce37d4a150b65d1fdbb9073156
Original-Signed-off-by: Martin Roth <martinroth@google.com>
Original-Reviewed-on: https://review.coreboot.org/19229
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/480283
This commit is contained in:
Martin Roth 2017-04-09 19:12:42 -06:00 committed by chrome-bot
parent fff26e9c01
commit d8d6955aff
3 changed files with 5 additions and 5 deletions

View file

@ -100,12 +100,12 @@ config FMD_GENPARSER
Otherwise, say N to use the provided pregenerated scanner/parser.
config SCONFIG_GENPARSER
bool "Generate SCONFIG parser using flex and bison"
config UTIL_GENPARSER
bool "Generate SCONFIG & BLOBTOOL parser using flex and bison"
default n
help
Enable this option if you are working on the sconfig device tree
parser and made changes to sconfig.l or sconfig.y.
parser or blobtool and made changes to the .l or .y files.
Otherwise, say N to use the provided pregenerated scanner/parser.

View file

@ -16,7 +16,7 @@ $(objutil)/blobtool/%.o: $(objutil)/blobtool/%.c
printf " HOSTCC $(subst $(obj)/,,$(@))\n"
$(HOSTCC) $(BLOBTOOL_FLAGS) $(HOSTCFLAGS) -c -o $@ $<
ifeq (0,1)
ifeq ($(CONFIG_UTIL_GENPARSER),y)
$(top)/util/blobtool/blobtool.lex.c_shipped: $(top)/util/blobtool/blobtool.l
printf " FLEX $(subst $(top)/,,$(@))\n"
flex -L -o $@ $<

View file

@ -19,7 +19,7 @@ $(objutil)/sconfig/%.o: $(objutil)/sconfig/%.c
printf " HOSTCC $(subst $(obj)/,,$(@))\n"
$(HOSTCC) $(SCONFIGFLAGS) $(HOSTCFLAGS) -c -o $@ $<
ifdef CONFIG_SCONFIG_GENPARSER
ifeq ($(CONFIG_UTIL_GENPARSER),y)
$(top)/util/sconfig/lex.yy.c_shipped: $(top)/util/sconfig/sconfig.l
printf " FLEX $(subst $(top)/,,$(@))\n"
flex -L -o $@ $<