diff options
author | David 'Digit' Turner <digit@android.com> | 2011-03-29 14:27:27 +0200 |
---|---|---|
committer | David 'Digit' Turner <digit@android.com> | 2011-03-29 14:27:27 +0200 |
commit | 3e0e611e766fe61fe41169dcb2dd0b42b7c5dc99 (patch) | |
tree | d5ed214928aea3bb2d608a8d2f5125592aca79dd | |
parent | 57c7019693a07c7b9e200d4560a0886d248bfe5b (diff) | |
download | build-3e0e611e766fe61fe41169dcb2dd0b42b7c5dc99.zip build-3e0e611e766fe61fe41169dcb2dd0b42b7c5dc99.tar.gz build-3e0e611e766fe61fe41169dcb2dd0b42b7c5dc99.tar.bz2 |
build speedup: Do not use shell 'find' function to look for NOTICE files.
The GNU Make wildcard function can be used to look for a specific file and
is _much_ faster than invoking the find command through $(shell ...).
Since notice_files.mk is included by base_rules.mk for each and every module
in the build tree, this represents a considerable speed-up. For example, when
building the full-eng product from the AOSP tree, the no-op "make" goes from
21 seconds to 16 seconds with this patch applied.
Change-Id: Ideb1bb74d5bfbb650834fa4b6e151ff24dcd0150
-rw-r--r-- | core/notice_files.mk | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/notice_files.mk b/core/notice_files.mk index fd76d51..74beb49 100644 --- a/core/notice_files.mk +++ b/core/notice_files.mk @@ -2,9 +2,9 @@ ## Track NOTICE files ########################################################### -notice_file:=$(shell find $(LOCAL_PATH) -maxdepth 1 -name NOTICE) +notice_file:=$(strip $(wildcard $(LOCAL_PATH)/NOTICE)) -ifneq ($(strip $(notice_file)),) +ifdef notice_file # This relies on the name of the directory in PRODUCT_OUT matching where # it's installed on the target - i.e. system, data, etc. This does |