summaryrefslogtreecommitdiff
path: root/build-aux/bootstrap
diff options
context:
space:
mode:
authorAkim Demaille <akim.demaille@gmail.com>2018-12-31 19:20:46 +0100
committerAkim Demaille <akim.demaille@gmail.com>2019-01-04 18:17:08 +0100
commitce6b5cfac8dc60297d433bc868d32469dc06c36d (patch)
tree77857a257beed3674f226be234fe986cc20ab9d5 /build-aux/bootstrap
parent3df8b9400cc16e660547d689ad430c3580bfab6b (diff)
downloadgnulib-ce6b5cfac8dc60297d433bc868d32469dc06c36d.tar.gz
bootstrap: die when some submodules are not initialized
* build-aux/bootstrap: Make sure all submodules are initialized.
Diffstat (limited to 'build-aux/bootstrap')
-rwxr-xr-xbuild-aux/bootstrap12
1 files changed, 11 insertions, 1 deletions
diff --git a/build-aux/bootstrap b/build-aux/bootstrap
index c13b486c57..5b08e7e2d4 100755
--- a/build-aux/bootstrap
+++ b/build-aux/bootstrap
@@ -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