[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 1/2] maint.mk: handle missing git with more grace
From: |
Peter Rosin |
Subject: |
[PATCH v5 1/2] maint.mk: handle missing git with more grace |
Date: |
Sat, 29 Dec 2012 00:45:06 +0100 |
* 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 <address@hidden>
---
top/maint.mk | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/top/maint.mk b/top/maint.mk
index 93c2508..28a84ae 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")"' \
--
1.7.9
- Re: git-version-gen w/o git, (continued)
- [PATCH v3 1/2] maint.mk: handle missing git with more grace, Peter Rosin, 2012/12/28
- [PATCH v3 2/2] git-version-gen: add --fallback option to use if git is not present, Peter Rosin, 2012/12/28
- Re: git-version-gen w/o git, Peter Rosin, 2012/12/28
- [PATCH v5 1/2] maint.mk: handle missing git with more grace,
Peter Rosin <=
- [PATCH v5 2/2] git-version-gen: add --fallback option to use if git is not present, Peter Rosin, 2012/12/28
- Re: [PATCH v5 2/2] git-version-gen: add --fallback option to use if git is not present, Eric Blake, 2012/12/31
- Re: git-version-gen w/o git, Eric Blake, 2012/12/31
Re: git-version-gen w/o git, Bob Friesenhahn, 2012/12/27