[Xcb-commit] xcb/util-cursor: autogen.sh
Arnaud Fontaine
arnau at kemper.freedesktop.org
Wed Jan 29 00:10:25 PST 2014
autogen.sh | 15 +++++++++++++++
1 file changed, 15 insertions(+)
New commits:
commit a08bbf0e20995d29cbf890957c898059d4a9ece2
Author: Niclas Zeising <zeising at daemonic.se>
Date: Mon Aug 12 13:53:10 2013 +0200
Check submodules before running autoconf.
Exit early with an informative message if the submodules are missing,
since they are needed. Without this autoconf throws a bunch of
uninformative errors which does not point to the actual problem.
This was taken from util-keysyms.
Signed-off-by: Niclas Zeising <zeising at daemonic.se>
Reviewed-By: Arnaud Fontaine <arnau at debian.org>
diff --git a/autogen.sh b/autogen.sh
index 904cd67..afe5299 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -6,6 +6,21 @@ test -z "$srcdir" && srcdir=.
ORIGDIR=`pwd`
cd $srcdir
+# If this is a git checkout, verify that the submodules are initialized,
+# otherwise autotools will just fail with an unhelpful error message.
+if [ -d ".git" ] && [ -r ".gitmodules" ]
+then
+ # If git is not in PATH, this will not return 0, thus not keeping us
+ # from building. Since the message is worthless when git is not
+ # installed, this is what we want.
+ if git submodule status 2>/dev/null | grep -q '^-'
+ then
+ echo "You have uninitialized git submodules." >&2
+ echo "Please run: git submodule update --init" >&2
+ exit 1
+ fi
+fi
+
autoreconf -v --install || exit 1
cd $ORIGDIR || exit $?
More information about the xcb-commit
mailing list