[coreboot] New patch to review for filo: df119be makefile: rebuild config.h when needed

Mathias Krause (mathias.krause@secunet.com) gerrit at coreboot.org
Tue Mar 6 16:42:27 CET 2012


Mathias Krause (mathias.krause at secunet.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/741

-gerrit

commit df119bed3bad665af86209cb41111ccc8754f2f6
Author: Mathias Krause <mathias.krause at secunet.com>
Date:   Tue Mar 6 09:16:29 2012 +0100

    makefile: rebuild config.h when needed
    
    The dependencies for filo are quite awkward. Fix this by moving them
    where they belong to be, namely:
    * object files (not filo) depend on config.h
    * config.h (not filo) depends on .config to fix build problems when
      build/ gets removed or .config gets manually edited
    
    Change-Id: Ic107ad4d37cb6ce128ee3ad62cb8d271b457f91a
    Signed-off-by: Mathias Krause <mathias.krause at secunet.com>
---
 Makefile |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index d880f68..41486a9 100644
--- a/Makefile
+++ b/Makefile
@@ -129,7 +129,7 @@ libpayload: $(src)/$(LIB_CONFIG)
 	$(MAKE) -C $(LIBCONFIG_PATH) obj=$(obj)/libpayload-build DESTDIR=$(src)/build install
 endif
 
-$(obj)/filo: $(src)/.config $(OBJS)  libpayload
+$(obj)/filo: $(OBJS) libpayload
 	printf "  LD      $(subst $(shell pwd)/,,$(@))\n"
 	$(LD) -N -T $(ARCHDIR-y)/ldscript -o $@ $(OBJS) $(LIBPAYLOAD) $(LIBGCC)
 
@@ -141,7 +141,11 @@ $(TARGET): $(obj)/filo libpayload
 
 include util/kconfig/Makefile
 
-$(obj)/%.o: $(src)/%.c libpayload
+$(KCONFIG_AUTOHEADER): $(src)/.config
+	$(MAKE) silentoldconfig
+
+$(OBJS): $(KCONFIG_AUTOHEADER) libpayload
+$(obj)/%.o: $(src)/%.c
 	printf "  CC      $(subst $(shell pwd)/,,$(@))\n"
 	$(CC) -MMD $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
 




More information about the coreboot mailing list