You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/11/16 04:52:00 UTC
[incubator-nuttx] branch master updated: tools: fix errors when executing indir
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new bcefa2f0a2 tools: fix errors when executing indir
bcefa2f0a2 is described below
commit bcefa2f0a20b3aed0b6a10c1dcbf47d222c2bcdf
Author: yinshengkai <yi...@xiaomi.com>
AuthorDate: Tue Nov 8 11:05:12 2022 +0800
tools: fix errors when executing indir
fix the error message when executing make -C nuttx/tools -f Makefile.host clean
/bin/sh: 1: nuttx/tools/../tools/incdir: not found
Signed-off-by: yinshengkai <yi...@xiaomi.com>
---
tools/Config.mk | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/tools/Config.mk b/tools/Config.mk
index 2466f1fbde..d954fded34 100644
--- a/tools/Config.mk
+++ b/tools/Config.mk
@@ -121,6 +121,12 @@ else
DELIM ?= $(strip /)
endif
+ifeq ($(CONFIG_WINDOWS_NATIVE),y)
+ EMPTYFILE := "NUL"
+else
+ EMPTYFILE := "/dev/null"
+endif
+
# Process chip-specific directories
ifeq ($(CONFIG_ARCH_CHIP_CUSTOM),y)
@@ -583,9 +589,9 @@ $(1)_$(2):
endef
-export DEFINE_PREFIX := $(subst X,,${shell $(DEFINE) "$(CC)" "X"})
-export INCDIR_PREFIX := $(subst "X",,${shell $(INCDIR) "$(CC)" "X"})
-export INCSYSDIR_PREFIX := $(subst "X",,${shell $(INCDIR) -s "$(CC)" "X"})
+export DEFINE_PREFIX ?= $(subst X,,${shell $(DEFINE) "$(CC)" "X" 2> ${EMPTYFILE}})
+export INCDIR_PREFIX ?= $(subst "X",,${shell $(INCDIR) "$(CC)" "X" 2> ${EMPTYFILE}})
+export INCSYSDIR_PREFIX ?= $(subst "X",,${shell $(INCDIR) -s "$(CC)" "X" 2> ${EMPTYFILE}})
# ARCHxxx means the predefined setting(either toolchain, arch, or system specific)
ARCHDEFINES += ${DEFINE_PREFIX}__NuttX__