strings.mk: Allow empty RHS values for inputs of collapse-pairs

This CL is to make the function collapse-pairs(), which is applied to
lists of "property=value" pairs, allow empty properties (i.e. lines of
the form "empty.prop=").
Currently, the function only allows empty properties at the end (see
https://android-review.googlesource.com/c/platform/build/+/722908).
So empty properties in the middle result in broken property files (e.g.
"a=b c= d=e" is transformed to "a=b c=d=e", in which the property "c",
which originally has no value, is interpreted as having the value "d=e",
whereas the property "d", which originally has the value "e", is missing
from the resulting property file).
This CL revises the function so as to keep empty properties in the
middle as is (e.g. it returns "a=b c= d=e" for the above example), while
preserving the behavior for well-formed lists like "a=b c= d e = f".

Bug: 152379493
Test: make
Change-Id: I35faeaedc3bc42e56e01201baf7ea6805a610439
1 file changed
tree: 78dd21a80c856b0c0f2b02e3aceb49284d41aeb7
  1. common/
  2. core/
  3. packaging/
  4. target/
  5. tests/
  6. tools/
  7. .gitignore
  8. buildspec.mk.default
  9. Changes.md
  10. CleanSpec.mk
  11. Deprecation.md
  12. envsetup.sh
  13. help.sh
  14. navbar.md
  15. OWNERS
  16. rbesetup.sh
  17. README.md
  18. tapasHelp.sh
  19. Usage.txt
README.md

Android Make Build System

This is the Makefile-based portion of the Android Build System.

For documentation on how to run a build, see Usage.txt

For a list of behavioral changes useful for Android.mk writers see Changes.md

For an outdated reference on Android.mk files, see build-system.html. Our Android.mk files look similar, but are entirely different from the Android.mk files used by the NDK build system. When searching for documentation elsewhere, ensure that it is for the platform build system -- most are not.

This Makefile-based system is in the process of being replaced with Soong, a new build system written in Go. During the transition, all of these makefiles are read by Kati, and generate a ninja file instead of being executed directly. That's combined with a ninja file read by Soong so that the build graph of the two systems can be combined and run as one.