tools:fix some error use of shell command in Windows native build

This commit is contained in:
zouboan 2022-11-05 18:19:01 +08:00 committed by Xiang Xiao
parent 5edb9141e4
commit 12f57bd9b2
4 changed files with 17 additions and 9 deletions

View File

@ -30,13 +30,6 @@ ifeq ($(wildcard .config),)
else
include .config
# Build any necessary tools needed early in the build.
# incdir - Is needed immediately by all Make.defs file.
TOPDIR := ${shell echo $(CURDIR) | sed -e 's/ /\\ /g'}
DUMMY := ${shell $(MAKE) -C tools -f Makefile.host incdir \
INCDIR="$(TOPDIR)/tools/incdir.sh"}
# Include the correct Makefile for the selected architecture.
ifeq ($(CONFIG_WINDOWS_NATIVE),y)

View File

@ -19,6 +19,13 @@
############################################################################
export TOPDIR := ${shell echo $(CURDIR) | sed -e 's/ /\\ /g'}
# Build any necessary tools needed early in the build.
# incdir - Is needed immediately by all Make.defs file.
DUMMY := ${shell $(MAKE) -C tools -f Makefile.host incdir \
INCDIR="$(TOPDIR)/tools/incdir.sh"}
include $(TOPDIR)/Make.defs
# GIT directory present

View File

@ -21,6 +21,13 @@
export SHELL=cmd
export TOPDIR := ${shell echo %CD%}
# Build any necessary tools needed early in the build.
# incdir - Is needed immediately by all Make.defs file.
DUMMY := ${shell $(MAKE) -C tools -f Makefile.host incdir \
INCDIR="$(TOPDIR)\tools\incdir.bat"}
include $(TOPDIR)\Make.defs
-include $(TOPDIR)\.version
@ -53,7 +60,7 @@ APPDIR := $(realpath ${shell if exist "$(CONFIG_APPS_DIR)\Makefile" echo $(CONFI
# so that main Kconfig can find it. Otherwise, we redirect it to a dummy Kconfig
# This is due to kconfig inability to do conditional inclusion.
EXTERNALDIR := $(shell if [ -r $(TOPDIR)\external\Kconfig ]; then echo 'external'; else echo 'dummy'; fi)
EXTERNALDIR := ${shell if exist "$(TOPDIR)\external\Kconfig" (echo external) else (echo dummy)}
# CONTEXTDIRS include directories that have special, one-time pre-build
# requirements. Normally this includes things like auto-generation of

View File

@ -127,7 +127,7 @@ static enum os_e get_os(char *ccname)
#else
struct utsname buf;
int ret;
/* Get the context names */
ret = uname(&buf);
@ -169,6 +169,7 @@ static enum os_e get_os(char *ccname)
fprintf(stderr, "ERROR: Unknown operating system: %s\n",
buf.sysname);
}
#endif
return OS_UNKNOWN;
}