mirror of
https://https.git.savannah.gnu.org/git/sed.git
synced 2026-01-27 01:44:34 +00:00
build: update gnulib to latest; also update bootstrap and init.sh
This commit is contained in:
parent
15b14e4b4e
commit
781bfba0bb
85
bootstrap
85
bootstrap
@ -3,7 +3,7 @@
|
||||
|
||||
# Bootstrap this package from checked-out sources.
|
||||
|
||||
scriptversion=2022-12-27.07; # UTC
|
||||
scriptversion=2023-12-10.18; # 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-01-06.19; # UTC
|
||||
scriptlibversion=2023-12-10.18; # UTC
|
||||
|
||||
# Copyright (C) 2003-2024 Free Software Foundation, Inc.
|
||||
#
|
||||
@ -340,7 +340,7 @@ check_versions() {
|
||||
# Handle the still-experimental Automake-NG programs specially.
|
||||
# They remain named as the mainstream Automake programs ("automake",
|
||||
# and "aclocal") to avoid gratuitous incompatibilities with
|
||||
# pre-existing usages (by, say, autoreconf, or custom autogen.sh
|
||||
# preexisting usages (by, say, autoreconf, or custom autogen.sh
|
||||
# scripts), but correctly identify themselves (as being part of
|
||||
# "GNU automake-ng") when asked their version.
|
||||
case $app in
|
||||
@ -497,7 +497,8 @@ prepare_GNULIB_SRCDIR ()
|
||||
# We already checked that $GNULIB_SRCDIR references a directory.
|
||||
# Verify that it contains a gnulib checkout.
|
||||
test -f "$GNULIB_SRCDIR/gnulib-tool" \
|
||||
|| die "Error: --gnulib-srcdir or \$GNULIB_SRCDIR is specified, but does not contain gnulib-tool"
|
||||
|| die "Error: --gnulib-srcdir or \$GNULIB_SRCDIR is specified," \
|
||||
"but does not contain gnulib-tool"
|
||||
elif $use_git; then
|
||||
gnulib_path=$(git_modules_config submodule.gnulib.path)
|
||||
test -z "$gnulib_path" && gnulib_path=gnulib
|
||||
@ -558,7 +559,8 @@ prepare_GNULIB_SRCDIR ()
|
||||
# be processed, which can drastically reduce download and processing
|
||||
# time for checkout. If the fetch by commit fails, a shallow fetch can
|
||||
# not be performed because we do not know what the depth of the commit
|
||||
# is without fetching all commits. So fallback to fetching all commits.
|
||||
# is without fetching all commits. So fall back to fetching all
|
||||
# commits.
|
||||
git -C "$gnulib_path" init
|
||||
git -C "$gnulib_path" remote add origin \
|
||||
${GNULIB_URL:-$default_gnulib_url}
|
||||
@ -574,7 +576,8 @@ prepare_GNULIB_SRCDIR ()
|
||||
GNULIB_SRCDIR=$gnulib_path
|
||||
# Verify that the submodule contains a gnulib checkout.
|
||||
test -f "$gnulib_path/gnulib-tool" \
|
||||
|| die "Error: $gnulib_path is supposed to contain a gnulib checkout, but does not contain gnulib-tool"
|
||||
|| die "Error: $gnulib_path is supposed to contain a gnulib checkout," \
|
||||
"but does not contain gnulib-tool"
|
||||
fi
|
||||
|
||||
# XXX Should this be done if $use_git is false?
|
||||
@ -594,7 +597,8 @@ upgrade_bootstrap ()
|
||||
if test -f "$medir"/bootstrap-funclib.sh; then
|
||||
update_lib=true
|
||||
{ cmp -s "$medir"/bootstrap "$GNULIB_SRCDIR/top/bootstrap" \
|
||||
&& cmp -s "$medir"/bootstrap-funclib.sh "$GNULIB_SRCDIR/top/bootstrap-funclib.sh" \
|
||||
&& cmp -s "$medir"/bootstrap-funclib.sh \
|
||||
"$GNULIB_SRCDIR/top/bootstrap-funclib.sh" \
|
||||
&& cmp -s "$medir"/autopull.sh "$GNULIB_SRCDIR/top/autopull.sh" \
|
||||
&& cmp -s "$medir"/autogen.sh "$GNULIB_SRCDIR/top/autogen.sh"; \
|
||||
}
|
||||
@ -611,10 +615,18 @@ upgrade_bootstrap ()
|
||||
a) ignored=--;;
|
||||
*) ignored=ignored;;
|
||||
esac
|
||||
u=$update_lib
|
||||
exec sh -c \
|
||||
'{ if '$update_lib' && test -f "$1"; then cp "$1" "$3"; else cp "$2" "$3"; fi; } && { if '$update_lib' && test -f "$4"; then cp "$4" "$5"; else rm -f "$5"; fi; } && { if '$update_lib' && test -f "$6"; then cp "$6" "$7"; else rm -f "$7"; fi; } && { if '$update_lib' && test -f "$8"; then cp "$8" "$9"; else rm -f "$9"; fi; } && shift && shift && shift && shift && shift && shift && shift && shift && shift && exec "${CONFIG_SHELL-/bin/sh}" "$@"' \
|
||||
'{ if '$u' && test -f "$1"; then cp "$1" "$3"; else cp "$2" "$3"; fi; } &&
|
||||
{ if '$u' && test -f "$4"; then cp "$4" "$5"; else rm -f "$5"; fi; } &&
|
||||
{ if '$u' && test -f "$6"; then cp "$6" "$7"; else rm -f "$7"; fi; } &&
|
||||
{ if '$u' && test -f "$8"; then cp "$8" "$9"; else rm -f "$9"; fi; } &&
|
||||
shift && shift && shift && shift && shift &&
|
||||
shift && shift && shift && shift &&
|
||||
exec "${CONFIG_SHELL-/bin/sh}" "$@"' \
|
||||
$ignored \
|
||||
"$GNULIB_SRCDIR/top/bootstrap" "$GNULIB_SRCDIR/build-aux/bootstrap" "$medir/bootstrap" \
|
||||
"$GNULIB_SRCDIR/top/bootstrap" "$GNULIB_SRCDIR/build-aux/bootstrap" \
|
||||
"$medir/bootstrap" \
|
||||
"$GNULIB_SRCDIR/top/bootstrap-funclib.sh" "$medir/bootstrap-funclib.sh" \
|
||||
"$GNULIB_SRCDIR/top/autopull.sh" "$medir/autopull.sh" \
|
||||
"$GNULIB_SRCDIR/top/autogen.sh" "$medir/autogen.sh" \
|
||||
@ -647,7 +659,9 @@ Optional environment variables:
|
||||
Use this if you already have gnulib sources
|
||||
and history on your machine, and do not want
|
||||
to waste your bandwidth downloading them again.
|
||||
GNULIB_URL Cloneable URL of the gnulib repository.
|
||||
GNULIB_URL URL of the gnulib repository. The default is
|
||||
$default_gnulib_url,
|
||||
which is Gnulib's upstream repository.
|
||||
|
||||
Options:
|
||||
--bootstrap-sync if this bootstrap script is not identical to
|
||||
@ -747,9 +761,12 @@ autopull()
|
||||
done
|
||||
|
||||
$use_git || test -n "$GNULIB_SRCDIR" \
|
||||
|| die "Error: --no-git requires \$GNULIB_SRCDIR environment variable or --gnulib-srcdir option"
|
||||
|| die "Error: --no-git requires \$GNULIB_SRCDIR environment variable" \
|
||||
"or --gnulib-srcdir option"
|
||||
test -z "$GNULIB_SRCDIR" || test -d "$GNULIB_SRCDIR" \
|
||||
|| die "Error: \$GNULIB_SRCDIR environment variable or --gnulib-srcdir option is specified, but does not denote a directory"
|
||||
|| die "Error: \$GNULIB_SRCDIR environment variable" \
|
||||
"or --gnulib-srcdir option is specified," \
|
||||
"but does not denote a directory"
|
||||
|
||||
if test -n "$checkout_only_file" && test ! -r "$checkout_only_file"; then
|
||||
die "Running this script from a non-checked-out distribution is risky."
|
||||
@ -760,7 +777,7 @@ autopull()
|
||||
if $use_gnulib || $bootstrap_sync; then
|
||||
prepare_GNULIB_SRCDIR
|
||||
if $bootstrap_sync; then
|
||||
upgrade_bootstrap
|
||||
upgrade_bootstrap "$@"
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -811,7 +828,10 @@ autopull()
|
||||
uninitialized=`echo "$uninitialized" | grep -v '^gnulib$'`
|
||||
fi
|
||||
if test -n "$uninitialized"; then
|
||||
die "Some git submodules are not initialized: "`echo "$uninitialized" | tr '\n' ',' | sed -e 's|,$|.|'`" Either use option '--no-git', or run 'git submodule update --init' and bootstrap again."
|
||||
uninit_comma=`echo "$uninitialized" | tr '\n' ',' | sed -e 's|,$|.|'`
|
||||
die "Some git submodules are not initialized: "$uninit_comma \
|
||||
"Either use option '--no-git'," \
|
||||
"or run 'git submodule update --init' and bootstrap again."
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -978,7 +998,7 @@ symlink_to_dir()
|
||||
for dot_ig in x $vc_ignore; do
|
||||
test $dot_ig = x && continue
|
||||
ig=$parent/$dot_ig
|
||||
insert_vc_ignore $ig "${dst_dir##*/}"
|
||||
insert_vc_ignore $ig "${dst_dir##*/}/"
|
||||
done
|
||||
fi
|
||||
|
||||
@ -1075,7 +1095,8 @@ autogen()
|
||||
done
|
||||
|
||||
test -z "$GNULIB_SRCDIR" || test -d "$GNULIB_SRCDIR" \
|
||||
|| die "Error: \$GNULIB_SRCDIR environment variable or --gnulib-srcdir option is specified, but does not denote a directory"
|
||||
|| die "Error: \$GNULIB_SRCDIR environment variable or --gnulib-srcdir" \
|
||||
"option is specified, but does not denote a directory"
|
||||
|
||||
if test -n "$checkout_only_file" && test ! -r "$checkout_only_file"; then
|
||||
die "Running this script from a non-checked-out distribution is risky."
|
||||
@ -1083,7 +1104,8 @@ autogen()
|
||||
|
||||
if $use_gnulib; then
|
||||
if test -z "$GNULIB_SRCDIR"; then
|
||||
gnulib_path=$(test -f .gitmodules && git config --file .gitmodules submodule.gnulib.path)
|
||||
gnulib_path=$(test -f .gitmodules &&
|
||||
git config --file .gitmodules submodule.gnulib.path)
|
||||
test -z "$gnulib_path" && gnulib_path=gnulib
|
||||
GNULIB_SRCDIR=$gnulib_path
|
||||
fi
|
||||
@ -1104,7 +1126,7 @@ autogen()
|
||||
mkdir $build_aux
|
||||
for dot_ig in x $vc_ignore; do
|
||||
test $dot_ig = x && continue
|
||||
insert_vc_ignore $dot_ig $build_aux
|
||||
insert_vc_ignore $dot_ig $build_aux/
|
||||
done
|
||||
fi
|
||||
|
||||
@ -1236,14 +1258,7 @@ autogen()
|
||||
# Invoke autoreconf with --force --install to ensure upgrades of tools
|
||||
# such as ylwrap.
|
||||
AUTORECONFFLAGS="--verbose --install --force -I $m4_base $ACLOCAL_FLAGS"
|
||||
|
||||
# Some systems (RHEL 5) are using ancient autotools, for which the
|
||||
# --no-recursive option had not been invented. Detect that lack and
|
||||
# omit the option when it's not supported. FIXME in 2017: remove this
|
||||
# hack when RHEL 5 autotools are updated, or when they become irrelevant.
|
||||
case $($AUTORECONF --help) in
|
||||
*--no-recursive*) AUTORECONFFLAGS="$AUTORECONFFLAGS --no-recursive";;
|
||||
esac
|
||||
AUTORECONFFLAGS="$AUTORECONFFLAGS --no-recursive"
|
||||
|
||||
# Tell autoreconf not to invoke autopoint or libtoolize; they were run above.
|
||||
echo "running: AUTOPOINT=true LIBTOOLIZE=true $AUTORECONF $AUTORECONFFLAGS"
|
||||
@ -1334,7 +1349,9 @@ Optional environment variables:
|
||||
have gnulib sources on your machine, and
|
||||
do not want to waste your bandwidth downloading
|
||||
them again.
|
||||
GNULIB_URL Cloneable URL of the gnulib repository.
|
||||
GNULIB_URL URL of the gnulib repository. The default is
|
||||
$default_gnulib_url,
|
||||
which is Gnulib's upstream repository.
|
||||
|
||||
Options:
|
||||
|
||||
@ -1465,9 +1482,11 @@ done
|
||||
$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"
|
||||
|| die "Error: --no-git requires \$GNULIB_SRCDIR environment variable" \
|
||||
"or --gnulib-srcdir option"
|
||||
test -z "$GNULIB_SRCDIR" || test -d "$GNULIB_SRCDIR" \
|
||||
|| die "Error: \$GNULIB_SRCDIR environment variable or --gnulib-srcdir option is specified, but does not denote a directory"
|
||||
|| die "Error: \$GNULIB_SRCDIR environment variable or --gnulib-srcdir" \
|
||||
"option is specified, but does not denote a directory"
|
||||
|
||||
if test -n "$checkout_only_file" && test ! -r "$checkout_only_file"; then
|
||||
die "Bootstrapping from a non-checked-out distribution is risky."
|
||||
@ -1477,7 +1496,7 @@ check_build_prerequisites $use_git
|
||||
|
||||
if $bootstrap_sync; then
|
||||
prepare_GNULIB_SRCDIR
|
||||
upgrade_bootstrap
|
||||
upgrade_bootstrap "$@"
|
||||
# Since we have now upgraded if needed, no need to try it a second time below.
|
||||
bootstrap_sync=false
|
||||
fi
|
||||
@ -1490,7 +1509,11 @@ export GNULIB_REFDIR
|
||||
|
||||
if $pull && { $use_git || test -z "$SKIP_PO"; }; then
|
||||
autopull \
|
||||
`if $bootstrap_sync; then echo ' --bootstrap-sync'; else echo ' --no-bootstrap-sync'; fi` \
|
||||
`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` \
|
||||
|
||||
2
gnulib
2
gnulib
@ -1 +1 @@
|
||||
Subproject commit 5ec3136235d7a0d5db77a474c40e35edd47b6dd7
|
||||
Subproject commit 99ce3a004a2974c71f510f5df5bc6be7e2811d30
|
||||
13
lib/.gitignore
vendored
13
lib/.gitignore
vendored
@ -203,23 +203,28 @@
|
||||
/tempname.h
|
||||
/time.h
|
||||
/time.in.h
|
||||
/uchar.h
|
||||
/unicase.h
|
||||
/unictype.h
|
||||
/uninorm.h
|
||||
/unistd.c
|
||||
/unistd.h
|
||||
/unistd.in.h
|
||||
/unitypes.h
|
||||
/unlocked-io.h
|
||||
/verify.h
|
||||
/version-etc-fsf.c
|
||||
/version-etc.c
|
||||
/version-etc-fsf.c
|
||||
/version-etc.h
|
||||
/warn-on-use.h
|
||||
/wchar.h
|
||||
/wchar.in.h
|
||||
/wcrtomb.c
|
||||
/wctob.c
|
||||
/wctomb-impl.h
|
||||
/wctomb.c
|
||||
/wctype-h.c
|
||||
/wctomb-impl.h
|
||||
/wctype.h
|
||||
/wctype-h.c
|
||||
/wctype.in.h
|
||||
/windows-initguard.h
|
||||
/windows-mutex.c
|
||||
@ -231,6 +236,6 @@
|
||||
/windows-rwlock.c
|
||||
/windows-rwlock.h
|
||||
/xalloc-die.c
|
||||
/xalloc-oversized.h
|
||||
/xalloc.h
|
||||
/xalloc-oversized.h
|
||||
/xmalloc.c
|
||||
|
||||
@ -646,18 +646,19 @@ compare_dev_null_ ()
|
||||
|
||||
for diff_opt_ in -u -U3 -c '' no; do
|
||||
test "$diff_opt_" != no &&
|
||||
diff_out_=`exec 2>/dev/null; diff $diff_opt_ "$0" "$0" < /dev/null` &&
|
||||
diff_out_=`exec 2>/dev/null
|
||||
LC_ALL=C diff $diff_opt_ "$0" "$0" < /dev/null` &&
|
||||
break
|
||||
done
|
||||
if test "$diff_opt_" != no; then
|
||||
if test -z "$diff_out_"; then
|
||||
compare_ () { diff $diff_opt_ "$@"; }
|
||||
compare_ () { LC_ALL=C diff $diff_opt_ "$@"; }
|
||||
else
|
||||
compare_ ()
|
||||
{
|
||||
# If no differences were found, AIX and HP-UX 'diff' produce output
|
||||
# like "No differences encountered". Hide this output.
|
||||
diff $diff_opt_ "$@" > diff.out
|
||||
LC_ALL=C diff $diff_opt_ "$@" > diff.out
|
||||
diff_status_=$?
|
||||
test $diff_status_ -eq 0 || cat diff.out || diff_status_=2
|
||||
rm -f diff.out || diff_status_=2
|
||||
@ -702,4 +703,4 @@ test -f "$srcdir/init.cfg" \
|
||||
setup_ "$@"
|
||||
# This trap is here, rather than in the setup_ function, because some
|
||||
# shells run the exit trap at shell function exit, rather than script exit.
|
||||
trap remove_tmp_ 0
|
||||
trap remove_tmp_ EXIT
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user