Skip to content

Commit

Permalink
tools: fix errors when executing indir
Browse files Browse the repository at this point in the history
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 <yinshengkai@xiaomi.com>
  • Loading branch information
Gary-Hobson authored and xiaoxiang781216 committed Nov 16, 2022
1 parent 6153579 commit bcefa2f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tools/Config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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__
Expand Down

0 comments on commit bcefa2f

Please sign in to comment.