Use shell sort command
When using builtin sort() function, make will detect changes in
the find sub-expression, and re-parse the whole makefile. Even though file
list after soring is identical. This is bad for incremental builds, as
everytime a python file is modified, the order files that gets returned
by find changes, resulting in long build time.
Test: th
Change-Id: I8cc347b4473a2b241f2f10e016e5968477c482f3
diff --git a/core/Makefile b/core/Makefile
index b95d2ad..a802a4c 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -5065,8 +5065,8 @@
endif
INTERNAL_OTATOOLS_RELEASETOOLS := \
- $(sort $(shell find build/make/tools/releasetools -name "*.pyc" -prune -o \
- \( -type f -o -type l \) -print))
+ $(shell find build/make/tools/releasetools -name "*.pyc" -prune -o \
+ \( -type f -o -type l \) -print | sort)
BUILT_OTATOOLS_PACKAGE := $(PRODUCT_OUT)/otatools.zip
$(BUILT_OTATOOLS_PACKAGE): PRIVATE_ZIP_ROOT := $(call intermediates-dir-for,PACKAGING,otatools)/otatools