aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2018-10-26 22:14:50 +0200
committerRiccardo Spagni <ric@spagni.net>2018-10-26 22:14:50 +0200
commitaffab99b8aca1ad166b7bf937ba73e0a45f3730a (patch)
tree8f5237310be320864f76cc47ed2ffd3e83b61c08
parentMerge pull request #4697 (diff)
parentMakefile: fix building without a git tree (diff)
downloadmonero-affab99b8aca1ad166b7bf937ba73e0a45f3730a.tar.xz
Merge pull request #4715
9168fc9f Makefile: fix building without a git tree (moneromooo-monero)
-rw-r--r--Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 40b8839cc..f9270ebf2 100644
--- a/Makefile
+++ b/Makefile
@@ -28,6 +28,11 @@
ANDROID_STANDALONE_TOOLCHAIN_PATH ?= /usr/local/toolchain
+dotgit=$(shell ls -d .git/config)
+ifneq ($(dotgit), .git/config)
+ USE_SINGLE_BUILDDIR=1
+endif
+
subbuilddir:=$(shell echo `uname | sed -e 's|[:/\\ \(\)]|_|g'`/`git branch | grep '\* ' | cut -f2- -d' '| sed -e 's|[:/\\ \(\)]|_|g'`)
ifeq ($(USE_SINGLE_BUILDDIR),)
builddir := build/"$(subbuilddir)"