[PATCH 3/6] kbuild: swap the include order of arch Makefile and auto.conf.cmd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Include

  include/config/auto.conf
  arch/$(ARCH)/Makefile
  include/config/auto.conf.cmd

in this order, which is the same as the current Linux does.

auto.conf.cmd contains the environment variables that were referenced
from Kconfig files. If an environment variable defined in arch Makefile
is referenced from Kconfig files, Kbuild would end up with eternal
synconfig loop.

Signed-off-by: Masahiro Yamada <masahiroy@xxxxxxxxxx>
---

 Makefile | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 797ed214a..e01a7491a 100644
--- a/Makefile
+++ b/Makefile
@@ -445,12 +445,16 @@ PHONY += scripts
 scripts: scripts_basic
 	$(Q)$(MAKE) $(build)=$(@)
 
+ifeq ($(dot-config),1)
+include include/config/auto.conf
+endif
+
 # Objects we will link into barebox / subdirs we need to visit
 common-y		:= common/ drivers/ commands/ lib/ crypto/ net/ fs/ firmware/
 
-ifeq ($(dot-config),1)
-include include/config/auto.conf
+include $(srctree)/arch/$(ARCH)/Makefile
 
+ifeq ($(dot-config),1)
 # Read in dependencies to all Kconfig* files, make sure to run syncconfig if
 # changes are detected. This should be included after arch/$(SRCARCH)/Makefile
 # because some architectures define CROSS_COMPILE there.
@@ -476,8 +480,6 @@ $(KCONFIG_CONFIG):
 	$(Q)$(MAKE) -f $(srctree)/Makefile syncconfig
 endif # $(dot-config)
 
-include $(srctree)/arch/$(ARCH)/Makefile
-
 KBUILD_CFLAGS		+= -ggdb3
 
 # Force gcc to behave correct even for buggy distributions
-- 
2.25.1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux