[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ./bootstrap --gnulib-srcdir and GNULIB_REVISION
From: |
Bruno Haible |
Subject: |
Re: ./bootstrap --gnulib-srcdir and GNULIB_REVISION |
Date: |
Sat, 13 Apr 2024 19:54:40 +0200 |
Simon Josefsson wrote:
> My reaction was initially exactly the same as yours, until I found this
> piece of --help documentation, which actually is the first (and
> presumably highest priority) rule:
>
> * If the environment variable GNULIB_SRCDIR is set (either as an
> environment variable or via the --gnulib-srcdir option), then sources
> are fetched from that local directory. If it is a git repository and
> the configuration variable GNULIB_REVISION is set in bootstrap.conf,
> then that revision is checked out.
This piece of documentation is outdated. It also does not mention the
role of GNULIB_REFDIR. In the commit 2122284380cc0d1b3b6f11d92c04652616da79c7
<https://lists.gnu.org/archive/html/bug-gnulib/2022-07/msg00052.html>
I updated meant to update the --help string:
bootstrap: Obey another environment variable GNULIB_REFDIR.
* build-aux/bootstrap (usage): Document option --gnulib-refdir and
environment variable GNULIB_REFDIR.
but apparently botched it (maybe because I was developing this patch
concurrently with the next one, which created autopull and autogen).
As a first step, I'm correcting the --help strings, to match what I meant
to implement on 2022-07-24:
2024-04-13 Bruno Haible <bruno@clisp.org>
bootstrap: Fix --help messages.
Reported by Simon Josefsson in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00162.html>.
* top/bootstrap (usage): Fix the description of GNULIB_SRCDIR. Document
GNULIB_REFDIR. Use full-sentences style. Tweak wording.
* top/bootstrap-funclib.sh (autopull_usage): Clarify the phase. Don't
mention nonexistent options --gnulib-srcdir and --gnulib-refdir. Use
full-sentences style.
(autogen_usage): Clarify the phase. Use full-sentences style.
* build-aux/bootstrap: Regenerated.
diff --git a/build-aux/bootstrap b/build-aux/bootstrap
index 3173829dab..ef9161d75e 100755
--- a/build-aux/bootstrap
+++ b/build-aux/bootstrap
@@ -3,7 +3,7 @@
# Bootstrap this package from checked-out sources.
-scriptversion=2023-12-10.18; # UTC
+scriptversion=2024-04-13.15; # UTC
# Copyright (C) 2003-2024 Free Software Foundation, Inc.
#
@@ -37,7 +37,7 @@ medir=`dirname "$me"`
# A library of shell functions for autopull.sh, autogen.sh, and bootstrap.
-scriptlibversion=2023-12-10.18; # UTC
+scriptlibversion=2024-04-13.15; # UTC
# Copyright (C) 2003-2024 Free Software Foundation, Inc.
#
@@ -647,7 +647,8 @@ fi
autopull_usage() {
cat <<EOF
Usage: $me [OPTION]...
-Bootstrap this package from the checked-out sources.
+Bootstrap this package from the checked-out sources, phase 1:
+Pull files from the network.
Optional environment variables:
GNULIB_SRCDIR Specifies the local directory where gnulib
@@ -664,18 +665,19 @@ Optional environment variables:
which is Gnulib's upstream repository.
Options:
- --bootstrap-sync if this bootstrap script is not identical to
+
+ --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
- --force attempt to bootstrap even if the sources seem
- not to have been checked out
- --no-git do not use git to update gnulib. Requires that
- \$GNULIB_SRCDIR or the --gnulib-srcdir option
- points to a gnulib repository with the correct
- revision
- --skip-po do not download po files
+ /bin/sh or the shell \$CONFIG_SHELL.
+ --no-bootstrap-sync Do not check whether bootstrap is out of sync.
+
+ --force Attempt to bootstrap even if the sources seem
+ not to have been checked out.
+ --no-git Do not use git to update gnulib. Requires that
+ \$GNULIB_SRCDIR points to a gnulib repository
+ with the correct revision.
+ --skip-po Do not download *.po files.
EOF
bootstrap_print_option_usage_hook
cat <<EOF
@@ -687,17 +689,16 @@ are honored.
Gnulib sources can be fetched in various ways:
- * If the environment variable GNULIB_SRCDIR is set (either as an
- environment variable or via the --gnulib-srcdir option), then sources
- are fetched from that local directory. If it is a git repository and
- the configuration variable GNULIB_REVISION is set in bootstrap.conf,
- then that revision is checked out.
+ * If the environment variable GNULIB_SRCDIR is set, then sources are
+ fetched from that local directory. If it is a git repository and the
+ configuration variable GNULIB_REVISION is set in bootstrap.conf, then
+ that revision is checked out.
* Otherwise, if this package is in a git repository with a 'gnulib'
submodule configured, then that submodule is initialized and updated
- and sources are fetched from there. If GNULIB_REFDIR is set (either
- as an environment variable or via the --gnulib-refdir option) and is
- a git repository, then it is used as a reference.
+ and sources are fetched from there. If the environment variable
+ GNULIB_REFDIR is set and is a git repository, then it is used as a
+ reference.
* Otherwise, if the 'gnulib' directory does not exist, Gnulib sources
are cloned into that directory using git from \$GNULIB_URL, defaulting
@@ -890,7 +891,8 @@ update_po_files() {
autogen_usage() {
cat <<EOF
Usage: $me [OPTION]...
-Bootstrap this package from the checked-out sources.
+Bootstrap this package from the checked-out sources, phase 2:
+Generate files from local files (no network access).
Optional environment variables:
GNULIB_SRCDIR Specifies the local directory where gnulib
@@ -899,9 +901,9 @@ Optional environment variables:
you want to use these sources.
Options:
- --copy copy files instead of creating symbolic links
- --force attempt to bootstrap even if the sources seem
- not to have been checked out
+ --copy Copy files instead of creating symbolic links.
+ --force Attempt to bootstrap even if the sources seem
+ not to have been checked out.
EOF
bootstrap_print_option_usage_hook
cat <<EOF
@@ -1347,44 +1349,55 @@ Optional environment variables:
GNULIB_SRCDIR Specifies the local directory where gnulib
sources reside. Use this if you already
have gnulib sources on your machine, and
- do not want to waste your bandwidth downloading
- them again.
+ you want to use these sources.
+ GNULIB_REFDIR Specifies the local directory where a gnulib
+ repository (with a .git subdirectory) resides.
+ Use this if you already have gnulib sources
+ and history on your machine, and do not want
+ to waste your bandwidth downloading them again.
+ Only used for phase 1 (--pull).
GNULIB_URL URL of the gnulib repository. The default is
$default_gnulib_url,
which is Gnulib's upstream repository.
+ Only used for phase 1 (--pull).
Options:
- --pull Do phase 1: pull files from network
- --gen Do phase 2: generate from local files.
+ --pull Do phase 1: Pull files from the network.
+ --gen Do phase 2: Generate files from local files
+ (no network access).
(The default is to do both phases.)
- --gnulib-srcdir=DIRNAME specify the local directory where gnulib
+ --gnulib-srcdir=DIRNAME Specifies the local directory where gnulib
sources reside. Use this if you already
have gnulib sources on your machine, and
you want to use these sources. Defaults
- to \$GNULIB_SRCDIR
- --gnulib-refdir=DIRNAME specify the local directory where a gnulib
+ to \$GNULIB_SRCDIR.
+ --gnulib-refdir=DIRNAME Specifies the local directory where a gnulib
repository (with a .git subdirectory) resides.
Use this if you already have gnulib sources
and history on your machine, and do not want
to waste your bandwidth downloading them again.
- Defaults to \$GNULIB_REFDIR
+ Defaults to \$GNULIB_REFDIR.
+ Only used for phase 1 (--pull).
- --bootstrap-sync if this bootstrap script is not identical to
+ --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
- --no-git do not use git to update gnulib. Requires that
+ /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.
+ Only used for phase 2 (--gen).
+ --force Attempt to bootstrap even if the sources seem
+ not to have been checked out.
+ --no-git Do not use git to update gnulib. Requires that
\$GNULIB_SRCDIR or the --gnulib-srcdir option
points to a gnulib repository with the correct
- revision
- --skip-po do not download po files
+ revision.
+ Only used for phase 1 (--pull).
+ --skip-po Do not download *.po files.
+ Only used for phase 1 (--pull).
EOF
bootstrap_print_option_usage_hook
cat <<EOF
@@ -1396,11 +1409,11 @@ are honored.
Gnulib sources can be fetched in various ways:
- * If the environment variable GNULIB_SRCDIR is set (either as an
- environment variable or via the --gnulib-srcdir option), then sources
- are fetched from that local directory. If it is a git repository and
- the configuration variable GNULIB_REVISION is set in bootstrap.conf,
- then that revision is checked out.
+ * If GNULIB_SRCDIR is set (either as an environment variable or via the
+ --gnulib-srcdir option), then sources are fetched from that local
+ directory. If it is a git repository and the configuration variable
+ GNULIB_REVISION is set in bootstrap.conf, then that revision is
+ checked out.
* Otherwise, if this package is in a git repository with a 'gnulib'
submodule configured, then that submodule is initialized and updated
diff --git a/top/bootstrap b/top/bootstrap
index 5141c925e6..b640bae83d 100755
--- a/top/bootstrap
+++ b/top/bootstrap
@@ -1,7 +1,7 @@
#! /bin/sh
# Bootstrap this package from checked-out sources.
-scriptversion=2023-12-10.18; # UTC
+scriptversion=2024-04-13.15; # UTC
# Copyright (C) 2003-2024 Free Software Foundation, Inc.
#
@@ -43,44 +43,55 @@ Optional environment variables:
GNULIB_SRCDIR Specifies the local directory where gnulib
sources reside. Use this if you already
have gnulib sources on your machine, and
- do not want to waste your bandwidth downloading
- them again.
+ you want to use these sources.
+ GNULIB_REFDIR Specifies the local directory where a gnulib
+ repository (with a .git subdirectory) resides.
+ Use this if you already have gnulib sources
+ and history on your machine, and do not want
+ to waste your bandwidth downloading them again.
+ Only used for phase 1 (--pull).
GNULIB_URL URL of the gnulib repository. The default is
$default_gnulib_url,
which is Gnulib's upstream repository.
+ Only used for phase 1 (--pull).
Options:
- --pull Do phase 1: pull files from network
- --gen Do phase 2: generate from local files.
+ --pull Do phase 1: Pull files from the network.
+ --gen Do phase 2: Generate files from local files
+ (no network access).
(The default is to do both phases.)
- --gnulib-srcdir=DIRNAME specify the local directory where gnulib
+ --gnulib-srcdir=DIRNAME Specifies the local directory where gnulib
sources reside. Use this if you already
have gnulib sources on your machine, and
you want to use these sources. Defaults
- to \$GNULIB_SRCDIR
- --gnulib-refdir=DIRNAME specify the local directory where a gnulib
+ to \$GNULIB_SRCDIR.
+ --gnulib-refdir=DIRNAME Specifies the local directory where a gnulib
repository (with a .git subdirectory) resides.
Use this if you already have gnulib sources
and history on your machine, and do not want
to waste your bandwidth downloading them again.
- Defaults to \$GNULIB_REFDIR
+ Defaults to \$GNULIB_REFDIR.
+ Only used for phase 1 (--pull).
- --bootstrap-sync if this bootstrap script is not identical to
+ --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
- --no-git do not use git to update gnulib. Requires that
+ /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.
+ Only used for phase 2 (--gen).
+ --force Attempt to bootstrap even if the sources seem
+ not to have been checked out.
+ --no-git Do not use git to update gnulib. Requires that
\$GNULIB_SRCDIR or the --gnulib-srcdir option
points to a gnulib repository with the correct
- revision
- --skip-po do not download po files
+ revision.
+ Only used for phase 1 (--pull).
+ --skip-po Do not download *.po files.
+ Only used for phase 1 (--pull).
EOF
bootstrap_print_option_usage_hook
cat <<EOF
@@ -92,11 +103,11 @@ are honored.
Gnulib sources can be fetched in various ways:
- * If the environment variable GNULIB_SRCDIR is set (either as an
- environment variable or via the --gnulib-srcdir option), then sources
- are fetched from that local directory. If it is a git repository and
- the configuration variable GNULIB_REVISION is set in bootstrap.conf,
- then that revision is checked out.
+ * If GNULIB_SRCDIR is set (either as an environment variable or via the
+ --gnulib-srcdir option), then sources are fetched from that local
+ directory. If it is a git repository and the configuration variable
+ GNULIB_REVISION is set in bootstrap.conf, then that revision is
+ checked out.
* Otherwise, if this package is in a git repository with a 'gnulib'
submodule configured, then that submodule is initialized and updated
diff --git a/top/bootstrap-funclib.sh b/top/bootstrap-funclib.sh
index 9e40f4a3e4..64896ff4e5 100644
--- a/top/bootstrap-funclib.sh
+++ b/top/bootstrap-funclib.sh
@@ -1,6 +1,6 @@
# A library of shell functions for autopull.sh, autogen.sh, and bootstrap.
-scriptlibversion=2023-12-10.18; # UTC
+scriptlibversion=2024-04-13.15; # UTC
# Copyright (C) 2003-2024 Free Software Foundation, Inc.
#
@@ -610,7 +610,8 @@ fi
autopull_usage() {
cat <<EOF
Usage: $me [OPTION]...
-Bootstrap this package from the checked-out sources.
+Bootstrap this package from the checked-out sources, phase 1:
+Pull files from the network.
Optional environment variables:
GNULIB_SRCDIR Specifies the local directory where gnulib
@@ -627,18 +628,19 @@ Optional environment variables:
which is Gnulib's upstream repository.
Options:
- --bootstrap-sync if this bootstrap script is not identical to
+
+ --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
- --force attempt to bootstrap even if the sources seem
- not to have been checked out
- --no-git do not use git to update gnulib. Requires that
- \$GNULIB_SRCDIR or the --gnulib-srcdir option
- points to a gnulib repository with the correct
- revision
- --skip-po do not download po files
+ /bin/sh or the shell \$CONFIG_SHELL.
+ --no-bootstrap-sync Do not check whether bootstrap is out of sync.
+
+ --force Attempt to bootstrap even if the sources seem
+ not to have been checked out.
+ --no-git Do not use git to update gnulib. Requires that
+ \$GNULIB_SRCDIR points to a gnulib repository
+ with the correct revision.
+ --skip-po Do not download *.po files.
EOF
bootstrap_print_option_usage_hook
cat <<EOF
@@ -650,17 +652,16 @@ are honored.
Gnulib sources can be fetched in various ways:
- * If the environment variable GNULIB_SRCDIR is set (either as an
- environment variable or via the --gnulib-srcdir option), then sources
- are fetched from that local directory. If it is a git repository and
- the configuration variable GNULIB_REVISION is set in bootstrap.conf,
- then that revision is checked out.
+ * If the environment variable GNULIB_SRCDIR is set, then sources are
+ fetched from that local directory. If it is a git repository and the
+ configuration variable GNULIB_REVISION is set in bootstrap.conf, then
+ that revision is checked out.
* Otherwise, if this package is in a git repository with a 'gnulib'
submodule configured, then that submodule is initialized and updated
- and sources are fetched from there. If GNULIB_REFDIR is set (either
- as an environment variable or via the --gnulib-refdir option) and is
- a git repository, then it is used as a reference.
+ and sources are fetched from there. If the environment variable
+ GNULIB_REFDIR is set and is a git repository, then it is used as a
+ reference.
* Otherwise, if the 'gnulib' directory does not exist, Gnulib sources
are cloned into that directory using git from \$GNULIB_URL, defaulting
@@ -853,7 +854,8 @@ update_po_files() {
autogen_usage() {
cat <<EOF
Usage: $me [OPTION]...
-Bootstrap this package from the checked-out sources.
+Bootstrap this package from the checked-out sources, phase 2:
+Generate files from local files (no network access).
Optional environment variables:
GNULIB_SRCDIR Specifies the local directory where gnulib
@@ -862,9 +864,9 @@ Optional environment variables:
you want to use these sources.
Options:
- --copy copy files instead of creating symbolic links
- --force attempt to bootstrap even if the sources seem
- not to have been checked out
+ --copy Copy files instead of creating symbolic links.
+ --force Attempt to bootstrap even if the sources seem
+ not to have been checked out.
EOF
bootstrap_print_option_usage_hook
cat <<EOF