mirror of
https://github.com/apache/nuttx.git
synced 2026-05-26 02:36:11 +08:00
tools: replace DEFINE script to Makefile variable
In the past, predefined macros were generated by define.sh scripts Now they are generated by concatenating environment variables In this way, when executing makefile, no shell command will be executed, it will improve the speed of executing makfile Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
+5
-4
@@ -106,7 +106,7 @@ endif
|
||||
# This define is passed as EXTRAFLAGS for kernel-mode builds. It is also passed
|
||||
# during PASS1 (but not PASS2) context and depend targets.
|
||||
|
||||
KDEFINE ?= ${shell $(DEFINE) "$(CC)" __KERNEL__}
|
||||
KDEFINE ?= ${DEFINE_PREFIX}__KERNEL__
|
||||
|
||||
# DELIM - Path segment delimiter character
|
||||
#
|
||||
@@ -577,11 +577,12 @@ $(1)_$(2):
|
||||
|
||||
endef
|
||||
|
||||
# ARCHxxx means the predefined setting(either toolchain, arch, or system specific)
|
||||
export DEFINE_PREFIX := $(subst X,,${shell $(DEFINE) "$(CC)" "X"})
|
||||
|
||||
ARCHDEFINES += ${shell $(DEFINE) "$(CC)" __NuttX__}
|
||||
# ARCHxxx means the predefined setting(either toolchain, arch, or system specific)
|
||||
ARCHDEFINES += ${DEFINE_PREFIX}__NuttX__
|
||||
ifeq ($(CONFIG_NDEBUG),y)
|
||||
ARCHDEFINES += ${shell $(DEFINE) "$(CC)" NDEBUG}
|
||||
ARCHDEFINES += ${DEFINE_PREFIX}NDEBUG
|
||||
endif
|
||||
|
||||
# The default C/C++ search path
|
||||
|
||||
Reference in New Issue
Block a user