OSDN Git Service

build: Load makefiles in the same order with Make 4.0
authorDan Willemsen <dwillemsen@google.com>
Thu, 6 Aug 2015 22:01:24 +0000 (15:01 -0700)
committerDan Willemsen <dwillemsen@google.com>
Thu, 6 Aug 2015 22:21:30 +0000 (15:21 -0700)
Make 4.0 (and Kati) removed the implicit sort from the $(wildcard)
function. In order to ensure that makefiles are always loaded in the
same order, and an explicit sort.

This shouldn't matter, but some makefiles are modifying variables used
by siblings (LLVM_ROOT_PATH under frameworks/compile). In this case, the
path value still pointed to the same path, it just had extra '..'
references, and was enough to cause the binaries to be different.

Change-Id: Ief6551f999351ee2c193275aaae426dc064f8b34

core/definitions.mk

index a47202c..1d59049 100644 (file)
@@ -139,7 +139,7 @@ endef
 ###########################################################
 
 define all-makefiles-under
-$(wildcard $(1)/*/Android.mk)
+$(sort $(wildcard $(1)/*/Android.mk))
 endef
 
 ###########################################################
@@ -171,7 +171,7 @@ endef
 
 # $(1): List of directories to look for under this directory
 define all-named-subdir-makefiles
-$(wildcard $(addsuffix /Android.mk, $(addprefix $(call my-dir)/,$(1))))
+$(sort $(wildcard $(addsuffix /Android.mk, $(addprefix $(call my-dir)/,$(1)))))
 endef
 
 ###########################################################