# HG changeset patch # User erikj # Date 1519420156 -3600 # Node ID e61816fc527634238356b80fc3f02168630bf87c # Parent a6c4b85163c18d9182f32494e4ac983adf865c94 8198569: SetupTextFileProcessing should use sed with 'g' Reviewed-by: tbell, ihse diff -r a6c4b85163c1 -r e61816fc5276 make/common/TextFileProcessing.gmk --- a/make/common/TextFileProcessing.gmk Fri Feb 23 12:10:56 2018 -0800 +++ b/make/common/TextFileProcessing.gmk Fri Feb 23 22:09:16 2018 +0100 @@ -153,11 +153,11 @@ endif # Convert the REPLACEMENTS syntax ( A => B ; C => D ; ...) to a sed command - # line (-e "s/A/B/" -e "s/C/D/" ...), basically by replacing '=>' with '/' - # and ';' with '/" -e "s/', and adjusting for edge cases. - $1_REPLACEMENTS_COMMAND_LINE := $(SED) -e 's$$($1_SEP)$$(subst $$(SPACE);$$(SPACE),$$($1_SEP)' \ - -e 's$$($1_SEP),$$(subst $$(SPACE)=>$$(SPACE),$$($1_SEP),$$(subst $$(SPACE)=>$$(SPACE);$$(SPACE),$$($1_SEP)$$($1_SEP)' \ - -e 's$$($1_SEP),$$(strip $$($1_REPLACEMENTS)))))$$($1_SEP)' + # line (-e "s/A/B/g" -e "s/C/D/g" ...), basically by replacing '=>' with '/' + # and ';' with '/g" -e "s/', and adjusting for edge cases. + $1_REPLACEMENTS_COMMAND_LINE := $(SED) -e 's$$($1_SEP)$$(subst $$(SPACE);$$(SPACE),$$($1_SEP)g' \ + -e 's$$($1_SEP),$$(subst $$(SPACE)=>$$(SPACE),$$($1_SEP),$$(subst $$(SPACE)=>$$(SPACE);$$(SPACE),$$($1_SEP)$$($1_SEP)g' \ + -e 's$$($1_SEP),$$(strip $$($1_REPLACEMENTS)))))$$($1_SEP)g' else # We don't have any replacements, just pipe the file through cat. $1_REPLACEMENTS_COMMAND_LINE := $(CAT)