瀏覽代碼

autoconf.mk: include before config.mk for top level files

By including autoconf.mk before config.mk, all top level files can use any
config options it sets up (like <arch>_config.mk) or the Makefile itself
without being forced to use lazy evaluation.
Mike Frysinger 15 年之前
父節點
當前提交
2632c008e2
共有 1 個文件被更改,包括 7 次插入3 次删除
  1. 7 3
      Makefile

+ 7 - 3
Makefile

@@ -147,6 +147,13 @@ SUBDIRS	= tools \
 
 ifeq ($(obj)include/config.mk,$(wildcard $(obj)include/config.mk))
 
+# Include autoconf.mk before config.mk so that the config options are available
+# to all top level build files.  We need the dummy all: target to prevent the
+# dependency target in autoconf.mk.dep from being the default.
+all:
+sinclude $(obj)include/autoconf.mk.dep
+sinclude $(obj)include/autoconf.mk
+
 # load ARCH, BOARD, and CPU configuration
 include $(obj)include/config.mk
 export	ARCH CPU BOARD VENDOR SOC
@@ -440,9 +447,6 @@ $(obj)include/autoconf.mk: $(obj)include/config.h
 		sed -n -f tools/scripts/define2mk.sed > $@.tmp && \
 	mv $@.tmp $@
 
-sinclude $(obj)include/autoconf.mk.dep
-sinclude $(obj)include/autoconf.mk
-
 #########################################################################
 else	# !config.mk
 all $(obj)u-boot.hex $(obj)u-boot.srec $(obj)u-boot.bin \