path: root/Makefile
diff options
authorMasahiro Yamada <>2015-04-03 12:30:25 +0900
committerTom Rini <>2015-04-07 08:41:10 -0400
commitcffcd2861310855130db52c93f7bf4d9b511741d (patch)
treeaeae11f5cd65e6c3892de63d0404800a04946da8 /Makefile
parente049b772ae21e6698b65ebb3bc3afc61c8b13f39 (diff)
kbuild: include when auto.conf is not older than .config
Since the Kconfig conversion, has been included only when include/config/auto.conf is newer than the .config file. It causes build error if both files have the same time-stamps. It is actually possible because EXT* file systems have a 1s time-stamp resolution. The should be included when include/config/auto.conf is *not older* than the .config file. Signed-off-by: Masahiro Yamada <> Reported-by: Tom Rini <> Reported-by: York Sun <> Reported-by: Stephen Warren <> Reported-by: Matthew Gerlach <> Tested-by: Stephen Warren <>
Diffstat (limited to 'Makefile')
1 files changed, 7 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index f1bce44016..53ad450de6 100644
--- a/Makefile
+++ b/Makefile
@@ -513,12 +513,16 @@ include/config/%.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd
# is up-to-date. When we switch to a different board configuration, old CONFIG
# macros are still remaining in include/config/auto.conf. Without the following
# gimmick, wrong would be included leading nasty warnings/errors.
-autoconf_is_current := $(if $(wildcard $(KCONFIG_CONFIG)),$(shell find . \
- -path ./include/config/auto.conf -newer $(KCONFIG_CONFIG)))
-ifneq ($(autoconf_is_current),)
+ifneq ($(wildcard $(KCONFIG_CONFIG)),)
+ifneq ($(wildcard include/config/auto.conf),)
+autoconf_is_old := $(shell find . -path ./$(KCONFIG_CONFIG) -newer \
+ include/config/auto.conf)
+ifeq ($(autoconf_is_old),)
include $(srctree)/
include $(srctree)/arch/$(ARCH)/Makefile
# If board code explicitly specified LDSCRIPT or CONFIG_SYS_LDSCRIPT, use
# that (or fail if absent). Otherwise, search for a linker script in a
OpenPOWER on IntegriCloud