Fix collapse-pairs for last empty property

If the last token in the argument for collapse-pairs is
key=, then the following lines were written:
    key
    =
This patch fixes it so that key= is written instead.

Test: specify ro.boot.logical_partitions= at the end of
ADDITIONAL_PRODUCT_PROPERTIES and `cat $OUT/product/build.prop`
shows:
ro.boot.logical_partitions=

Change-Id: I33a0efb59871f0e36a93c8fae0d75f2735994301
This commit is contained in:
Yifan Hong 2018-07-27 13:28:47 -07:00
parent 7b21221d2a
commit 285083e475
1 changed files with 2 additions and 2 deletions

View File

@ -796,8 +796,8 @@ endef
define collapse-pairs
$(eval _cpSEP := $(strip $(if $(2),$(2),=)))\
$(subst $(space)$(_cpSEP)$(space),$(_cpSEP),$(strip \
$(subst $(_cpSEP), $(_cpSEP) ,$(1))))
$(strip $(subst $(space)$(_cpSEP)$(space),$(_cpSEP),$(strip \
$(subst $(_cpSEP), $(_cpSEP) ,$(1)))$(space)))
endef
###########################################################