Makefile: Fix KCONFIG_AUTOHEADER dependencies
This makes the Makefile more robust when changing the file name or changing the .config outside of make *config Change-Id: Ifc013cc3ef899a7846742a961261ac50bc67e27b Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: http://review.coreboot.org/10970 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
This commit is contained in:
parent
752fba7846
commit
0d869ede7f
4
Makefile
4
Makefile
|
@ -138,7 +138,7 @@ real-all: real-target
|
||||||
# must come rather early
|
# must come rather early
|
||||||
.SECONDEXPANSION:
|
.SECONDEXPANSION:
|
||||||
|
|
||||||
$(obj)/config.h:
|
$(KCONFIG_AUTOHEADER): $(KCONFIG_CONFIG)
|
||||||
$(MAKE) oldconfig
|
$(MAKE) oldconfig
|
||||||
|
|
||||||
# Add a new class of source/object files to the build system
|
# Add a new class of source/object files to the build system
|
||||||
|
@ -218,7 +218,7 @@ define create_cc_template
|
||||||
# $4 additional dependencies
|
# $4 additional dependencies
|
||||||
ifn$(EMPTY)def $(1)-objs_$(2)_template
|
ifn$(EMPTY)def $(1)-objs_$(2)_template
|
||||||
de$(EMPTY)fine $(1)-objs_$(2)_template
|
de$(EMPTY)fine $(1)-objs_$(2)_template
|
||||||
$$(call src-to-obj,$1,$$(1).$2): $$(1).$2 $(obj)/config.h $(4)
|
$$(call src-to-obj,$1,$$(1).$2): $$(1).$2 $(KCONFIG_AUTOHEADER) $(4)
|
||||||
@printf " CC $$$$(subst $$$$(obj)/,,$$$$(@))\n"
|
@printf " CC $$$$(subst $$$$(obj)/,,$$$$(@))\n"
|
||||||
$(CC_$(1)) -MMD $$$$(CPPFLAGS_$(1)) $$$$(CFLAGS_$(1)) -MT $$$$(@) $(3) -c -o $$$$@ $$$$<
|
$(CC_$(1)) -MMD $$$$(CPPFLAGS_$(1)) $$$$(CFLAGS_$(1)) -MT $$$$(@) $(3) -c -o $$$$@ $$$$<
|
||||||
en$(EMPTY)def
|
en$(EMPTY)def
|
||||||
|
|
Loading…
Reference in New Issue