diff options
author | Jeff Brown <jeffbrown@google.com> | 2012-05-30 13:52:22 -0700 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2012-05-30 13:52:22 -0700 |
commit | 01efddb0b8c641a9ebfd955173dd58e015fbe903 (patch) | |
tree | 6b6a8caf0bbc6e18d1dff379deb1c7f9917c922a /core | |
parent | 3e93aeae10aa70ab64e78fbab0bb8741d0b04d99 (diff) | |
download | build-01efddb0b8c641a9ebfd955173dd58e015fbe903.zip build-01efddb0b8c641a9ebfd955173dd58e015fbe903.tar.gz build-01efddb0b8c641a9ebfd955173dd58e015fbe903.tar.bz2 |
Make make make faster.
Optimize common case of uniq-words where the word is not
actually duplicated. Reduces make startup overhead.
Change-Id: I1bee13bbd08a7b01248f4452283a64a724663d02
Diffstat (limited to 'core')
-rw-r--r-- | core/node_fns.mk | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/node_fns.mk b/core/node_fns.mk index 38ecea7..40abff7 100644 --- a/core/node_fns.mk +++ b/core/node_fns.mk @@ -98,7 +98,7 @@ empty := space := $(empty) $(empty) define uniq-word $(strip \ - $(if $(filter $(2),$(1)), \ + $(if $(filter-out 0 1,$(words $(filter $(2),$(1)))), \ $(eval h := |||$(subst $(space),|||,$(strip $(1)))|||) \ $(eval h := $(subst |||$(strip $(2))|||,|||$(space)|||,$(h))) \ $(eval h := $(word 1,$(h)) $(2) $(wordlist 2,9999,$(h))) \ |