[Xcb] [PATCH] autogen.sh: verify that git submodules are initialized

Josh Triplett josh at joshtriplett.org
Fri Oct 26 12:33:41 PDT 2012


On Fri, Oct 26, 2012 at 09:14:59PM +0200, Michael Stapelberg wrote:
> --- a/autogen.sh
> +++ b/autogen.sh
> @@ -6,6 +6,22 @@ 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 [ -e ".gitmodules" ]

The existence of .gitmodules does not guarantee a git checkout; a
tarred-up source tree or a snapshot from gitweb or git archive could
contain that file.  You might try [ -d .git ] && [ -r .gitmodules ], or
similar.

- Josh Triplett


More information about the Xcb mailing list