[coreboot-gerrit] New patch to review for coreboot: 997d3e6 cbfstool: clarify dependencies in Makefile

Patrick Georgi (pgeorgi@google.com) gerrit at coreboot.org
Tue May 19 16:44:18 CEST 2015


Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10251

-gerrit

commit 997d3e60cbd812e2f9dbae5a5607ed7775222c7c
Author: Patrick Georgi <pgeorgi at chromium.org>
Date:   Tue May 19 16:41:21 2015 +0200

    cbfstool: clarify dependencies in Makefile
    
    While logical, make's handling of multiple targets in a rule isn't
    intuitive, and was done wrong in cbfstool's Makefile.
    
    %.c %.h: %.l encourages make to run the rule twice, once to
    generate the .c file, once for the .h file. Hilarity ensues.
    
    Change-Id: I2560cb34b6aee5f4bdd764bb05bb69ea2789c7d8
    Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
---
 util/cbfstool/Makefile | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/util/cbfstool/Makefile b/util/cbfstool/Makefile
index 6e8235b..65d5710 100644
--- a/util/cbfstool/Makefile
+++ b/util/cbfstool/Makefile
@@ -54,9 +54,13 @@ $(obj)/%: $(obj)/%.o
 $(obj)/%.o: %.c
 	mkdir -p $(dir $@)
 	$(HOSTCC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
-%.c %.h: %.l
+
+fmd_scanner.h: fmd_scanner.c
+fmd_scanner.c: fmd_scanner.l
 	$(LEX) $(LFLAGS) -t --header-file=$*.h $< >$*.c
-%.c %.h: %.y
+
+fmd_parser.h: fmd_parser.c
+fmd_parser.c: fmd_parser.y
 	$(YACC) $(YFLAGS) -d $<
 	mv -f y.tab.c $*.c
 	mv -f y.tab.h $*.h



More information about the coreboot-gerrit mailing list