From 150a1ca0c2eda0d803312e929193bb36327744e9 Mon Sep 17 00:00:00 2001 From: Yo Chiang Date: Sat, 8 Aug 2020 20:10:59 +0800 Subject: [PATCH] Don't call $(my_path_comp) if $(dir $(LOCAL_PATH)) is TOP So we don't accidentally create phony rules like `MODULES-IN-: MODULES-IN-` and `MODULES-IN-.: MODULES-IN-*` Bug: 162918277 Test: m com.android.art Test: ninja -t browse Change-Id: Id0656d1b08bc933df57914df162853934352593b --- core/base_rules.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/base_rules.mk b/core/base_rules.mk index abe059b256..aeab0ed92b 100644 --- a/core/base_rules.mk +++ b/core/base_rules.mk @@ -487,7 +487,9 @@ $(_local_path_target): $(my_register_name) ifndef $(_local_path_target) $(_local_path_target) := true - $(eval $(call my_path_comp,$(_local_path),$(_local_path_target))) + ifneq (,$(findstring /,$(_local_path))) + $(eval $(call my_path_comp,$(_local_path),$(_local_path_target))) + endif endif _local_path :=