From: Paul Eggert Date: Wed, 26 May 2004 06:46:02 +0000 (+0000) Subject: * bootstrap: Don't assume $(...) works; use `...` instead. X-Git-Tag: BISON-2_0~150 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/b9c85d5cef6ecfd068a1010b4e130c83d1f802e5?hp=4bfd5e4e5373627074d31ec2f15b2eb1947b8f5c * bootstrap: Don't assume $(...) works; use `...` instead. --- diff --git a/ChangeLog b/ChangeLog index d9c58f8d..ee7e4593 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2004-05-25 Paul Eggert + * bootstrap: Don't assume $(...) works; use `...` instead. + Problem reported by Paul Hilfinger. Also, diagnose non-GNU + gettext better. + * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's put into the -d output file, and mention what to do if YYSTYPE is defined as a macro. @@ -14,7 +18,7 @@ configure.ac. Warn users to ignore robots.txt ERROR 404. * bootstrap: Undo today's earlier change (logged below). * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise. - + The gettext version checking is causing more trouble than it's curing; remove it. Problem reported by Paul Hilfinger. diff --git a/bootstrap b/bootstrap index 34dce9d4..dcea122b 100755 --- a/bootstrap +++ b/bootstrap @@ -46,11 +46,24 @@ done # Check that gettext version matches what's in configure.ac. # FIXME: We shouldn't have to modify configure.ac every time # a new gettext version comes out. -gettext_have=$(LC_ALL=C gettext --version | sed 's/.* //; 1q') -gettext_need=$( +{ + gettext_version_output=`LC_ALL=C gettext --version` && + case $gettext_version_output in + 'gettext (GNU '*) ;; + *) false;; + esac +} || { + echo >&2 "$0: Please install GNU gettext first." + exit 1 +} +newline=' +' +last_word_in_first_line="[^$newline]* \\([^$newline]*\\)" +gettext_have=`expr "$gettext_version_output" : "$last_word_in_first_line"` +gettext_need=` sed -n '/^AM_GNU_GETTEXT_VERSION/{ s/.*\[//; s/].*//; p; q; }' configure.ac -) -test "$gettext_have" = "$gettext_need" || { +` +[ "$gettext_have" = "$gettext_need" ] || { echo >&2 "$0: Your gettext version is $gettext_have." echo >&2 "$0: Please install and use gettext-$gettext_need instead." exit 1 @@ -223,7 +236,7 @@ mv m4/gettext.m4t m4/gettext.m4 || exit # remove this once the bug is fixed. grep @top_builddir@ po/Makefile.in.in >/dev/null || { echo "$0: prepending 'top_builddir=@top_builddir@' to po/Makefile.in.in ... " - old_contents=$(cat po/Makefile.in.in) || exit + old_contents=`cat po/Makefile.in.in` || exit cat >po/Makefile.in.in <p # if src/parse-gram.[ch] are out of date, rebuild them. -parse_gram_y=$(find src/parse-gram.y \ +parse_gram_y=`find src/parse-gram.y \ '(' -newer src/parse-gram.c -o -newer src/parse-gram.h ')' \ - -print) || exit + -print` || exit case $parse_gram_y in ?*) echo "$0: warning: bootstrapping with old src/parse-gram.[ch] files."