X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/ee7e9e3b6600b104ef92c31207e18a2c057d831c..1ef57c947d095b3874748fffc2b0dcb1a41ad567:/bootstrap diff --git a/bootstrap b/bootstrap index edac17e0..c496d29f 100755 --- a/bootstrap +++ b/bootstrap @@ -1,6 +1,6 @@ #! /bin/sh # Print a version string. -scriptversion=2012-01-23.10; # UTC +scriptversion=2012-04-26.13; # UTC # Bootstrap this package from checked-out sources. @@ -36,6 +36,10 @@ nl=' LC_ALL=C export LC_ALL +# Ensure that CDPATH is not set. Otherwise, the output from cd +# would cause trouble in at least one use below. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + local_gl_dir=gl me=$0 @@ -137,7 +141,7 @@ tests_base=tests gnulib_extra_files='' # Additional gnulib-tool options to use. Use "\newline" to break lines. -gnulib_tool_option_extras='--makefile-name=gnulib.mk' +gnulib_tool_option_extras= # Other locale categories that need message catalogs. EXTRA_LOCALE_CATEGORIES= @@ -423,12 +427,28 @@ check_versions() { $use_git || continue fi # Honor $APP variables ($TAR, $AUTOCONF, etc.) - appvar=`echo $app | tr '[a-z]-' '[A-Z]_'` + appvar=`echo $app | LC_ALL=C tr '[a-z]-' '[A-Z]_'` test "$appvar" = TAR && appvar=AMTAR case $appvar in GZIP) ;; # Do not use $GZIP: it contains gzip options. *) eval "app=\${$appvar-$app}" ;; esac + + # 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 + # scripts), but correctly identify themselves (as being part of + # "GNU automake-ng") when asked their version. + case $app in + automake-ng|aclocal-ng) + app=`echo "$app" | sed 's/-ng$//'` + ($app --version | grep '(GNU automake-ng)') >/dev/null 2>&1 || { + echo "$me: Error: '$app' not found or not from Automake-NG" >&2 + ret=1 + continue + } ;; + esac if [ "$req_ver" = "-" ]; then # Merely require app to exist; not all prereq apps are well-behaved # so we have to rely on $? rather than get_version. @@ -604,7 +624,7 @@ if $bootstrap_sync; then fi gnulib_tool=$GNULIB_SRCDIR/gnulib-tool -<$gnulib_tool || exit +<$gnulib_tool || exit $? # Get translations. @@ -758,9 +778,15 @@ fi # Autoreconf runs aclocal before libtoolize, which causes spurious # warnings if the initial aclocal is confused by the libtoolized # (or worse out-of-date) macro directory. +# libtoolize 1.9b added the --install option; but we support back +# to libtoolize 1.5.22, where the install action was default. if test $use_libtool = 1; then - echo "running: $LIBTOOLIZE --copy --install" - $LIBTOOLIZE --copy --install + install= + case $($LIBTOOLIZE --help) in + *--install*) install=--install ;; + esac + echo "running: $LIBTOOLIZE $install --copy" + $LIBTOOLIZE $install --copy fi version_controlled_file() { @@ -807,7 +833,8 @@ for file in $gnulib_files; do symlink_to_dir "$GNULIB_SRCDIR" $file || exit done -bootstrap_post_import_hook +bootstrap_post_import_hook \ + || { echo >&2 "$me: bootstrap_post_import_hook failed"; exit 1; } # Remove any dangling symlink matching "*.m4" or "*.[ch]" in some # gnulib-populated directories. Such .m4 files would cause aclocal to fail. @@ -862,6 +889,16 @@ if test $with_gettext = yes; then } ' po/Makevars.template >po/Makevars || exit 1 + # If the 'gettext' module is in use, grab the latest Makefile.in.in. + # If only the 'gettext-h' module is in use, assume autopoint already + # put the correct version of this file into place. + case $gnulib_modules in + *gettext-h*) ;; + *gettext*) + cp $GNULIB_SRCDIR/build-aux/po/Makefile.in.in po/Makefile.in.in || exit 1 + ;; + esac + if test -d runtime-po; then # Similarly for runtime-po/Makevars, but not quite the same. rm -f runtime-po/Makevars