Prior to this change, all PRODUCT_* variables are inherited with
list semantics, meaning the variable value in the current makefile
as well as all the makefiles it inherits are concatenated together.
Many of these variables are not lists, so this change adds the
ability to classify a variable as a single-value variable, which
will inherit at most one value (the first one), unless the variable
is already defined in the current file.
This change also marks all current variables as list variables.
A future change will re-classify the single-value variables as such.
Bug: 116769560
Test: presubmit
Change-Id: I57719a5eefd0749e92c08b1773b6f929629267a3
To reduce the start time.
With the change and previous change of doing clean step in only given paths,
start time of mm/mmm is reduced from ~5s to about 1s;
lunch time is reduced from ~40s to 3.5s.
Bug: 7186768,7169854
Change-Id: Ifd72ba1c6362a5e1125a23c505fd47947ab56675
Optimize common case of uniq-words where the word is not
actually duplicated. Reduces make startup overhead.
Change-Id: I1bee13bbd08a7b01248f4452283a64a724663d02
The variable inheritance system can leave extra spaces in a variable
when multiple levels of inheritance are used. It can expand:
"@inherit:foo @inherit:bar @inherit:baz"
to
"value @inherit:bar @inherit:baz"
and then
"value @inherit:baz" (if bar has no value for the variable)
and then
"value " (if baz also has no value).
Call strip to remove excess spaces between words after each
replacement pass.
Change-Id: Ic4cfc6fed1865066a6353a522e4bdcb68ec875d3