You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/10/25 05:56:42 UTC
[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #7076: Remove duplicate calls and optimize compilation speed
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org