diff --git a/core/definitions.mk b/core/definitions.mk index 54d4df1ef4..09eb6b6f11 100644 --- a/core/definitions.mk +++ b/core/definitions.mk @@ -415,7 +415,7 @@ endef define find-parent-file $(strip \ - $(eval _fpf := $(wildcard $(foreach f, $(2), $(strip $(1))/$(f)))) \ + $(eval _fpf := $(sort $(wildcard $(foreach f, $(2), $(strip $(1))/$(f))))) \ $(if $(_fpf),$(_fpf), \ $(if $(filter-out ./ .,$(1)), \ $(call find-parent-file,$(patsubst %/,%,$(dir $(1))),$(2)) \ diff --git a/core/droiddoc.mk b/core/droiddoc.mk index ab2254fb93..cc2a915d8e 100644 --- a/core/droiddoc.mk +++ b/core/droiddoc.mk @@ -125,7 +125,7 @@ ifneq ($(strip $(LOCAL_DROIDDOC_USE_STANDARD_DOCLET)),true) ## droiddoc_templates := \ - $(shell find $(LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR) -type f) + $(sort $(shell find $(LOCAL_DROIDDOC_CUSTOM_TEMPLATE_DIR) -type f)) droiddoc := \ $(HOST_JDK_TOOLS_JAR) \ @@ -142,7 +142,7 @@ $(full_target): PRIVATE_OUT_CUSTOM_ASSET_DIR := $(out_dir)/$(LOCAL_DROIDDOC_CUST html_dir_files := ifneq ($(strip $(LOCAL_DROIDDOC_HTML_DIR)),) $(full_target): PRIVATE_DROIDDOC_HTML_DIR := -htmldir $(LOCAL_PATH)/$(LOCAL_DROIDDOC_HTML_DIR) -html_dir_files := $(shell find $(LOCAL_PATH)/$(LOCAL_DROIDDOC_HTML_DIR) -type f) +html_dir_files := $(sort $(shell find $(LOCAL_PATH)/$(LOCAL_DROIDDOC_HTML_DIR) -type f)) else $(full_target): PRIVATE_DROIDDOC_HTML_DIR := endif diff --git a/core/envsetup.mk b/core/envsetup.mk index 5cc275e9de..199c6b760c 100644 --- a/core/envsetup.mk +++ b/core/envsetup.mk @@ -139,11 +139,11 @@ SDK_HOST_ARCH := x86 # make sure only one exists. # Real boards should always be associated with an OEM vendor. board_config_mk := \ - $(strip $(wildcard \ + $(strip $(sort $(wildcard \ $(SRC_TARGET_DIR)/board/$(TARGET_DEVICE)/BoardConfig.mk \ $(shell test -d device && find device -maxdepth 4 -path '*/$(TARGET_DEVICE)/BoardConfig.mk') \ $(shell test -d vendor && find vendor -maxdepth 4 -path '*/$(TARGET_DEVICE)/BoardConfig.mk') \ - )) + ))) ifeq ($(board_config_mk),) $(error No config file found for TARGET_DEVICE $(TARGET_DEVICE)) endif diff --git a/core/java_common.mk b/core/java_common.mk index 2195691b25..6d5c2dd07c 100644 --- a/core/java_common.mk +++ b/core/java_common.mk @@ -55,7 +55,7 @@ ifneq ($(LOCAL_JAVA_RESOURCE_DIRS),) $(foreach dir,$(LOCAL_JAVA_RESOURCE_DIRS), \ $(subst $(space),:,$(strip \ $(LOCAL_PATH)/$(dir): \ - $(patsubst ./%,%,$(shell cd $(LOCAL_PATH)/$(dir) && \ + $(patsubst ./%,%,$(sort $(shell cd $(LOCAL_PATH)/$(dir) && \ find . \ -type d -a -name ".svn" -prune -o \ -type f \ @@ -66,7 +66,7 @@ ifneq ($(LOCAL_JAVA_RESOURCE_DIRS),) -a \! -name ".DS_Store" \ -a \! -name "*~" \ -print \ - )) \ + ))) \ )) \ ) java_resource_file_groups := $(filter-out %:,$(java_resource_file_groups)) diff --git a/core/pdk_config.mk b/core/pdk_config.mk index 262b50ecd9..3397d9c91e 100644 --- a/core/pdk_config.mk +++ b/core/pdk_config.mk @@ -21,11 +21,11 @@ ifndef PDK_FUSION_PLATFORM_ZIP # Most PDK project paths should be using vendor/pdk/TARGET_DEVICE # but some legacy ones (e.g. mini_armv7a_neon generic PDK) were setup # with vendor/pdk/TARGET_PRODUCT. -_pdk_fusion_default_platform_zip = $(wildcard \ -vendor/pdk/$(TARGET_DEVICE)/$(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT)/platform/platform.zip \ -vendor/pdk/$(TARGET_DEVICE)/$(patsubst aosp_%,full_%,$(TARGET_PRODUCT))-$(TARGET_BUILD_VARIANT)/platform/platform.zip \ -vendor/pdk/$(TARGET_PRODUCT)/$(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT)/platform/platform.zip \ -vendor/pdk/$(TARGET_PRODUCT)/$(patsubst aosp_%,full_%,$(TARGET_PRODUCT))-$(TARGET_BUILD_VARIANT)/platform/platform.zip) +_pdk_fusion_default_platform_zip = $(strip \ + $(wildcard vendor/pdk/$(TARGET_DEVICE)/$(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT)/platform/platform.zip) \ + $(wildcard vendor/pdk/$(TARGET_DEVICE)/$(patsubst aosp_%,full_%,$(TARGET_PRODUCT))-$(TARGET_BUILD_VARIANT)/platform/platform.zip) \ + $(wildcard vendor/pdk/$(TARGET_PRODUCT)/$(TARGET_PRODUCT)-$(TARGET_BUILD_VARIANT)/platform/platform.zip) \ + $(wildcard vendor/pdk/$(TARGET_PRODUCT)/$(patsubst aosp_%,full_%,$(TARGET_PRODUCT))-$(TARGET_BUILD_VARIANT)/platform/platform.zip)) ifneq (,$(_pdk_fusion_default_platform_zip)) PDK_FUSION_PLATFORM_ZIP := $(word 1, $(_pdk_fusion_default_platform_zip)) TARGET_BUILD_PDK := true diff --git a/core/product.mk b/core/product.mk index ed47d715f1..95e88b36f7 100644 --- a/core/product.mk +++ b/core/product.mk @@ -28,8 +28,8 @@ # $(call ) isn't necessary. # define _find-android-products-files -$(shell test -d device && find device -maxdepth 6 -name AndroidProducts.mk) \ - $(shell test -d vendor && find vendor -maxdepth 6 -name AndroidProducts.mk) \ +$(sort $(shell test -d device && find device -maxdepth 6 -name AndroidProducts.mk)) \ + $(sort $(shell test -d vendor && find vendor -maxdepth 6 -name AndroidProducts.mk)) \ $(SRC_TARGET_DIR)/product/AndroidProducts.mk endef diff --git a/core/sdk_font.mk b/core/sdk_font.mk index 204403d196..c10f19ff34 100644 --- a/core/sdk_font.mk +++ b/core/sdk_font.mk @@ -18,7 +18,7 @@ fonttools_lib := external/fonttools/Lib SDK_FONT_TEMP := $(call intermediates-dir-for,PACKAGING,sdk-fonts,HOST,COMMON) # The font configuration files - system_fonts.xml, fallback_fonts.xml etc. -sdk_font_config := $(wildcard frameworks/base/data/fonts/*.xml) +sdk_font_config := $(sort $(wildcard frameworks/base/data/fonts/*.xml)) sdk_font_config := $(addprefix $(SDK_FONT_TEMP)/, $(notdir $(sdk_font_config))) $(sdk_font_config): $(SDK_FONT_TEMP)/%.xml: \