summaryrefslogtreecommitdiffstatshomepage
path: root/makefile
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2016-04-16 10:19:59 +0200
committer Miodrag Milanovic <mmicko@gmail.com>2016-04-16 10:19:59 +0200
commit6bb33aa52c4e02989519f9dc04d11a94df76fd3e (patch)
tree31cbf91aa6e8d47b277ccd7478cd84b939520d7a /makefile
parent942472ea224e9cd0c4dff6a3abe0c4c331fc314b (diff)
Add short git version if building non-release build, also if git command is not available or if .git is not there (so building out of other sources) (nw)
Diffstat (limited to 'makefile')
-rw-r--r--makefile10
1 files changed, 10 insertions, 0 deletions
diff --git a/makefile b/makefile
index df813945c4c..3488a7a106d 100644
--- a/makefile
+++ b/makefile
@@ -823,10 +823,12 @@ ifeq (posix,$(SHELLTYPE))
GCC_VERSION := $(shell $(TOOLCHAIN)$(subst @,,$(CC)) -dumpversion 2> /dev/null)
CLANG_VERSION := $(shell $(TOOLCHAIN)$(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)
+GIT_AVAILABLE := $(shell git --version > /dev/null 2>&1 && echo git)
else
GCC_VERSION := $(shell $(TOOLCHAIN)$(subst @,,$(CC)) -dumpversion 2> NUL)
CLANG_VERSION := $(shell $(TOOLCHAIN)$(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)
+GIT_AVAILABLE := $(shell git --version > NUL 2>&1 && echo git)
endif
ifdef MSBUILD
MSBUILD_PARAMS := /v:minimal /m:$(NUMBER_OF_PROCESSORS)
@@ -847,6 +849,7 @@ ifneq ($(OS),solaris)
CLANG_VERSION := $(shell $(TOOLCHAIN)$(subst @,,$(CC)) --version 2> /dev/null | head -n 1 | grep -e 'version [0-9]\.[0-9]\(\.[0-9]\)\?' -o | grep -e '[0-9]\.[0-9]\(\.[0-9]\)\?' -o | tail -n 1)
endif
PYTHON_AVAILABLE := $(shell $(PYTHON) --version > /dev/null 2>&1 && echo python)
+GIT_AVAILABLE := $(shell git --version > /dev/null 2>&1 && echo git)
endif
ifeq ($(CLANG_VERSION),)
@@ -866,6 +869,13 @@ ifneq ($(PYTHON_AVAILABLE),python)
$(error Python is not available in path)
endif
+ifneq ($(GIT_AVAILABLE),git)
+PARAMS += --IGNORE_GIT='1'
+endif
+ifeq ($(wildcard .git/*),)
+PARAMS += --IGNORE_GIT='1'
+endif
+
GENIE := 3rdparty/genie/bin/$(GENIEOS)/genie$(EXE)
ifeq ($(TARGET),$(SUBTARGET))