From ec224d5072f4af2b01aa0e4f06b161246054b028 Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Thu, 6 Aug 2015 15:01:24 -0700 Subject: [PATCH] build: Load makefiles in the same order with Make 4.0 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/definitions.mk b/core/definitions.mk index a47202cf4d..1d59049d6b 100644 --- a/core/definitions.mk +++ b/core/definitions.mk @@ -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 ###########################################################