aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2021-01-22 15:08:20 -0500
committerluigi1111 <luigi1111w@gmail.com>2021-01-22 15:08:20 -0500
commit42fba21c6bd03b60d0c57000ade352eee0a0cc3d (patch)
tree08247720b0936ec2d61599131271415dc4356547
parent04e3ac92004a3a9f3400c45589702fdbf5f6e7ac (diff)
parent83bb7a9297f2ca2e7d2eccb92c17da610608ebf0 (diff)
downloadmonzero-gui-42fba21c6bd03b60d0c57000ade352eee0a0cc3d.tar.gz
monzero-gui-42fba21c6bd03b60d0c57000ade352eee0a0cc3d.tar.xz
monzero-gui-42fba21c6bd03b60d0c57000ade352eee0a0cc3d.zip
Merge pull request #3306
83bb7a9 Makefile: support USE_SINGLE_BUILDDIR=OFF without git installed (xiphon)
-rw-r--r--Makefile16
1 files changed, 11 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 01aa7189..6beedabb 100644
--- a/Makefile
+++ b/Makefile
@@ -2,8 +2,12 @@ ANDROID_STANDALONE_TOOLCHAIN_PATH ?= /usr/local/toolchain
MANUAL_SUBMODULES ?= OFF
dotgit=$(shell ls -d .git/config)
-ifneq ($(dotgit), .git/config)
- USE_SINGLE_BUILDDIR=1
+ifeq ($(dotgit), .git/config)
+ ifeq ($(shell git --version > /dev/null 2>&1 ; echo $$?), 0)
+ git = yes
+ else
+ $(warning git command not found)
+ endif
endif
builddir := build
@@ -13,9 +17,11 @@ ifeq ($(USE_SINGLE_BUILDDIR), OFF)
builddir := $(builddir)/$(os)
topdir := $(topdir)/..
- branch:=$(shell git branch | grep '\* ' | cut -f2- -d' '| sed -e 's|[:/\\ \(\)]|_|g')
- builddir := $(builddir)/$(branch)
- topdir := $(topdir)/..
+ ifdef git
+ branch := $(shell git branch | grep '\* ' | cut -f2- -d' '| sed -e 's|[:/\\ \(\)]|_|g')
+ builddir := $(builddir)/$(branch)
+ topdir := $(topdir)/..
+ endif
deldirs := $(builddir)
else