maintainer-makefile: work with older git for submodule check
authorEric Blake <eblake@redhat.com>
Fri, 21 Jan 2011 22:33:29 +0000 (15:33 -0700)
committerEric Blake <eblake@redhat.com>
Fri, 21 Jan 2011 22:33:29 +0000 (15:33 -0700)
* top/maint.mk (public-submodule-commit): Rewrite to avoid
merge-base --independent, which Ubuntu 10.04 git 1.7.0.4 lacks.
Reported by Matthias Bolte.

Signed-off-by: Eric Blake <eblake@redhat.com>
ChangeLog
top/maint.mk

index 8d0b220..c72b3d8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2011-01-21  Eric Blake  <eblake@redhat.com>
 
+       maintainer-makefile: work with older git for submodule check
+       * top/maint.mk (public-submodule-commit): Rewrite to avoid
+       merge-base --independent, which Ubuntu 10.04 git 1.7.0.4 lacks.
+       Reported by Matthias Bolte.
+
        bootstrap: minor portability fixes
        * build-aux/bootstrap (me): Use $me instead of $0 in functions.
        (usage): Omit leading capital and trailing . on help phrases, per
index d2af3ad..5915814 100644 (file)
@@ -1127,8 +1127,8 @@ submodule-checks ?= no-submodule-changes public-submodule-commit
 public-submodule-commit:
        $(AM_V_GEN)if test -d $(srcdir)/.git; then                      \
          cd $(srcdir) &&                                               \
-         git submodule --quiet foreach 'test $$(git rev-parse origin)' \
-             = '"$$(git merge-base --independent origin $$sha1)"'      \
+         git submodule --quiet foreach test '$$(git rev-parse $$sha1)' \
+             = '$$(git merge-base origin $$sha1)'                      \
            || { echo '$(ME): found non-public submodule commit' >&2;   \
                 exit 1; };                                             \
        else                                                            \