From: Paul Eggert Date: Sat, 30 Sep 2006 05:21:35 +0000 (+0000) Subject: Merge bootstrap changes from coreutils. X-Git-Tag: v2.3b~280 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/e3ddc1e355923e9565e1ef66230389c7aa2954a3 Merge bootstrap changes from coreutils. 2006-09-28 Jim Meyering Automatically generated dependencies are important even when all of the sources in a directory come from gnulib. * bootstrap (gnulib_tool): Remove the "no-dependencies" automake option that gnulib-tool adds to what becomes our lib/gnulib.mk. 2006-09-23 Jim Meyering * bootstrap (gnulib_tool_options): Add "--local-dir gl". 2006-09-20 Paul Eggert * bootstrap: Add support for --force. (usage): New function. Describe usage less tersely. (CVS_only_file): New var. --- diff --git a/ChangeLog b/ChangeLog index 39a60e0a..c0912fb5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,24 @@ +2006-09-29 Paul Eggert + + Merge bootstrap changes from coreutils. + + 2006-09-28 Jim Meyering + + Automatically generated dependencies are important even + when all of the sources in a directory come from gnulib. + * bootstrap (gnulib_tool): Remove the "no-dependencies" automake + option that gnulib-tool adds to what becomes our lib/gnulib.mk. + + 2006-09-23 Jim Meyering + + * bootstrap (gnulib_tool_options): Add "--local-dir gl". + + 2006-09-20 Paul Eggert + + * bootstrap: Add support for --force. + (usage): New function. Describe usage less tersely. + (CVS_only_file): New var. + 2006-09-21 Paul Eggert * data/push.c (YYPUSH_MORE): Make it an enum instead. diff --git a/bootstrap b/bootstrap index 8828a7e5..a9124017 100755 --- a/bootstrap +++ b/bootstrap @@ -29,6 +29,28 @@ nl=' LC_ALL=C export LC_ALL +usage() { + echo >&2 "\ +Usage: $0 [OPTION]... +Bootstrap this package from the CVS sources. + +Options: + --gnulib-srcdir=DIRNAME Specify the local directory where gnulib + sources reside. Use this if you already + have gnulib sources on your machine, and + do not want to waste your bandwidth dowloading + them again. + --force Bootstrap even if the sources didn't come from CVS. + --skip-po Do not download po files. + --cvs-user=USERNAME Set the CVS username to be used when accessing + the gnulib repository. + +If the file .bootstrap.conf exists in the current working directory, its +contents are read as shell variables to configure the bootstrap. + +Running without arguments will suffice in most cases. +" +} # Configuration. @@ -86,6 +108,10 @@ XGETTEXT_OPTIONS='\\\ # Files we don't want to import. excluded_files= +# File that should exist with CVS checkout, but not with +# the distributed version. +CVS_only_file=CVS + # Override the default configuration, if necessary. test -r bootstrap.conf && . ./bootstrap.conf @@ -97,7 +123,7 @@ for option do case $option in --help) - echo "$0: usage: $0 [--gnulib-srcdir=DIR] [--cvs-user=USERNAME] [--skip-po]" + usage exit;; --gnulib-srcdir=*) GNULIB_SRCDIR=`expr "$option" : '--gnulib-srcdir=\(.*\)'`;; @@ -105,12 +131,19 @@ do CVS_USER=`expr "$option" : '--cvs-user=\(.*\)'`;; --skip-po) SKIP_PO=t;; + --force) + CVS_only_file=;; *) echo >&2 "$0: $option: unknown option" exit 1;; esac done +if test -n "$CVS_only_file" && test ! -r "$CVS_only_file"; then + echo "$0: Bootstrapping from a non-CVS distribution is a bit risky." >&2 + exit 1 +fi + echo "$0: Bootstrapping CVS $package..." cleanup_gnulib() { @@ -293,10 +326,13 @@ slurp() { if test $file = Makefile.am; then copied=$copied${sep}gnulib.mk; sep=$nl remove_intl='/^[^#].*\/intl/s/^/#/' - sed "$remove_intl" $1/$dir/$file | cmp -s - $dir/gnulib.mk || { + no_dep=no-dependencies + remove_no_dep="/^AUTOMAKE_OPTIONS =.* $no_dep/s/ $no_dep//" + sed_xform="$remove_intl;$remove_no_dep" + sed "$sed_xform" $1/$dir/$file | cmp -s - $dir/gnulib.mk || { echo "$0: Copying $1/$dir/$file to $dir/gnulib.mk ..." && rm -f $dir/gnulib.mk && - sed "$remove_intl" $1/$dir/$file >$dir/gnulib.mk + sed "$sed_xform" $1/$dir/$file >$dir/gnulib.mk } elif { test "${2+set}" = set && test -r $2/$dir/$file; } || grep -F "/$file/" $dir/CVS/Entries 2>/dev/null | @@ -348,6 +384,7 @@ gnulib_tool_options="\ --m4-base $bt/m4/\ --source-base $bt/lib/\ --tests-base $bt/tests\ + --local-dir gl\ " echo "$0: $gnulib_tool $gnulib_tool_options --import ..." $gnulib_tool $gnulib_tool_options --import $gnulib_modules &&