Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrés G. Aragoneses <knocte@gmail.com>2016-05-09 15:15:54 +0300
committerAndrés G. Aragoneses <knocte@gmail.com>2016-05-09 15:15:54 +0300
commitd4d1707fce3e158a8a982c044395e6b49cedcb40 (patch)
treea42f0e1a0206b5399e42306f18ce88477422ed57 /Makefile
parentef279bca6d62873e8e50e6f251b533ad4f761155 (diff)
[build] Bail out early if `git` is not installed
Otherwise typing `make` would fail with this error: ``` $ make if test -d ".git"; then \ git submodule sync; \ git submodule update --init --recursive || exit 1; \ fi /bin/sh: 2: git: not found /bin/sh: 3: git: not found Makefile:12: recipe for target 'update_submodules' failed make: *** [update_submodules] Error 1 ```
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index b40350491f..c13049636e 100644
--- a/Makefile
+++ b/Makefile
@@ -8,12 +8,20 @@ MONO_AOT:=MONO_PATH=$(AOT_DIRECTORIES):$(MONO_PATH) mono --aot --debug
all: update_submodules all-recursive
-update_submodules:
+GIT_FOUND = $$(echo $$(which git))
+SYNC_SUBMODULES = \
if test -d ".git"; then \
+ if [ "x$(GIT_FOUND)" = "x" ]; then \
+ echo "git not found; please install it first"; \
+ exit 1; \
+ fi; \
git submodule sync; \
git submodule update --init --recursive || exit 1; \
fi
+update_submodules:
+ @$(SYNC_SUBMODULES)
+
top_srcdir=.
include $(top_srcdir)/config.make