diff options
author | Niclas Zeising <zeising@daemonic.se> | 2013-08-12 13:53:10 +0200 |
---|---|---|
committer | Arnaud Fontaine <arnau@debian.org> | 2014-01-29 15:43:18 +0900 |
commit | c3d61ece8098ec3f1b3f5c3f8c5c95f2a5c3c0f7 (patch) | |
tree | 182b26024bc43b63d70a91595e77fdf43de58ef1 | |
parent | c33a20fa5876e96c5ec6ec882b681379f145a66e (diff) | |
download | util-wm-c3d61ece8098ec3f1b3f5c3f8c5c95f2a5c3c0f7.tar.gz |
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@daemonic.se>
Reviewed-By: Arnaud Fontaine <arnau@debian.org>
-rwxr-xr-x | autogen.sh | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -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 $? |