xiaoxiang781216 commented on code in PR #7076:
URL: https://github.com/apache/incubator-nuttx/pull/7076#discussion_r1004034307


##########
tools/Config.mk:
##########
@@ -237,13 +237,13 @@ OBJPATH ?= .
 #   CONFIG_WINDOWS_NATIVE - Defined for a Windows native build
 
 ifeq ($(CONFIG_WINDOWS_NATIVE),y)
-  DEFINE ?= "$(TOPDIR)\tools\define.bat"
+  DEFINE_CMD ?= "$(TOPDIR)\tools\define.bat"
   INCDIR ?= "$(TOPDIR)\tools\incdir.bat"
 else ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
-  DEFINE ?= "$(TOPDIR)/tools/define.sh" -w
+  DEFINE_CMD ?= "$(TOPDIR)/tools/define.sh" -w
   INCDIR ?= "$(TOPDIR)/tools/incdir$(HOSTEXEEXT)" -w
 else
-  DEFINE ?= "$(TOPDIR)/tools/define.sh"
+  DEFINE_CMD ?= "$(TOPDIR)/tools/define.sh"

Review Comment:
   how about we convert define.[sh|bat] to make function?



##########
drivers/segger/Make.defs:
##########
@@ -27,11 +27,11 @@ ifeq ($(CONFIG_SEGGER_RTT),y)
   CFLAGS += -Wno-shadow -Wno-array-bounds
 
   ifneq ($(CONFIG_SEGGER_RTT_SECTION),"")
-    CFLAGS += ${shell $(DEFINE) "$(CC)" 
SEGGER_RTT_SECTION=CONFIG_SEGGER_RTT_SECTION}
+    ${call DEFINE,CFLAGS,SEGGER_RTT_SECTION=CONFIG_SEGGER_RTT_SECTION}

Review Comment:
   let's DEFINE return value like this?
   CFLAGS += $(call DEFINE, SEGGER_RTT_SECTION=CONFIG_SEGGER_RTT_SECTION)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to