From: Paul Eggert <eggert@cs.ucla.edu>
To: bug-gnulib@gnu.org
Cc: Paul Eggert <eggert@cs.ucla.edu>
Subject: [PATCH 4/6] Bootstrap with functions, not scripts
Date: Tue, 27 Dec 2022 11:00:00 -0800 [thread overview]
Message-ID: <20221227190002.5660-6-eggert@cs.ucla.edu> (raw)
In-Reply-To: <20221227190002.5660-1-eggert@cs.ucla.edu>
* top/bootstrap: Use autopull and autogen functions, not
shell scripts. This lets build-aux/bootstrap become a
standalone script. It does not change the behavior of
top/bootstrap, except for minor rewording of disagnostics.
---
ChangeLog | 6 ++++++
build-aux/bootstrap | 14 ++++++--------
top/bootstrap | 14 ++++++--------
3 files changed, 18 insertions(+), 16 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 21dbc68b10..53c645a55f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2022-12-27 Paul Eggert <eggert@cs.ucla.edu>
+ Bootstrap with functions, not scripts
+ * top/bootstrap: Use autopull and autogen functions, not
+ shell scripts. This lets build-aux/bootstrap become a
+ standalone script. It does not change the behavior of
+ top/bootstrap, except for minor rewording of disagnostics.
+
Make autopull a shell function too
This does not change behavior. It is helpful for future changes.
* top/autopull.sh: Call autopull to do the actual work.
diff --git a/build-aux/bootstrap b/build-aux/bootstrap
index 78e307c5ef..2c81b0f26e 100755
--- a/build-aux/bootstrap
+++ b/build-aux/bootstrap
@@ -5,7 +5,7 @@
# Bootstrap this package from checked-out sources.
-scriptversion=2022-12-27.03; # UTC
+scriptversion=2022-12-27.04; # UTC
# Copyright (C) 2003-2022 Free Software Foundation, Inc.
#
@@ -1462,25 +1462,23 @@ 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 \
+ 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 \
+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"
# ----------------------------------------------------------------------------
diff --git a/top/bootstrap b/top/bootstrap
index 9d31b4311c..a4246c7e80 100755
--- a/top/bootstrap
+++ b/top/bootstrap
@@ -1,7 +1,7 @@
#! /bin/sh
# Bootstrap this package from checked-out sources.
-scriptversion=2022-12-27.03; # UTC
+scriptversion=2022-12-27.04; # UTC
# Copyright (C) 2003-2022 Free Software Foundation, Inc.
#
@@ -183,25 +183,23 @@ 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 \
+ 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 \
+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"
# ----------------------------------------------------------------------------
--
2.25.1
next prev parent reply other threads:[~2022-12-27 19:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-27 18:59 [PATCH 0/6] build-aux/bootstrap that doesn't need to replace itself Paul Eggert
2022-12-27 18:59 ` [PATCH 1/6] Move scriptversion= lines up in scripts Paul Eggert
2022-12-27 18:59 ` [PATCH] stdnoreturn: deprecate Paul Eggert
2022-12-27 18:59 ` [PATCH 2/6] Make autogen a shell function too Paul Eggert
2022-12-27 18:59 ` [PATCH 3/6] Make autopull " Paul Eggert
2022-12-27 19:00 ` Paul Eggert [this message]
2022-12-27 19:00 ` [PATCH 5/6] Support packages with just 'bootstrap' Paul Eggert
2022-12-27 19:00 ` [PATCH 6/6] Add --pull, --gen options to build-aux/bootstrap Paul Eggert
2022-12-27 21:09 ` [PATCH 0/6] build-aux/bootstrap that doesn't need to replace itself Bruno Haible
2022-12-28 2:16 ` Paul Eggert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221227190002.5660-6-eggert@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=bug-gnulib@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).