From 3f17e4d8dbe8717ff6f915df9a13cb3371b2388f Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Fri, 2 Jun 2017 11:32:40 +0200 Subject: [PATCH] AX_SUBMODULE: only check submodule status in git repository Commit 5bd2d70c3d (AX_SUBMODULE: allow .git file in submodule, Wed Dec 4 16:03:53 2013 +0100) changed the way an initialized submodule is detected, but it did so in a way that can only be applied when the toplevel is a git repository. Applied it outside a git repository does not affect the outcome, but it does result in the error message "fatal: Not a git repository (or any of the parent directories): .git". Only perform this check after checking that the toplevel is a git repository. Signed-off-by: Sven Verdoolaege --- m4/ax_submodule.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/m4/ax_submodule.m4 b/m4/ax_submodule.m4 index 8129312..1f00f6f 100644 --- a/m4/ax_submodule.m4 +++ b/m4/ax_submodule.m4 @@ -45,14 +45,14 @@ $3) case "$4" in bundled) if test -d $srcdir/.git -a \ - -d $srcdir/$1 -a \ + -d $srcdir/$1 -a; then if \ "`cd $srcdir; git submodule status $1 | cut -c1`" = '-'; then AC_MSG_WARN([git repo detected, but submodule $1 not initialized]) AC_MSG_WARN([You may want to run]) AC_MSG_WARN([ git submodule init]) AC_MSG_WARN([ git submodule update]) AC_MSG_WARN([ sh autogen.sh]) - fi + fi fi if test -f $srcdir/$1/configure; then with_$2="bundled" else -- 2.11.4.GIT