8204682: Parsing for LOG=report=none is broken when combined with other keywords
Reviewed-by: erikj
This commit is contained in:
parent
77837d06d1
commit
8fe36bed48
@ -34,6 +34,9 @@ _INITSUPPORT_GMK := 1
|
|||||||
|
|
||||||
ifeq ($(HAS_SPEC),)
|
ifeq ($(HAS_SPEC),)
|
||||||
|
|
||||||
|
# COMMA is defined in spec.gmk, but that is not included yet
|
||||||
|
COMMA := ,
|
||||||
|
|
||||||
# Include the corresponding closed file, if present.
|
# Include the corresponding closed file, if present.
|
||||||
ifneq ($(CUSTOM_MAKE_DIR), )
|
ifneq ($(CUSTOM_MAKE_DIR), )
|
||||||
-include $(CUSTOM_MAKE_DIR)/InitSupport.gmk
|
-include $(CUSTOM_MAKE_DIR)/InitSupport.gmk
|
||||||
@ -531,8 +534,6 @@ endif # HAS_SPEC
|
|||||||
define ParseLogOption
|
define ParseLogOption
|
||||||
ifneq ($$(findstring $1, $$(LOG)),)
|
ifneq ($$(findstring $1, $$(LOG)),)
|
||||||
override $2 := true
|
override $2 := true
|
||||||
# COMMA is defined in spec.gmk, but that is not included yet
|
|
||||||
COMMA := ,
|
|
||||||
# First try to remove ",<option>" if it exists, otherwise just remove "<option>"
|
# First try to remove ",<option>" if it exists, otherwise just remove "<option>"
|
||||||
LOG_STRIPPED := $$(subst $1,, $$(subst $$(COMMA)$$(strip $1),, $$(LOG)))
|
LOG_STRIPPED := $$(subst $1,, $$(subst $$(COMMA)$$(strip $1),, $$(LOG)))
|
||||||
# We might have ended up with a leading comma. Remove it. Need override
|
# We might have ended up with a leading comma. Remove it. Need override
|
||||||
@ -550,8 +551,6 @@ define ParseLogValue
|
|||||||
# Make words of out comma-separated list and find the one with opt=val
|
# Make words of out comma-separated list and find the one with opt=val
|
||||||
value := $$(strip $$(subst $$(strip $1)=,, $$(filter $$(strip $1)=%, $$(subst $$(COMMA), , $$(LOG)))))
|
value := $$(strip $$(subst $$(strip $1)=,, $$(filter $$(strip $1)=%, $$(subst $$(COMMA), , $$(LOG)))))
|
||||||
override $2 := $$(value)
|
override $2 := $$(value)
|
||||||
# COMMA is defined in spec.gmk, but that is not included yet
|
|
||||||
COMMA := ,
|
|
||||||
# First try to remove ",<option>" if it exists, otherwise just remove "<option>"
|
# First try to remove ",<option>" if it exists, otherwise just remove "<option>"
|
||||||
LOG_STRIPPED := $$(subst $$(strip $1)=$$(value),, \
|
LOG_STRIPPED := $$(subst $$(strip $1)=$$(value),, \
|
||||||
$$(subst $$(COMMA)$$(strip $1)=$$(value),, $$(LOG)))
|
$$(subst $$(COMMA)$$(strip $1)=$$(value),, $$(LOG)))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user