summaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2023-01-01 16:08:35 -0500
committerPaul Smith <psmith@gnu.org>2023-01-01 17:05:12 -0500
commitc580ebae8df0b1235b9287a59b9a3ab8c2bf9dfe (patch)
treefec3e0511aadb2258887117b80b6f265dfcc2025 /bootstrap
parent56d297814145d1a2ed9d2ab0e120759d47778c24 (diff)
downloadmake-git-c580ebae8df0b1235b9287a59b9a3ab8c2bf9dfe.tar.gz
Update to the latest gnulib stable branch
* bootstrap.conf: Request the latest gnulib stable branch. * README.git: Recommend the argument form of autogen/autopull. * bootstrap: Import the latest version of bootstrap. * bootstrap-funclib.sh: Ditto. * autogen.sh: Ditto. * autopull.sh: Ditto.
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap48
1 files changed, 30 insertions, 18 deletions
diff --git a/bootstrap b/bootstrap
index cf8d007f..74af1b7e 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,7 +1,9 @@
#! /bin/sh
# Bootstrap this package from checked-out sources.
-# Copyright (C) 2003-2022 Free Software Foundation, Inc.
+scriptversion=2022-12-27.07; # UTC
+
+# Copyright (C) 2003-2023 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -26,8 +28,6 @@
# Please report bugs or propose patches to bug-gnulib@gnu.org.
-scriptversion=2022-07-29.23; # UTC
-
me="$0"
medir=`dirname "$me"`
@@ -48,6 +48,11 @@ Optional environment variables:
GNULIB_URL Cloneable URL of the gnulib repository.
Options:
+
+ --pull Do phase 1: pull files from network
+ --gen Do phase 2: generate from local files.
+ (The default is to do both phases.)
+
--gnulib-srcdir=DIRNAME specify the local directory where gnulib
sources reside. Use this if you already
have gnulib sources on your machine, and
@@ -59,11 +64,13 @@ Options:
and history on your machine, and do not want
to waste your bandwidth downloading them again.
Defaults to \$GNULIB_REFDIR
+
--bootstrap-sync if this bootstrap script is not identical to
the version in the local gnulib sources,
update this script, and then restart it with
/bin/sh or the shell \$CONFIG_SHELL
--no-bootstrap-sync do not check whether bootstrap is out of sync
+
--copy copy files instead of creating symbolic links
--force attempt to bootstrap even if the sources seem
not to have been checked out
@@ -118,6 +125,10 @@ EOF
# Parse options.
+# Whether to pull and generate.
+pull=false
+gen=false
+
# Whether to use copies instead of symlinks.
copy=false
@@ -132,10 +143,14 @@ do
exit;;
--version)
set -e
- echo "bootstrap $scriptversion"
+ echo "bootstrap $scriptversion lib $scriptlibversion"
echo "$copyright"
exit 0
;;
+ --pull)
+ pull=true;;
+ --gen)
+ gen=true;;
--gnulib-srcdir=*)
GNULIB_SRCDIR=${option#--gnulib-srcdir=};;
--gnulib-refdir=*)
@@ -157,6 +172,9 @@ do
esac
done
+# Default is to do both.
+$pull || $gen || pull=true gen=true
+
$use_git || test -n "$GNULIB_SRCDIR" \
|| die "Error: --no-git requires \$GNULIB_SRCDIR environment variable or --gnulib-srcdir option"
test -z "$GNULIB_SRCDIR" || test -d "$GNULIB_SRCDIR" \
@@ -168,12 +186,6 @@ fi
check_build_prerequisites $use_git
-if ! test -f "$medir"/bootstrap-funclib.sh; then
- # We have only completed the first phase of an upgrade from a bootstrap
- # version < 2022-07-24. Need to do the second phase now.
- bootstrap_sync=true
-fi
-
if $bootstrap_sync; then
prepare_GNULIB_SRCDIR
upgrade_bootstrap
@@ -183,25 +195,25 @@ fi
echo "$0: Bootstrapping from checked-out $package sources..."
-# Pass GNULIB_SRCDIR to autopull.sh and autogen.sh.
+# Pass GNULIB_SRCDIR and GNULIB_REFDIR to any subsidiary commands that care.
export GNULIB_SRCDIR
-
-# Pass GNULIB_REFDIR to autopull.sh.
export GNULIB_REFDIR
-if $use_git || test -z "$SKIP_PO"; then
- "$medir"/autopull.sh \
+if $pull && { $use_git || test -z "$SKIP_PO"; }; then
+ autopull \
`if $bootstrap_sync; then echo ' --bootstrap-sync'; else echo ' --no-bootstrap-sync'; fi` \
`if test -z "$checkout_only_file"; then echo ' --force'; fi` \
`if ! $use_git; then echo ' --no-git'; fi` \
`if test -n "$SKIP_PO"; then echo ' --skip-po'; fi` \
- || die "autopull.sh failed."
+ || die "could not fetch auxiliary files"
fi
-"$medir"/autogen.sh \
+if $gen; then
+ autogen \
`if $copy; then echo ' --copy'; fi` \
`if test -z "$checkout_only_file"; then echo ' --force'; fi` \
- || die "autogen.sh failed."
+ || die "could not generate auxiliary files"
+fi
# ----------------------------------------------------------------------------