]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
bootstrap: be sure to register gnulib submodule.
authorGary V. Vaughan <gary@gnu.org>
Thu, 25 Oct 2012 14:00:09 +0000 (14:00 +0000)
committerGary V. Vaughan <gary@gnu.org>
Thu, 25 Oct 2012 14:00:09 +0000 (14:00 +0000)
* gl/build-aux/bootstrap.in (require_gnulib_submodule): Register
the gnulib submodule before updating it, even with a shallow
clone of gnulib.
* bootstrap: Regenerate.
Reported by Robert Boehne.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
bootstrap
gl/build-aux/bootstrap.in

index 656f152242259587b7d54c39c657198ef0fb20d7..d9fc979bd94625652d52fe837a982df27253be68 100755 (executable)
--- a/bootstrap
+++ b/bootstrap
@@ -3621,16 +3621,13 @@ func_require_gnulib_submodule ()
       $require_gnulib_url
 
       if test -f .gitmodules && test -f "$gnulib_path/gnulib-tool"; then
-        func_show_eval "$GIT submodule update" \
-            'func_fatal_error "Unable to update gnulib submodule."'
+        : All present and correct.
 
       elif test -n "$opt_gnulib_srcdir"; then
         # Older git can't clone into an empty directory.
         rmdir "$gnulib_path" 2>/dev/null
         func_show_eval "$GIT clone --reference '$opt_gnulib_srcdir' \
                 '$gnulib_url' '$gnulib_path'" \
-            && func_show_eval "$GIT submodule init" \
-            && func_show_eval "$GIT submodule update" \
             || func_fatal_error "Unable to fetch gnulib submodule."
 
       # Without --gnulib-srcdir, and no existing checked out submodule, we
@@ -3645,13 +3642,15 @@ func_require_gnulib_submodule ()
         func_show_eval "$GIT clone $shallow '$gnulib_url' '$gnulib_path'" \
           func_cleanup_gnulib
 
-        func_show_eval "$GIT submodule update" \
-            'func_fatal_error "Unable to update gnulib submodule."'
-
        # FIXME: Solaris /bin/sh will try to execute '-' if any of
        #        these signals are caught after this.
         trap - 1 2 13 15
       fi
+
+      # Make sure we've checked out the correct revision of gnulib.
+      func_show_eval "$GIT submodule init" \
+          && func_show_eval "$GIT submodule update" \
+          ||  func_fatal_error "Unable to update gnulib submodule."
     fi
 
     require_gnulib_submodule=:
index 130c5f7c1c6159e3035fe519f291835adc9e4a0b..7df66b1074409f9565499b6851267c80b9978044 100755 (executable)
@@ -1431,16 +1431,13 @@ func_require_gnulib_submodule ()
       $require_gnulib_url
 
       if test -f .gitmodules && test -f "$gnulib_path/gnulib-tool"; then
-        func_show_eval "$GIT submodule update" \
-            'func_fatal_error "Unable to update gnulib submodule."'
+        : All present and correct.
 
       elif test -n "$opt_gnulib_srcdir"; then
         # Older git can't clone into an empty directory.
         rmdir "$gnulib_path" 2>/dev/null
         func_show_eval "$GIT clone --reference '$opt_gnulib_srcdir' \
                 '$gnulib_url' '$gnulib_path'" \
-            && func_show_eval "$GIT submodule init" \
-            && func_show_eval "$GIT submodule update" \
             || func_fatal_error "Unable to fetch gnulib submodule."
 
       # Without --gnulib-srcdir, and no existing checked out submodule, we
@@ -1455,13 +1452,15 @@ func_require_gnulib_submodule ()
         func_show_eval "$GIT clone $shallow '$gnulib_url' '$gnulib_path'" \
           func_cleanup_gnulib
 
-        func_show_eval "$GIT submodule update" \
-            'func_fatal_error "Unable to update gnulib submodule."'
-
        # FIXME: Solaris /bin/sh will try to execute '-' if any of
        #        these signals are caught after this.
         trap - 1 2 13 15
       fi
+
+      # Make sure we've checked out the correct revision of gnulib.
+      func_show_eval "$GIT submodule init" \
+          && func_show_eval "$GIT submodule update" \
+          ||  func_fatal_error "Unable to update gnulib submodule."
     fi
 
     require_gnulib_submodule=: