Skip to content

Commit

Permalink
build: Add support for MSYS2
Browse files Browse the repository at this point in the history
MSYS2 is a modern fork of Cygwin that is widely supported
and provides frequent releases and good support. It is
also the framework used by the official Windows Git port.
This patch adds MSYS2 support so that builds on Windows using
MSYS2 work properly.

Change-Id: Ia5743a410d1cff983a7aab37f8e3d8228cb8ae8e
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
  • Loading branch information
carlescufi committed Mar 17, 2017
1 parent efc68b4 commit 1436e44
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ endif
MAKEFLAGS += -rR --include-dir=$(CURDIR)

UNAME := $(shell uname)
ifeq (MINGW, $(findstring MINGW, $(UNAME)))
ifeq (MSYS, $(findstring MSYS, $(UNAME)))
DISABLE_TRYRUN=y
HOST_OS=MSYS
PWD_OPT=-W
else ifeq (MINGW, $(findstring MINGW, $(UNAME)))
HOST_OS=MINGW
PWD_OPT=-W
DISABLE_TRYRUN=y
Expand Down
4 changes: 2 additions & 2 deletions zephyr-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ fi
# zephyr-env_install.bash in your home directory. It will be automatically
# run (if it exists) by this script.

uname | grep -q MINGW && MINGW_OPT="-W"
uname | grep -q -P "MINGW|MSYS" && PWD_OPT="-W"

# identify OS source tree root directory
export ZEPHYR_BASE=$( builtin cd "$( dirname "$DIR" )" && pwd ${MINGW_OPT})
export ZEPHYR_BASE=$( builtin cd "$( dirname "$DIR" )" && pwd ${PWD_OPT})

scripts_path=${ZEPHYR_BASE}/scripts
scripts_path=$(echo "/$scripts_path" | sed 's/\\/\//g' | sed 's/://')
Expand Down

0 comments on commit 1436e44

Please sign in to comment.