diff options
author | Peter Rosin <peda@lysator.liu.se> | 2012-12-28 23:13:17 +0100 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2012-12-31 15:27:34 -0700 |
commit | 258a23681fb0e3c6b6031b5dfe049cac0c4a6836 (patch) | |
tree | 32417314aa8366c51c2feccde972403593d5563c /top | |
parent | cb83c6cb603abfa9cd8945013226e17c894309f2 (diff) | |
download | gnulib-258a23681fb0e3c6b6031b5dfe049cac0c4a6836.tar.gz |
maint.mk: handle missing git with more grace
* top/maint.mk (no-submodule-changes, public-submodule-commit): Quietly
proceed if git is not present.
Copyright-paperwork-exempt: yes
Signed-off-by: Peter Rosin <peda@lysator.liu.se>
Diffstat (limited to 'top')
-rw-r--r-- | top/maint.mk | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/top/maint.mk b/top/maint.mk index 93c2508ecc..28a84aeacc 100644 --- a/top/maint.mk +++ b/top/maint.mk @@ -1370,7 +1370,8 @@ endef .PHONY: no-submodule-changes no-submodule-changes: - $(AM_V_GEN)if test -d $(srcdir)/.git; then \ + $(AM_V_GEN)if test -d $(srcdir)/.git \ + && git --version >/dev/null 2>&1; then \ diff=$$(cd $(srcdir) && git submodule -q foreach \ git diff-index --name-only HEAD) \ || exit 1; \ @@ -1388,7 +1389,8 @@ submodule-checks ?= no-submodule-changes public-submodule-commit # cannot be built from a fresh clone. .PHONY: public-submodule-commit public-submodule-commit: - $(AM_V_GEN)if test -d $(srcdir)/.git; then \ + $(AM_V_GEN)if test -d $(srcdir)/.git \ + && git --version >/dev/null 2>&1; then \ cd $(srcdir) && \ git submodule --quiet foreach \ test '"$$(git rev-parse "$$sha1")"' \ |