From 8f92d4194fe00389d5bc75e83932d1be7f969c7c Mon Sep 17 00:00:00 2001 From: Cole Faust Date: Wed, 10 May 2023 19:04:34 -0700 Subject: [PATCH] Remove wildcards of absolute paths PRODUCT_DEX_PREOPT_PROFILE_DIR could be an empty string, leading to a wildcard starting with /. Test: m nothing Change-Id: Ic745ed4b55cdf5d5d6b43f91c9e5f0c23635c618 --- core/dex_preopt_odex_install.mk | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/core/dex_preopt_odex_install.mk b/core/dex_preopt_odex_install.mk index cb16321de2..7165bea9b2 100644 --- a/core/dex_preopt_odex_install.mk +++ b/core/dex_preopt_odex_install.mk @@ -84,12 +84,13 @@ endif ifndef LOCAL_DEX_PREOPT_GENERATE_PROFILE # If LOCAL_DEX_PREOPT_GENERATE_PROFILE is not defined, default it based on the existence of the # profile class listing. TODO: Use product specific directory here. - my_classes_directory := $(PRODUCT_DEX_PREOPT_PROFILE_DIR) - LOCAL_DEX_PREOPT_PROFILE := $(my_classes_directory)/$(LOCAL_MODULE).prof + ifdef PRODUCT_DEX_PREOPT_PROFILE_DIR + LOCAL_DEX_PREOPT_PROFILE := $(PRODUCT_DEX_PREOPT_PROFILE_DIR)/$(LOCAL_MODULE).prof - ifneq (,$(wildcard $(LOCAL_DEX_PREOPT_PROFILE))) - my_process_profile := true - my_profile_is_text_listing := + ifneq (,$(wildcard $(LOCAL_DEX_PREOPT_PROFILE))) + my_process_profile := true + my_profile_is_text_listing := + endif endif else my_process_profile := $(LOCAL_DEX_PREOPT_GENERATE_PROFILE)