summaryrefslogtreecommitdiffstatshomepage
path: root/makefile
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2016-01-01 12:27:34 +0100
committer Miodrag Milanovic <mmicko@gmail.com>2016-01-01 12:27:34 +0100
commit9cd42de78ba4a1f3edb3681299123a0ac8988085 (patch)
tree567a3efdda69c791c9b8a91a89809b34fd05a99b /makefile
parent729d3d3f165e9c801b7bbb92356691cbc80f849c (diff)
make compiler detection works under posix windows environments (nw)
Diffstat (limited to 'makefile')
-rw-r--r--makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/makefile b/makefile
index 3bdae2cbe40..439aa5f31d5 100644
--- a/makefile
+++ b/makefile
@@ -761,9 +761,15 @@ endif
ifeq ($(OS),windows)
+ifeq (posix,$(SHELLTYPE))
+GCC_VERSION := $(shell $(subst @,,$(CC)) -dumpversion 2> /dev/null)
+CLANG_VERSION := $(shell $(subst @,,$(CC)) --version 2> /dev/null| head -n 1 | grep clang | sed "s/^.*[^0-9]\([0-9]*\.[0-9]*\.[0-9]*\).*$$/\1/" | head -n 1)
+PYTHON_AVAILABLE := $(shell $(PYTHON) --version > /dev/null 2>&1 && echo python)
+else
GCC_VERSION := $(shell $(subst @,,$(CC)) -dumpversion 2> NUL)
CLANG_VERSION := $(shell $(subst @,,$(CC)) --version 2> NUL| head -n 1 | grep clang | sed "s/^.*[^0-9]\([0-9]*\.[0-9]*\.[0-9]*\).*$$/\1/" | head -n 1)
PYTHON_AVAILABLE := $(shell $(PYTHON) --version > NUL 2>&1 && echo python)
+endif
ifdef MSBUILD
MSBUILD_PARAMS := /v:minimal /m:$(NUMBER_OF_PROCESSORS)
ifeq ($(CONFIG),debug)