make/InitSupport.gmk
changeset 50507 e5cdf2569510
parent 49568 3e9cb3562d83
child 50562 3903ab54107e
--- 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)))