[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/5] gnulib: update
From: |
Akim Demaille |
Subject: |
[PATCH 3/5] gnulib: update |
Date: |
Tue, 8 May 2018 17:02:30 +0200 |
* README-hacking: Commit before bootstrapping.
* bootstrap.conf: gnulib_mk is no longer defined by bootstrap.
* bootstrap, gnulib, lib/.gitignore, m4/.gitignore: Update/regen.
---
README-hacking | 8 +-
bootstrap | 226 +++++++++++++++++++++++++------------------------
bootstrap.conf | 2 +-
gnulib | 2 +-
lib/.gitignore | 4 +-
m4/.gitignore | 2 +
6 files changed, 125 insertions(+), 119 deletions(-)
diff --git a/README-hacking b/README-hacking
index 25e4ef34..df6048fc 100644
--- a/README-hacking
+++ b/README-hacking
@@ -103,14 +103,16 @@ to perform the first checkout of the submodules, run
$ git submodule update --init
-Git submodule support is weak before versions 1.6 and later, upgrade Git if
-your version is older.
-
The next step is to get other files needed to build, which are
extracted from other source packages:
$ ./bootstrap
+Bootstrapping updates the submodules to the versions registered in the
+top-level directory. To change gnulib, first check out the version you want
+in `gnulib`, then commit this change in Bison's repository, and finally run
+bootstrap.
+
If it fails with missing symbols (e.g., "error: possibly undefined macro:
AC_PROG_GNU_M4"), you are likely to have forgotten the submodule
initialization part. Otherwise, there you are! Just
diff --git a/bootstrap b/bootstrap
index a3d98ce9..eddacfb6 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,10 +1,10 @@
#! /bin/sh
# Print a version string.
-scriptversion=2017-09-13.06; # UTC
+scriptversion=2018-04-28.14; # UTC
# Bootstrap this package from checked-out sources.
-# Copyright (C) 2003-2017 Free Software Foundation, Inc.
+# Copyright (C) 2003-2018 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
@@ -109,9 +109,6 @@ die() { warn_ "$@"; exit 1; }
# Configuration.
-# Name of the Makefile.am
-gnulib_mk=gnulib.mk
-
# List of gnulib modules needed.
gnulib_modules=
@@ -170,7 +167,15 @@ source_base=lib
m4_base=m4
doc_base=doc
tests_base=tests
-gnulib_extra_files=''
+gnulib_extra_files="
+ build-aux/install-sh
+ build-aux/mdate-sh
+ build-aux/texinfo.tex
+ build-aux/depcomp
+ build-aux/config.guess
+ build-aux/config.sub
+ doc/INSTALL
+"
# Additional gnulib-tool options to use. Use "\newline" to break lines.
gnulib_tool_option_extras=
@@ -264,24 +269,18 @@ case "$0" in
*) test -r "$0.conf" && . ./"$0.conf" ;;
esac
-# Extra files from gnulib, which override files from other sources.
-test -z "${gnulib_extra_files}" && \
- gnulib_extra_files="
- build-aux/install-sh
- build-aux/mdate-sh
- build-aux/texinfo.tex
- build-aux/depcomp
- build-aux/config.guess
- build-aux/config.sub
- doc/INSTALL
-"
-
if test "$vc_ignore" = auto; then
vc_ignore=
test -d .git && vc_ignore=.gitignore
test -d CVS && vc_ignore="$vc_ignore .cvsignore"
fi
+if test x"$gnulib_modules$gnulib_files$gnulib_extra_files" = x; then
+ use_gnulib=false
+else
+ use_gnulib=true
+fi
+
# Translate configuration into internal form.
# Parse options.
@@ -612,85 +611,87 @@ git_modules_config () {
test -f .gitmodules && git config --file .gitmodules "$@"
}
-if $use_git; then
- gnulib_path=$(git_modules_config submodule.gnulib.path)
- test -z "$gnulib_path" && gnulib_path=gnulib
-fi
+if $use_gnulib; then
+ if $use_git; then
+ gnulib_path=$(git_modules_config submodule.gnulib.path)
+ test -z "$gnulib_path" && gnulib_path=gnulib
+ fi
-# Get gnulib files. Populate $GNULIB_SRCDIR, possibly updating a
-# submodule, for use in the rest of the script.
+ # Get gnulib files. Populate $GNULIB_SRCDIR, possibly updating a
+ # submodule, for use in the rest of the script.
-case ${GNULIB_SRCDIR--} in
--)
- # Note that $use_git is necessarily true in this case.
- if git_modules_config submodule.gnulib.url >/dev/null; then
- echo "$0: getting gnulib files..."
- git submodule init -- "$gnulib_path" || exit $?
- git submodule update -- "$gnulib_path" || exit $?
+ case ${GNULIB_SRCDIR--} in
+ -)
+ # Note that $use_git is necessarily true in this case.
+ if git_modules_config submodule.gnulib.url >/dev/null; then
+ echo "$0: getting gnulib files..."
+ git submodule init -- "$gnulib_path" || exit $?
+ git submodule update -- "$gnulib_path" || exit $?
- elif [ ! -d "$gnulib_path" ]; then
- echo "$0: getting gnulib files..."
+ elif [ ! -d "$gnulib_path" ]; then
+ echo "$0: getting gnulib files..."
- trap cleanup_gnulib 1 2 13 15
+ trap cleanup_gnulib 1 2 13 15
- shallow=
- git clone -h 2>&1 | grep -- --depth > /dev/null && shallow='--depth 2'
- git clone $shallow git://git.sv.gnu.org/gnulib "$gnulib_path" ||
- cleanup_gnulib
+ shallow=
+ git clone -h 2>&1 | grep -- --depth > /dev/null && shallow='--depth 2'
+ git clone $shallow git://git.sv.gnu.org/gnulib "$gnulib_path" ||
+ cleanup_gnulib
- trap - 1 2 13 15
- fi
- GNULIB_SRCDIR=$gnulib_path
- ;;
-*)
- # Use GNULIB_SRCDIR directly or as a reference.
- if $use_git && test -d "$GNULIB_SRCDIR"/.git && \
- git_modules_config submodule.gnulib.url >/dev/null; then
- echo "$0: getting gnulib files..."
- if git submodule -h|grep -- --reference > /dev/null; then
- # Prefer the one-liner available in git 1.6.4 or newer.
- git submodule update --init --reference "$GNULIB_SRCDIR" \
- "$gnulib_path" || exit $?
- else
- # This fallback allows at least git 1.5.5.
- if test -f "$gnulib_path"/gnulib-tool; then
- # Since file already exists, assume submodule init already complete.
- git submodule update -- "$gnulib_path" || exit $?
+ trap - 1 2 13 15
+ fi
+ GNULIB_SRCDIR=$gnulib_path
+ ;;
+ *)
+ # Use GNULIB_SRCDIR directly or as a reference.
+ if $use_git && test -d "$GNULIB_SRCDIR"/.git && \
+ git_modules_config submodule.gnulib.url >/dev/null; then
+ echo "$0: getting gnulib files..."
+ if git submodule -h|grep -- --reference > /dev/null; then
+ # Prefer the one-liner available in git 1.6.4 or newer.
+ git submodule update --init --reference "$GNULIB_SRCDIR" \
+ "$gnulib_path" || exit $?
else
- # Older git can't clone into an empty directory.
- rmdir "$gnulib_path" 2>/dev/null
- git clone --reference "$GNULIB_SRCDIR" \
- "$(git_modules_config submodule.gnulib.url)" "$gnulib_path" \
- && git submodule init -- "$gnulib_path" \
- && git submodule update -- "$gnulib_path" \
- || exit $?
+ # This fallback allows at least git 1.5.5.
+ if test -f "$gnulib_path"/gnulib-tool; then
+ # Since file already exists, assume submodule init already complete.
+ git submodule update -- "$gnulib_path" || exit $?
+ else
+ # Older git can't clone into an empty directory.
+ rmdir "$gnulib_path" 2>/dev/null
+ git clone --reference "$GNULIB_SRCDIR" \
+ "$(git_modules_config submodule.gnulib.url)" "$gnulib_path" \
+ && git submodule init -- "$gnulib_path" \
+ && git submodule update -- "$gnulib_path" \
+ || exit $?
+ fi
fi
+ GNULIB_SRCDIR=$gnulib_path
fi
- GNULIB_SRCDIR=$gnulib_path
- fi
- ;;
-esac
+ ;;
+ esac
-# $GNULIB_SRCDIR now points to the version of gnulib to use, and
-# we no longer need to use git or $gnulib_path below here.
+ # $GNULIB_SRCDIR now points to the version of gnulib to use, and
+ # we no longer need to use git or $gnulib_path below here.
+
+ if $bootstrap_sync; then
+ cmp -s "$0" "$GNULIB_SRCDIR/build-aux/bootstrap" || {
+ echo "$0: updating bootstrap and restarting..."
+ case $(sh -c 'echo "$1"' -- a) in
+ a) ignored=--;;
+ *) ignored=ignored;;
+ esac
+ exec sh -c \
+ 'cp "$1" "$2" && shift && exec "${CONFIG_SHELL-/bin/sh}" "$@"' \
+ $ignored "$GNULIB_SRCDIR/build-aux/bootstrap" \
+ "$0" "$@" --no-bootstrap-sync
+ }
+ fi
-if $bootstrap_sync; then
- cmp -s "$0" "$GNULIB_SRCDIR/build-aux/bootstrap" || {
- echo "$0: updating bootstrap and restarting..."
- case $(sh -c 'echo "$1"' -- a) in
- a) ignored=--;;
- *) ignored=ignored;;
- esac
- exec sh -c \
- 'cp "$1" "$2" && shift && exec "${CONFIG_SHELL-/bin/sh}" "$@"' \
- $ignored "$GNULIB_SRCDIR/build-aux/bootstrap" \
- "$0" "$@" --no-bootstrap-sync
- }
+ gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
+ <$gnulib_tool || exit $?
fi
-gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
-<$gnulib_tool || exit $?
-
# Get translations.
download_po_files() {
@@ -699,7 +700,7 @@ download_po_files() {
echo "$me: getting translations into $subdir for $domain..."
cmd=$(printf "$po_download_command_format" "$domain" "$subdir")
eval "$cmd" && return
- # Fallback to HTTP.
+ # Fallback to HTTPS.
cmd=$(printf "$po_download_command_format2" "$subdir" "$domain")
eval "$cmd"
}
@@ -792,7 +793,7 @@ symlink_to_dir()
# aren't confused into doing unnecessary builds. Conversely, if the
# existing symlink's timestamp is older than the source, make it afresh,
# so that broken tools aren't confused into skipping needed builds. See
- # <https://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00326.html>.
+ # <https://lists.gnu.org/r/bug-gnulib/2011-05/msg00326.html>.
test -h "$dst" &&
src_ls=$(ls -diL "$src" 2>/dev/null) && set $src_ls && src_i=$1 &&
dst_ls=$(ls -diL "$dst" 2>/dev/null) && set $dst_ls && dst_i=$1 &&
@@ -898,32 +899,33 @@ fi
# Import from gnulib.
-gnulib_tool_options="\
- --import\
- --no-changelog\
- --aux-dir $build_aux\
- --doc-base $doc_base\
- --lib $gnulib_name\
- --m4-base $m4_base/\
- --source-base $source_base/\
- --tests-base $tests_base\
- --local-dir $local_gl_dir\
- $gnulib_tool_option_extras\
-"
-if test $use_libtool = 1; then
- case "$gnulib_tool_options " in
- *' --libtool '*) ;;
- *) gnulib_tool_options="$gnulib_tool_options --libtool" ;;
- esac
-fi
-echo "$0: $gnulib_tool $gnulib_tool_options --import ..."
-$gnulib_tool $gnulib_tool_options --import $gnulib_modules \
- || die "gnulib-tool failed"
+if $use_gnulib; then
+ gnulib_tool_options="\
+ --no-changelog\
+ --aux-dir $build_aux\
+ --doc-base $doc_base\
+ --lib $gnulib_name\
+ --m4-base $m4_base/\
+ --source-base $source_base/\
+ --tests-base $tests_base\
+ --local-dir $local_gl_dir\
+ $gnulib_tool_option_extras\
+ "
+ if test $use_libtool = 1; then
+ case "$gnulib_tool_options " in
+ *' --libtool '*) ;;
+ *) gnulib_tool_options="$gnulib_tool_options --libtool" ;;
+ esac
+ fi
+ echo "$0: $gnulib_tool $gnulib_tool_options --import ..."
+ $gnulib_tool $gnulib_tool_options --import $gnulib_modules \
+ || die "gnulib-tool failed"
-for file in $gnulib_files; do
- symlink_to_dir "$GNULIB_SRCDIR" $file \
- || die "failed to symlink $file"
-done
+ for file in $gnulib_files; do
+ symlink_to_dir "$GNULIB_SRCDIR" $file \
+ || die "failed to symlink $file"
+ done
+fi
bootstrap_post_import_hook \
|| die "bootstrap_post_import_hook failed"
@@ -1020,7 +1022,7 @@ bootstrap_epilogue
echo "$0: done. Now you can run './configure'."
# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
diff --git a/bootstrap.conf b/bootstrap.conf
index 6a5c9ae5..8150e682 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -81,7 +81,7 @@ gnulib_tool_option_extras='--symlink
--makefile-name=gnulib.mk'
bootstrap_post_import_hook()
{
# Massage lib/gnulib.mk before using it later in the bootstrapping process.
- build-aux/prefix-gnulib-mk --lib-name=$gnulib_name lib/$gnulib_mk
+ build-aux/prefix-gnulib-mk --lib-name=$gnulib_name lib/gnulib.mk
# Ensure that ChangeLog exists, for automake.
test -f ChangeLog || touch ChangeLog
diff --git a/gnulib b/gnulib
index 25ca8d5f..0d10473b 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit 25ca8d5facd519f3491833b133f23bf35773bed9
+Subproject commit 0d10473be6fb40c42c0d10c3417a818b0ebfcce1
diff --git a/lib/.gitignore b/lib/.gitignore
index 4e8c029a..c833c2bb 100644
--- a/lib/.gitignore
+++ b/lib/.gitignore
@@ -117,7 +117,6 @@
/malloc.c
/malloca.c
/malloca.h
-/malloca.valgrind
/math.c
/math.h
/math.in.h
@@ -229,7 +228,6 @@
/sys_ioctl.in.h
/sys_socket.in.h
/sys_stat.in.h
-/sys_time.in.h
/sys_types.in.h
/sys_wait.in.h
/sysexits.in.h
@@ -276,3 +274,5 @@
/xsize.h
/xstrndup.c
/xstrndup.h
+/stat-time.c
+/stat-time.h
diff --git a/m4/.gitignore b/m4/.gitignore
index 4061237c..daace580 100644
--- a/m4/.gitignore
+++ b/m4/.gitignore
@@ -178,3 +178,5 @@
/xalloc.m4
/xsize.m4
/xstrndup.m4
+/host-cpu-c-abi.m4
+/stat-time.m4
--
2.17.0
- [PATCH 0/5] Update gnulib, and minor changes, Akim Demaille, 2018/05/08
- [PATCH 2/5] tests: we might need to find gnulib headers, Akim Demaille, 2018/05/08
- [PATCH 3/5] gnulib: update,
Akim Demaille <=
- [PATCH 4/5] doc: wrap, Akim Demaille, 2018/05/08
- [PATCH 1/5] getargs: rename argument to avoid gnulib's renaming, Akim Demaille, 2018/05/08
- [PATCH 5/5] style: don't use std::endl, Akim Demaille, 2018/05/08
- Re: [PATCH 5/5] style: don't use std::endl, Hans Åberg, 2018/05/08
- Re: [PATCH 5/5] style: don't use std::endl, Akim Demaille, 2018/05/09
- Re: [PATCH 5/5] style: don't use std::endl, Hans Åberg, 2018/05/09
- Re: [PATCH 5/5] style: don't use std::endl, Hans Åberg, 2018/05/10
- Re: [PATCH 5/5] style: don't use std::endl, Akim Demaille, 2018/05/10
- Re: [PATCH 5/5] style: don't use std::endl, Hans Åberg, 2018/05/10
Re: [PATCH 0/5] Update gnulib, and minor changes, Akim Demaille, 2018/05/09