diff options
author | Patrick Georgi <patrick.georgi@coresystems.de> | 2010-04-08 11:37:43 +0000 |
---|---|---|
committer | Patrick Georgi <patrick.georgi@coresystems.de> | 2010-04-08 11:37:43 +0000 |
commit | 7e8c9aa271f13f67e4fc4968d2bf6fb8e5b229d7 (patch) | |
tree | b962ba3cc6ce30f32c1d0c37c3210abb6e37b10e /util/sconfig/Makefile.inc | |
parent | 56a684a2ee52b765fc69ec8c922c3da9d8ab7430 (diff) |
Replace sconfig with a C implementation.
(smaller, faster, standard parser generator, no more python)
Provide precompiled parser, so bison and flex are optional dependencies.
Adapt Makefile and abuild (which uses some sconfig file as a
magic path) to match.
Drop python as dependency from README, and add bison and flex
as optional dependencies
Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5373 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/sconfig/Makefile.inc')
-rw-r--r-- | util/sconfig/Makefile.inc | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/util/sconfig/Makefile.inc b/util/sconfig/Makefile.inc new file mode 100644 index 0000000000..54207ebd16 --- /dev/null +++ b/util/sconfig/Makefile.inc @@ -0,0 +1,30 @@ +sconfigobj := +sconfigobj += lex.yy.o +sconfigobj += sconfig.tab.o + +$(obj)/util/sconfig: + mkdir -p $@ + +$(obj)/util/sconfig/%.o: $(obj)/util/sconfig/%.c + printf " HOSTCC $(subst $(obj)/,,$(@))\n" + $(HOSTCC) $(SCONFIGFLAGS) $(HOSTCFLAGS) -c -o $@ $< + +ifdef SCONFIG_GENPARSER +$(top)/util/sconfig/lex.yy.c_shipped: $(top)/util/sconfig/sconfig.l + flex -o $@ $< + +# the .c rule also creates .h +$(top)/util/sconfig/sconfig.tab.h_shipped: $(top)/util/sconfig/sconfig.tab.c_shipped +$(top)/util/sconfig/sconfig.tab.c_shipped: $(top)/util/sconfig/sconfig.y + bison --defines=$(top)/util/sconfig/sconfig.tab.h_shipped -o $@ $< + +endif + +$(obj)/util/sconfig/lex.yy.o: $(obj)/util/sconfig/sconfig.tab.h + +$(obj)/util/sconfig/%: $(top)/util/sconfig/%_shipped + cp $< $@ + +$(obj)/util/sconfig/sconfig: $(obj)/util/sconfig $(addprefix $(obj)/util/sconfig/,$(sconfigobj)) + printf " HOSTCXX $(subst $(obj)/,,$(@)) (link)\n" + $(HOSTCXX) $(SCONFIGFLAGS) -o $@ $(addprefix $(obj)/util/sconfig/,$(sconfigobj)) |