changeset 51120:e5cdf2569510

8204682: Parsing for LOG=report=none is broken when combined with other keywords Reviewed-by: erikj
author ihse
date Mon, 11 Jun 2018 20:18:38 +0200
parents 54fcaffa8fac
children 6aa873a6dae9
files make/InitSupport.gmk
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/make/InitSupport.gmk	Mon Jun 11 19:09:15 2018 +0200
+++ b/make/InitSupport.gmk	Mon Jun 11 20:18:38 2018 +0200
@@ -34,6 +34,9 @@
 
 ifeq ($(HAS_SPEC),)
 
+  # COMMA is defined in spec.gmk, but that is not included yet
+  COMMA := ,
+
   # Include the corresponding closed file, if present.
   ifneq ($(CUSTOM_MAKE_DIR), )
     -include $(CUSTOM_MAKE_DIR)/InitSupport.gmk
@@ -531,8 +534,6 @@
 define ParseLogOption
   ifneq ($$(findstring $1, $$(LOG)),)
     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>"
     LOG_STRIPPED := $$(subst $1,, $$(subst $$(COMMA)$$(strip $1),, $$(LOG)))
     # We might have ended up with a leading comma. Remove it. Need override
@@ -550,8 +551,6 @@
     # 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)))))
     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>"
     LOG_STRIPPED := $$(subst $$(strip $1)=$$(value),, \
         $$(subst $$(COMMA)$$(strip $1)=$$(value),, $$(LOG)))