From d2be3a7339fe42629f3616a00708c5e74d84fe61 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sun, 26 Jul 2020 13:57:37 -0700 Subject: [PATCH] Fix Variable Trace handling (#9831) It wants a number, but a number of files have it set to "no", even though it's commented out. This means that if you set it to no, it will cause a compiler error. This sets the default to "no", and checks to make sure it's not set to "no" before processing it, and striping the value from it. --- common_features.mk | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/common_features.mk b/common_features.mk index e23de553b3..8443a759b3 100644 --- a/common_features.mk +++ b/common_features.mk @@ -246,12 +246,13 @@ ifeq ($(strip $(SERIAL_LINK_ENABLE)), yes) VAPTH += $(SERIAL_PATH) endif -ifneq ($(strip $(VARIABLE_TRACE)),) +VARIABLE_TRACE ?= no +ifneq ($(strip $(VARIABLE_TRACE)),no) SRC += $(QUANTUM_DIR)/variable_trace.c OPT_DEFS += -DNUM_TRACED_VARIABLES=$(strip $(VARIABLE_TRACE)) -ifneq ($(strip $(MAX_VARIABLE_TRACE_SIZE)),) - OPT_DEFS += -DMAX_VARIABLE_TRACE_SIZE=$(strip $(MAX_VARIABLE_TRACE_SIZE)) -endif + ifneq ($(strip $(MAX_VARIABLE_TRACE_SIZE)),) + OPT_DEFS += -DMAX_VARIABLE_TRACE_SIZE=$(strip $(MAX_VARIABLE_TRACE_SIZE)) + endif endif ifeq ($(strip $(LCD_ENABLE)), yes)