build: use gnulib's new bootstrap_sync option.

Now, whenever we update bison's copy of gnulib, bootstrap will
update itself the next time it's run.
* bootstrap: Copy from latest gnulib for bootstrap_sync support.
* bootstrap.conf (bootstrap_sync): Set to true.
* gnulib: Update to latest so bootstrap is in sync now.
(cherry picked from commit 10bae98af2)
This commit is contained in:
Joel E. Denny
2010-11-21 10:07:13 -05:00
parent 3b8378825e
commit dcd39f1d4a
4 changed files with 46 additions and 10 deletions

View File

@@ -1,3 +1,12 @@
2010-11-21 Joel E. Denny <jdenny@clemson.edu>
build: use gnulib's new bootstrap_sync option.
Now, whenever we update bison's copy of gnulib, bootstrap will
update itself the next time it's run.
* bootstrap: Copy from latest gnulib for bootstrap_sync support.
* bootstrap.conf (bootstrap_sync): Set to true.
* gnulib: Update to latest so bootstrap is in sync now.
2010-11-07 Joel E. Denny <jdenny@clemson.edu> 2010-11-07 Joel E. Denny <jdenny@clemson.edu>
yysyntax_error: adjust prior fixes for branch-2.5's lalr1.cc. yysyntax_error: adjust prior fixes for branch-2.5's lalr1.cc.

View File

@@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh
# Print a version string. # Print a version string.
scriptversion=2010-10-08.16; # UTC scriptversion=2010-11-20.03; # UTC
# Bootstrap this package from checked-out sources. # Bootstrap this package from checked-out sources.
@@ -54,6 +54,12 @@ Options:
have gnulib sources on your machine, and have gnulib sources on your machine, and
do not want to waste your bandwidth downloading do not want to waste your bandwidth downloading
them again. Defaults to \$GNULIB_SRCDIR. them again. Defaults to \$GNULIB_SRCDIR.
--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 if
defined.
--no-bootstrap-sync Do not check whether bootstrap is out of sync.
--copy Copy files instead of creating symbolic links. --copy Copy files instead of creating symbolic links.
--force Attempt to bootstrap even if the sources seem --force Attempt to bootstrap even if the sources seem
not to have been checked out. not to have been checked out.
@@ -168,6 +174,10 @@ copy=false
# on which version control system (if any) is used in the source directory. # on which version control system (if any) is used in the source directory.
vc_ignore=auto vc_ignore=auto
# Set this to true in bootstrap.conf to enable --bootstrap-sync by
# default.
bootstrap_sync=false
# find_tool ENVVAR NAMES... # find_tool ENVVAR NAMES...
# ------------------------- # -------------------------
# Search for a required program. Use the value of ENVVAR, if set, # Search for a required program. Use the value of ENVVAR, if set,
@@ -239,6 +249,10 @@ do
checkout_only_file=;; checkout_only_file=;;
--copy) --copy)
copy=true;; copy=true;;
--bootstrap-sync)
bootstrap_sync=true;;
--no-bootstrap-sync)
bootstrap_sync=false;;
*) *)
echo >&2 "$0: $option: unknown option" echo >&2 "$0: $option: unknown option"
exit 1;; exit 1;;
@@ -344,17 +358,18 @@ get_version() {
$app --version >/dev/null 2>&1 || return 1 $app --version >/dev/null 2>&1 || return 1
$app --version 2>&1 | $app --version 2>&1 |
sed -n '# extract version within line sed -n '# Move version to start of line.
s/.*[v ]\{1,\}\([0-9]\{1,\}\.[.a-z0-9-]*\).*/\1/ s/.*[v ]\([0-9]\)/\1/
t done
# extract version at start of line # Skip lines that do not start with version.
s/^\([0-9]\{1,\}\.[.a-z0-9-]*\).*/\1/ /^[0-9]/!d
t done
d # Remove characters after the version.
s/[^.a-z0-9-].*//
# The first component must be digits only.
s/^\([0-9]*\)[a-z-].*/\1/
:done
#the following essentially does s/5.005/5.5/ #the following essentially does s/5.005/5.5/
s/\.0*\([1-9]\)/.\1/g s/\.0*\([1-9]\)/.\1/g
p p
@@ -500,6 +515,16 @@ case ${GNULIB_SRCDIR--} in
;; ;;
esac esac
if $bootstrap_sync; then
cmp -s "$0" "$GNULIB_SRCDIR/build-aux/bootstrap" || {
echo "$0: updating bootstrap and restarting..."
exec sh -c \
'cp "$1" "$2" && shift && exec "${CONFIG_SHELL-/bin/sh}" "$@"' \
-- "$GNULIB_SRCDIR/build-aux/bootstrap" \
"$0" "$@" --no-bootstrap-sync
}
fi
gnulib_tool=$GNULIB_SRCDIR/gnulib-tool gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
<$gnulib_tool || exit <$gnulib_tool || exit

View File

@@ -65,3 +65,5 @@ bootstrap_epilogue()
# the time of a bootstrap. # the time of a bootstrap.
touch src/parse-gram.[ch] touch src/parse-gram.[ch]
} }
bootstrap_sync=true

2
gnulib

Submodule gnulib updated: 8b9b4bbba5...9aa2d4c522