diff options
| author | xiphon <xiphon@protonmail.com> | 2020-11-15 02:37:10 +0000 |
|---|---|---|
| committer | xiphon <xiphon@protonmail.com> | 2021-01-14 23:21:33 +0000 |
| commit | 83bb7a9297f2ca2e7d2eccb92c17da610608ebf0 (patch) | |
| tree | f7559a8fe2666831ddff792af683d9b35947792c /Makefile | |
| parent | 3ca5f10fa8ce901a94188d4c76c5e5e8e8bf3ff2 (diff) | |
| download | monzero-gui-83bb7a9297f2ca2e7d2eccb92c17da610608ebf0.tar.gz monzero-gui-83bb7a9297f2ca2e7d2eccb92c17da610608ebf0.tar.xz monzero-gui-83bb7a9297f2ca2e7d2eccb92c17da610608ebf0.zip | |
Makefile: support USE_SINGLE_BUILDDIR=OFF without git installed
# Conflicts:
# Makefile
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -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 |
