From 6a378a3a7a6862e7402a6341f6cfb0ecf7a6824d Mon Sep 17 00:00:00 2001 From: Shinichiro Hamaji Date: Thu, 19 Nov 2015 18:30:21 +0900 Subject: [PATCH] Prevent findleaves.py from traversing copies of $(OUT_DIR) by putting blank Android.mk and CleanSpec.mk in $(OUT_DIR). Bug: 25732342 Change-Id: I3fcc4efddb9ee5ce309502e978f0589335af8371 --- core/main.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/main.mk b/core/main.mk index 2bd316306..d9ff68e02 100644 --- a/core/main.mk +++ b/core/main.mk @@ -113,6 +113,11 @@ ifndef BUILDING_WITH_NINJA $(shell rm -f $(OUT_DIR)/ninja_build) endif +# With these files findleaves.py won't be unnecessarily slower even if +# there is a user creates a copy of $(OUT_DIR). +$(shell echo '# This file prevents findleaves.py from traversing this directory further' > $(OUT_DIR)/Android.mk) +$(shell echo '# This file prevents findleaves.py from traversing this directory further' > $(OUT_DIR)/CleanSpec.mk) + # Write the build number to a file so it can be read back in # without changing the command line every time. Avoids rebuilds # when using ninja. -- 2.11.0