You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gn...@apache.org on 2020/02/03 21:03:30 UTC

[incubator-nuttx] branch pr205 updated: Config.mk: add DEFINE macro like INCDIR

This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch pr205
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/pr205 by this push:
     new a66f48e  Config.mk: add DEFINE macro like INCDIR
a66f48e is described below

commit a66f48ea9da4efec7108bea306eb833fe974ad73
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun May 13 17:22:25 2018 +0800

    Config.mk: add DEFINE macro like INCDIR
    
    Change-Id: I41eb8003a386e83ef3afd94bf8f0ebb5348f79e0
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 libs/libc/Makefile  | 6 +-----
 libs/libnx/Makefile | 6 +-----
 mm/Makefile         | 6 +-----
 tools/Config.mk     | 2 ++
 tools/Makefile.unix | 2 +-
 tools/Makefile.win  | 2 +-
 6 files changed, 7 insertions(+), 17 deletions(-)

diff --git a/libs/libc/Makefile b/libs/libc/Makefile
index f4b6cea..de648dc 100644
--- a/libs/libc/Makefile
+++ b/libs/libc/Makefile
@@ -38,11 +38,7 @@
 # CFLAGS
 
 ifneq ($(CONFIG_BUILD_FLAT),y)
-ifeq ($(CONFIG_WINDOWS_NATIVE),y)
-  KDEFINE = ${shell $(TOPDIR)\tools\define.bat "$(CC)" __KERNEL__}
-else
-  KDEFINE = ${shell $(TOPDIR)/tools/define.sh "$(CC)" __KERNEL__}
-endif
+  KDEFINE = ${shell $(DEFINE) "$(CC)" __KERNEL__}
 endif
 
 # Sources and paths
diff --git a/libs/libnx/Makefile b/libs/libnx/Makefile
index c0109dc..cdf9b4f 100644
--- a/libs/libnx/Makefile
+++ b/libs/libnx/Makefile
@@ -38,11 +38,7 @@
 # CFLAGS
 
 ifneq ($(CONFIG_BUILD_FLAT),y)
-ifeq ($(CONFIG_WINDOWS_NATIVE),y)
-  KDEFINE = ${shell $(TOPDIR)\tools\define.bat "$(CC)" __KERNEL__}
-else
-  KDEFINE = ${shell $(TOPDIR)/tools/define.sh "$(CC)" __KERNEL__}
-endif
+  KDEFINE = ${shell $(DEFINE) "$(CC)" __KERNEL__}
 endif
 
 # Sources and paths
diff --git a/mm/Makefile b/mm/Makefile
index bc4ce9a..7f1dbcf 100644
--- a/mm/Makefile
+++ b/mm/Makefile
@@ -41,11 +41,7 @@ DELIM := $(strip /)
 # CFLAGS
 
 ifneq ($(CONFIG_BUILD_FLAT),y)
-ifeq ($(CONFIG_WINDOWS_NATIVE),y)
-  KDEFINE = ${shell $(TOPDIR)\tools\define.bat "$(CC)" __KERNEL__}
-else
-  KDEFINE = ${shell $(TOPDIR)/tools/define.sh "$(CC)" __KERNEL__}
-endif
+  KDEFINE = ${shell $(DEFINE) "$(CC)" __KERNEL__}
 endif
 
 # Sources and paths
diff --git a/tools/Config.mk b/tools/Config.mk
index 2a45f5b..0f62128 100644
--- a/tools/Config.mk
+++ b/tools/Config.mk
@@ -93,8 +93,10 @@ endif
 #   CONFIG_WINDOWS_NATIVE - Defined for a Windows native build
 
 ifeq ($(CONFIG_WINDOWS_NATIVE),y)
+  DEFINE = "$(TOPDIR)\tools\define.bat"
   INCDIR = "$(TOPDIR)\tools\incdir.bat"
 else
+  DEFINE = "$(TOPDIR)/tools/define.sh"
   INCDIR = "$(TOPDIR)/tools/incdir.sh"
 endif
 
diff --git a/tools/Makefile.unix b/tools/Makefile.unix
index 917ea0d..cb4c0cc 100644
--- a/tools/Makefile.unix
+++ b/tools/Makefile.unix
@@ -81,7 +81,7 @@ endif
 # This define is passed as EXTRADEFINES for kernel-mode builds.  It is also passed
 # during PASS1 (but not PASS2) context and depend targets.
 
-KDEFINE = ${shell $(TOPDIR)/tools/define.sh "$(CC)" __KERNEL__}
+KDEFINE = ${shell $(DEFINE) "$(CC)" __KERNEL__}
 
 # Process architecture and board-specific directories
 
diff --git a/tools/Makefile.win b/tools/Makefile.win
index 6ef5bdc..be4fd82 100644
--- a/tools/Makefile.win
+++ b/tools/Makefile.win
@@ -66,7 +66,7 @@ endif
 # This define is passed as EXTRADEFINES for kernel-mode builds.  It is also passed
 # during PASS1 (but not PASS2) context and depend targets.
 
-KDEFINE = ${shell $(TOPDIR)\tools\define.bat "$(CC)" __KERNEL__}
+KDEFINE = ${shell $(DEFINE) "$(CC)" __KERNEL__}
 
 # Process architecture and board-specific directories