]> Savannah Git Hosting - gnulib.git/commitdiff
bootstrap: die when some submodules are not initialized
authorAkim Demaille <akim.demaille@gmail.com>
Mon, 31 Dec 2018 18:20:46 +0000 (19:20 +0100)
committerAkim Demaille <akim.demaille@gmail.com>
Fri, 4 Jan 2019 17:17:08 +0000 (18:17 +0100)
* build-aux/bootstrap: Make sure all submodules are initialized.

ChangeLog
build-aux/bootstrap

index f520d5e72d715b613f93734f245890a830774744..6aa873cf7c24eb219be1f3aded3aa9e59394027e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2019-01-04  Akim Demaille  <akim@lrde.epita.fr>
+
+       bootstrap: die when some submodules are not initialized
+       * build-aux/bootstrap: Make sure all submodules are initialized.
+
 2019-01-04  Bruno Haible  <bruno@clisp.org>
 
        bitsetv: Fix module dependencies.
index c13b486c57f0731e19e501649261b48c0b7ed37c..5b08e7e2d421c0227598813ae65f35b9c22cfcb3 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Print a version string.
-scriptversion=2018-10-13.05; # UTC
+scriptversion=2019-01-04.17; # UTC
 
 # Bootstrap this package from checked-out sources.
 
@@ -963,6 +963,16 @@ fi
 bootstrap_post_import_hook \
   || die "bootstrap_post_import_hook failed"
 
+# Don't proceed if there are uninitialized submodules.  In particular,
+# the next step will remove dangling links, which might be links into
+# uninitialized submodules.
+#
+# Uninitialized submodules are listed with an initial dash.
+if $use_git && git submodule | grep '^-' >/dev/null; then
+  die "some git submodules are not initialized. "     \
+      "Run 'git submodule init' and bootstrap again."
+fi
+
 # Remove any dangling symlink matching "*.m4" or "*.[ch]" in some
 # gnulib-populated directories.  Such .m4 files would cause aclocal to fail.
 # The following requires GNU find 4.2.3 or newer.  Considering the usual