mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-21 02:03:03 +00:00
Find sha1sum when named gsha1sum.
* bootstrap (find_tool): New. ($SHA1SUM): New.
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
2007-11-04 Akim Demaille <demaille@gostai.com>
|
||||||
|
|
||||||
|
Find sha1sum when named gsha1sum.
|
||||||
|
* bootstrap (find_tool): New.
|
||||||
|
($SHA1SUM): New.
|
||||||
|
|
||||||
2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
|
2007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
|
||||||
|
|
||||||
Deprecate %pure-parser and add `%define api.pure'. Discussed starting
|
Deprecate %pure-parser and add `%define api.pure'. Discussed starting
|
||||||
|
|||||||
51
bootstrap
51
bootstrap
@@ -41,16 +41,16 @@ Bootstrap this package from the checked-out sources.
|
|||||||
|
|
||||||
Options:
|
Options:
|
||||||
--gnulib-srcdir=DIRNAME Specify the local directory where gnulib
|
--gnulib-srcdir=DIRNAME Specify the local directory where gnulib
|
||||||
sources reside. Use this if you already
|
sources reside. Use this if you already
|
||||||
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.
|
them again.
|
||||||
--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.
|
||||||
--skip-po Do not download po files.
|
--skip-po Do not download po files.
|
||||||
--cvs-user=USERNAME Set the username to use when checking out
|
--cvs-user=USERNAME Set the username to use when checking out
|
||||||
sources from the gnulib repository.
|
sources from the gnulib repository.
|
||||||
|
|
||||||
If the file bootstrap.conf exists in the current working directory, its
|
If the file bootstrap.conf exists in the current working directory, its
|
||||||
contents are read as shell variables to configure the bootstrap.
|
contents are read as shell variables to configure the bootstrap.
|
||||||
@@ -139,6 +139,37 @@ 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
|
||||||
|
|
||||||
|
# find_tool ENVVAR NAMES...
|
||||||
|
# -------------------------
|
||||||
|
find_tool ()
|
||||||
|
{
|
||||||
|
# Find sha1sum, named gsha1sum on MacPorts.
|
||||||
|
find_tool_envvar=$1
|
||||||
|
shift
|
||||||
|
if eval test x"\$$find_tool_envvar" = x; then
|
||||||
|
for i
|
||||||
|
do
|
||||||
|
if ($i --version </dev/null) >/dev/null 2>&1; then
|
||||||
|
find_tool_res=$i
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
if test x"$find_tool_res" = x; then
|
||||||
|
echo >&2 "$0: $find_tool_name is required"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
($find_tool_res --version </dev/null) >/dev/null 2>&1 || {
|
||||||
|
echo >&2 "$0: cannot run $find_tool_res --version"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
eval "$find_tool_envvar=\"$find_tool_res\""
|
||||||
|
eval "export $find_tool_envvar"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Find sha1sum, named gsha1sum on MacPorts.
|
||||||
|
find_tool SHA1SUM sha1sum gsha1sum
|
||||||
|
|
||||||
# Override the default configuration, if necessary.
|
# Override the default configuration, if necessary.
|
||||||
test -r bootstrap.conf && . ./bootstrap.conf
|
test -r bootstrap.conf && . ./bootstrap.conf
|
||||||
|
|
||||||
@@ -284,9 +315,9 @@ update_po_files() {
|
|||||||
for po in `cd $ref_po_dir && echo *.po|sed 's/\.po//g'`; do
|
for po in `cd $ref_po_dir && echo *.po|sed 's/\.po//g'`; do
|
||||||
new_po="$ref_po_dir/$po.po"
|
new_po="$ref_po_dir/$po.po"
|
||||||
cksum_file="$ref_po_dir/$po.s1"
|
cksum_file="$ref_po_dir/$po.s1"
|
||||||
if ! sha1sum -c --status "$cksum_file" < "$new_po" > /dev/null; then
|
if ! "$SHA1SUM" -c --status "$cksum_file" < "$new_po" > /dev/null; then
|
||||||
echo "updated $po_dir/$po.po..."
|
echo "updated $po_dir/$po.po..."
|
||||||
cp "$new_po" "$po_dir/$po.po" && sha1sum < "$new_po" > "$cksum_file"
|
cp "$new_po" "$po_dir/$po.po" && "$SHA1SUM" < "$new_po" > "$cksum_file"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
@@ -435,9 +466,9 @@ slurp() {
|
|||||||
test "$dir/$file" = "$excluded_file" && continue 2
|
test "$dir/$file" = "$excluded_file" && continue 2
|
||||||
done
|
done
|
||||||
if test $file = Makefile.am; then
|
if test $file = Makefile.am; then
|
||||||
copied=$copied${sep}$gnulib_mk; sep=$nl
|
copied=$copied${sep}$gnulib_mk; sep=$nl
|
||||||
remove_intl='/^[^#].*\/intl/s/^/#/;'"s!$bt_regex/!!g"
|
remove_intl='/^[^#].*\/intl/s/^/#/;'"s!$bt_regex/!!g"
|
||||||
sed "$remove_intl" $1/$dir/$file | cmp -s - $dir/$gnulib_mk || {
|
sed "$remove_intl" $1/$dir/$file | cmp -s - $dir/$gnulib_mk || {
|
||||||
echo "$0: Copying $1/$dir/$file to $dir/$gnulib_mk ..." &&
|
echo "$0: Copying $1/$dir/$file to $dir/$gnulib_mk ..." &&
|
||||||
rm -f $dir/$gnulib_mk &&
|
rm -f $dir/$gnulib_mk &&
|
||||||
sed "$remove_intl" $1/$dir/$file >$dir/$gnulib_mk
|
sed "$remove_intl" $1/$dir/$file >$dir/$gnulib_mk
|
||||||
|
|||||||
Reference in New Issue
Block a user