mingw: Use built-in pwd with -W option for mingw builds
The pwd for mingw has a different output to the pwd shell's built-in pwd. This change uses the built-in pwd for keep compatibilty with the path in mingw. Change-Id: I43d605157e19f661480e68ecbbd024c5f077e461 Signed-off-by: Louise Mendoza <yonattan.a.louise.mendoza@intel.com> Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
c1510f53dc
commit
0c3f05bcd7
2 changed files with 13 additions and 2 deletions
13
Makefile
13
Makefile
|
@ -19,6 +19,17 @@ export SOURCE_DIR PROJECT MDEF_FILE
|
||||||
# o Look for make include files relative to root of kernel src
|
# o Look for make include files relative to root of kernel src
|
||||||
MAKEFLAGS += -rR --include-dir=$(CURDIR)
|
MAKEFLAGS += -rR --include-dir=$(CURDIR)
|
||||||
|
|
||||||
|
UNAME := $(shell uname)
|
||||||
|
ifeq (MINGW, $(findstring MINGW, $(UNAME)))
|
||||||
|
HOST_OS=MINGW
|
||||||
|
PWD_OPT=-W
|
||||||
|
else ifeq (Linux, $(findstring Linux, $(UNAME)))
|
||||||
|
HOST_OS=Linux
|
||||||
|
else ifeq (Darwin, $(findstring Darwin, $(UNAME)))
|
||||||
|
HOST_OS=Darwin
|
||||||
|
endif
|
||||||
|
export HOST_OS
|
||||||
|
|
||||||
# Avoid funny character set dependencies
|
# Avoid funny character set dependencies
|
||||||
unexport LC_ALL
|
unexport LC_ALL
|
||||||
LC_COLLATE=C
|
LC_COLLATE=C
|
||||||
|
@ -140,7 +151,7 @@ ifneq ($(KBUILD_OUTPUT),)
|
||||||
# check that the output directory actually exists
|
# check that the output directory actually exists
|
||||||
saved-output := $(KBUILD_OUTPUT)
|
saved-output := $(KBUILD_OUTPUT)
|
||||||
KBUILD_OUTPUT := $(shell mkdir -p $(KBUILD_OUTPUT) && cd $(KBUILD_OUTPUT) \
|
KBUILD_OUTPUT := $(shell mkdir -p $(KBUILD_OUTPUT) && cd $(KBUILD_OUTPUT) \
|
||||||
&& /bin/pwd)
|
&& pwd $(PWD_OPT))
|
||||||
$(if $(KBUILD_OUTPUT),, \
|
$(if $(KBUILD_OUTPUT),, \
|
||||||
$(error failed to create output directory "$(saved-output)"))
|
$(error failed to create output directory "$(saved-output)"))
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ DQUOTE = "
|
||||||
|
|
||||||
ARCH ?= x86
|
ARCH ?= x86
|
||||||
|
|
||||||
PROJECT_BASE ?= $(shell pwd)
|
PROJECT_BASE ?= $(CURDIR)
|
||||||
O ?= $(PROJECT_BASE)/outdir
|
O ?= $(PROJECT_BASE)/outdir
|
||||||
|
|
||||||
# Turn O into an absolute path; we call the main Kbuild with $(MAKE) -C
|
# Turn O into an absolute path; we call the main Kbuild with $(MAKE) -C
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue