From: Stefano Lattarini Date: Tue, 11 Jan 2011 23:02:50 +0000 (+0100) Subject: Merge branch 'yacc-work' X-Git-Tag: ng-0.5a~266 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=066054406dd665a3709c1d187723fc15efb874b3;p=thirdparty%2Fautomake.git Merge branch 'yacc-work' --- 066054406dd665a3709c1d187723fc15efb874b3 diff --cc ChangeLog index 7798c5ee8,430f6ea68..c062875f9 --- a/ChangeLog +++ b/ChangeLog @@@ -1,110 -1,30 +1,137 @@@ + 2011-01-11 Stefano Lattarini + + tests: do not force yacc-requiring tests to use bison + * tests/defs.in: New required entry 'yacc'. Remove old + required entry 'bison'. + * tests/cond35.test ($required): Require yacc, not bison. + * tests/cond36.test: Likewise. + * tests/pr204.test: Likewise. + * tests/silent-many-gcc.test: Likewise. + * tests/silent-many-generic.test: Likewise. + * tests/silent-yacc-gcc.test: Likewise. + * tests/silent-yacc-generic.test: Likewise. + * tests/subpkg.test: Likewise. + * tests/suffix10.test: Likewise. + * tests/yacc-basic.test: Likewise. + * tests/yacc-clean.test: Likewise. + * tests/yacc-d-basic.test: Likewise. + * tests/yacc-d-vpath.test: Likewise. + * tests/yacc-dist-nobuild.test: Likewise. + * tests/yacc-nodist.test: Likewise. + * tests/yacc4.test: Likewise. + * tests/yacc6.test: Likewise. + * tests/yacc7.test: Likewise. + * tests/yacc8.test: Likewise. + * tests/yaccdry.test: Likewise. + * tests/yaccvpath.test: Likewise. + +2011-01-11 Stefano Lattarini + + tests: more consistent checks about invalid options + * tests/aclocal.test: Grepping of automake stderr for messages + reporting invalid options made stricter. + * tests/no-outdir-option.test: Likewise. Also, create a dummy + `Makefile.am', to ensure that the automake failures are really + caused only by unrecognized options. + * tests/automake.test: Added trailing `:' command. Removed + redundant checks on `--help' and `--version' option (already + performed in the test `help*.test'). + +2011-01-11 Stefano Lattarini + + tests: enable 'errexit' shell flag by default. + * tests/defs: Enable `errexit' shell flag (near the end). + Removed redundant comment about the enabling of shell traces. + * tests/README (Writing test cases): Update, and use nicer + formatting in a couple of places. + * All tests: Adjusted by removing now-redundant calls to + 'set -e'. + +2011-01-11 Stefano Lattarini + + tests: work around a texi+cygnus bug causing a spurious XFAIL + * tests/txinfo5b.test: New test, like txinfo5.test but calling + automake with the `-Wno-override' option to work around a bug + in the texinfo + cygnus interaction. + * tests/txinfo5.test: Update heading comments. + * tests/Makefile.am (TEST): Updated. + +2011-01-09 Dave Hart (tiny change) + + Fix another typo in Rule.pm comment. + * lib/Automake/Rule.pm: Fix typo. + +2011-01-09 Peter Rosin + + Fix another typo in Rule.pm comment. + * lib/Automake/Rule.pm: Fix typo. + +2011-01-11 Stefano Lattarini + + tests: texinfo unrecognized extensions + * tests/txinfo-unrecognized-extension.test: New test. + * tests/Makefile.am (TESTS): Update. + + Improve, extend and tweak tests on Texinfo support. + * tests/instdir-texi.test: Add a call to `ls -l' after that to + `make', for debugging. When looking for required tools, do not + redirect the output of "$tool --help" to /dev/null, and do not + uselessly run it in a subshell. + * tests/txinfo.test: Rewritten to run autoconf, ./configure and + make. All checks moved into Makefile.am. + * tests/txinfo8.test: Likewise, and modernize the generated + configure.in. + * tests/txinfo2.test: Moved checks into Makefile.am, and other + minor improvements. + * tests/txinfo5.test: Enable `errexit' shell flag, and related + changes. Add trailing `:' command. + * tests/txinfo6.test: Likewise, and make grepping of generated + Makefile.in stricter. + * tests/txinfo7.test: Enable `errexit' shell flag, and related + changes. Add trailing `:' command. Do not add unnecessary stuff + to Makefile.am. + * tests/txinfo9.test: Verify that more targets which are expected + to be generated only once really are. Make grepping less strict, + to avoid exposing too much internal details. More minor changes. + * tests/txinfo16.test: Add trailing `:'. Prefer cat over echo + for appending to configure.in. Updated/fixed heading comments. + * tests/txinfo23.test: Likewise, and extended a little by making + it check that no info file is created in the $(srcdir). + * tests/txinfo24.test: Likewise. + * tests/txinfo25.test: Likewise. + * tests/txinfo18.test: Add trailing `:'. Prefer cat over echo + for appending to configure.in. Also, check that index files are + cleaned also by "make clean", not only by "make distclean". + * tests/txinfo22.test: Prefer `$me' over hard-coded test name, + and added trailing `:' command. This testcase also used to check + that automake ignores in-line comments when using variables, but + preserves them in the output; these checks (added in commit + "Release-1-7f-4-g9177ef8") do not really pertain to this test, + so they have been moved ... + * tests/comments-in-var-defn.test: ... into this new test. + * tests/txinfo4.test: Escape literal dots in grep regexps. Add + trailing `:' command. + * tests/txinfo29.test: Likewise. Relax grepping of generated + Makefile.in w.r.t. whitespaces. Prefer `cat' over `echo' to + append to configure.in. + * tests/txinfo3.test: Likewise. + * tests/vtexi.test: Improve grepping of Makefile.in (sometimes + make it stricter, sometimes laxer). Move `set -e' setting just + after the inclusion of ./defs. De-uglify a sed command. Other + minor cosmetic improvements. + * tests/vtexi2.test: Make grepping of Makefile.in stricter. Add + trailing `:' command. + * tests/vtexi3.test: New test on version.texi support. + * tests/vtexi4.test: Likewise. + * tests/Makefile.am (TESTS): Updated. + +2011-01-11 Stefano Lattarini + + tests: fix spurious failure in 'tests/yflags-conditional.test' + * tests/yflags-conditional.test: Filter out message "warnings are + treated as errors" from automake stderr, to avoid a false positive + when grepping for extraneous warning messages. + 2011-01-10 Stefano Lattarini yacc: warn about conditional content in *YFLAGS variables diff --cc tests/cond35.test index 120a3ba3c,34a7e7ff7..c3c5f0bb5 --- a/tests/cond35.test +++ b/tests/cond35.test @@@ -17,9 -17,11 +17,9 @@@ # Check rules output for parser defined conditionally. # Report from Roman Fietze. - required='flex bison gcc' + required='flex yacc gcc' . ./defs || Exit 1 -set -e - cat >>configure.in <<'EOF' AM_CONDITIONAL([CASE_A], test -z "$case_B") AC_PROG_CC diff --cc tests/cond36.test index 6b9a74222,d06ed87be..a39ead03d --- a/tests/cond36.test +++ b/tests/cond36.test @@@ -16,9 -16,11 +16,9 @@@ # Check rules output for parser defined conditionally. - required='flex bison gcc' + required='flex yacc gcc' . ./defs || Exit 1 -set -e - cat >>configure.in <<'EOF' AM_CONDITIONAL([CASE_A], test -z "$case_B") AC_PROG_CC diff --cc tests/defs index b5373a9ca,dfb5f2ef3..64ed9856b --- a/tests/defs +++ b/tests/defs @@@ -292,24 -207,27 +285,40 @@@ d texi2dvi-o) # Texi2dvi supports `-o' since Texinfo 4.1. echo "$me: running texi2dvi -o /dev/null --version" - ( texi2dvi -o /dev/null --version ) || exit 77 + texi2dvi -o /dev/null --version || exit 77 + ;; + xsi-shell) + # Try some XSI features. + # Keep this in sync with libtool.m4:_LT_CHECK_SHELL_FEATURES. + echo "$me: trying some XSI constructs" + ( _am_dummy="a/b/c" + test "${_am_dummy##*/},${_am_dummy%/*},${_am_dummy#??}"${_am_dummy%"$_am_dummy"}, \ + = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_am_dummy}" -eq 5' ) || exit 77 ;; + yacc) + if test x"$YACC" = x"no"; then + # The user has explicitly told he doesn't want a yacc program + # to be used. + echo "$me: \$YACC is \"no\", skipping test" >&2 + exit 77 + elif test -z "$YACC"; then + # The user hasn't explicitly specified any yacc program in the + # environment, so we try to use bison, skipping the test if it's + # not found. + YACC='bison -y' + export YACC + echo "$me: running bison --version" + bison --version || exit 77 + fi + ;; - # Generic case: the tool must support --version. *) + # Generic case: the tool must support --version. echo "$me: running $tool --version" + # It is not likely but possible that $tool is a special builtin, + # in which case the shell is allowed to exit after an error. + # So, please leave the subshell here. ( $tool --version ) || exit 77 ;; esac diff --cc tests/pr204.test index 0e69193d4,c87f895a1..27453e0fe --- a/tests/pr204.test +++ b/tests/pr204.test @@@ -17,9 -17,11 +17,9 @@@ # For PR 204. # Sources derived from nodist_ sources should not be distributed. - required='bison gcc' + required='yacc gcc' . ./defs || Exit 1 -set -e - cat >> configure.in <<'EOF' AM_MAINTAINER_MODE AC_PROG_CC diff --cc tests/silent-many-gcc.test index 4bc7e8f4d,5e6d191ae..62dafa196 --- a/tests/silent-many-gcc.test +++ b/tests/silent-many-gcc.test @@@ -21,9 -21,11 +21,9 @@@ # This test requires the GNU compilers; keep it in sync with sister test # `silent-many-generic.test', which should work with generic compilers. - required='gcc g++ gfortran flex bison' + required='gcc g++ gfortran flex yacc' . ./defs || Exit 1 -set -e - # Avoids too much code duplication. do_and_check_silent_build () { diff --cc tests/silent-many-generic.test index 5371dbb6b,ed2744836..b8864793e --- a/tests/silent-many-generic.test +++ b/tests/silent-many-generic.test @@@ -23,9 -23,11 +23,9 @@@ # and forces the use of gcc depmode. # FIXME: generic C++/Fortran compilers should suffice here - required='g++ gfortran flex bison' + required='g++ gfortran flex yacc' . ./defs || Exit 1 -set -e - # Avoids too much code duplication. do_and_check_silent_build () { diff --cc tests/silent-yacc-gcc.test index 009fe5eac,83e6ebee2..624b2cd86 --- a/tests/silent-yacc-gcc.test +++ b/tests/silent-yacc-gcc.test @@@ -17,9 -17,11 +17,9 @@@ # Check silent-rules mode for Yacc, forcing gcc depmode. # Keep this in sync with sister test `silent-yacc-generic.test'. - required='gcc bison' + required='gcc yacc' . ./defs || Exit 1 -set -e - mkdir sub cat >>configure.in <<'EOF' diff --cc tests/silent-yacc-generic.test index 8c7f70a87,553e78bc5..76a290f48 --- a/tests/silent-yacc-generic.test +++ b/tests/silent-yacc-generic.test @@@ -17,9 -17,11 +17,9 @@@ # Check silent-rules mode for Yacc. # Keep this in sync with sister test `silent-yacc-gcc.test'. - required='bison' + required=yacc . ./defs || Exit 1 -set -e - mkdir sub cat >>configure.in <<'EOF' diff --cc tests/subpkg.test index dee41f74f,0eea79dc3..481cbb478 --- a/tests/subpkg.test +++ b/tests/subpkg.test @@@ -17,9 -17,11 +17,9 @@@ # Check subpackage handling. - required='gcc bison' + required='gcc yacc' . ./defs || Exit 1 -set -e - mkdir m4 cat >m4/foo.m4 <<'EOF' diff --cc tests/suffix10.test index 973f81825,e24445561..8160a8d74 --- a/tests/suffix10.test +++ b/tests/suffix10.test @@@ -17,9 -17,11 +17,9 @@@ # Make sure that derivations work with .lo too. # (related to PR/37) - required='libtoolize bison' + required='libtoolize yacc' . ./defs || Exit 1 -set -e - cat >>configure.in <> configure.in << 'END' diff --cc tests/yacc-clean.test index cc3f12449,c8e8863b9..a05e5f23d --- a/tests/yacc-clean.test +++ b/tests/yacc-clean.test @@@ -18,9 -18,11 +18,9 @@@ # are cleaned by "make clean", while .c and .h files derived from # distributed .y sources are cleaned by "make maintainer-clean". - required=bison + required=yacc . ./defs || Exit 1 -set -e - cat >> configure.in << 'END' AC_PROG_CC AC_PROG_YACC diff --cc tests/yacc-d-basic.test index 8af44abd4,11e5ba300..ae60084f1 --- a/tests/yacc-d-basic.test +++ b/tests/yacc-d-basic.test @@@ -17,9 -17,11 +17,9 @@@ # Tests on basic Yacc support for when we have -d in YFLAGS, AM_YFLAGS # or maude_YFLAGS. - required=bison + required=yacc . ./defs || Exit 1 -set -e - tab=' ' distdir=$me-1.0 diff --cc tests/yacc-d-vpath.test index 74d254cd1,bb099904a..b331bf581 --- a/tests/yacc-d-vpath.test +++ b/tests/yacc-d-vpath.test @@@ -22,9 -22,11 +22,9 @@@ # Please keep this in sync with sister test `yaccvpath.test'. - required=bison + required=yacc . ./defs || Exit 1 -set -e - distdir=$me-1.0 cat >> configure.in << 'END' diff --cc tests/yacc-dist-nobuild.test index 765517b13,9061f579e..85a960dc8 --- a/tests/yacc-dist-nobuild.test +++ b/tests/yacc-dist-nobuild.test @@@ -17,9 -17,11 +17,9 @@@ # Check that distributed Yacc-generated parsers are not uselessly # remade from an unpacked distributed tarball. - required=bison + required=yacc . ./defs || Exit 1 -set -e - distdir=$me-1.0 cat >> configure.in << 'END' diff --cc tests/yacc-nodist.test index ebef384e4,46b4167b2..c55f40035 --- a/tests/yacc-nodist.test +++ b/tests/yacc-nodist.test @@@ -16,9 -16,11 +16,9 @@@ # Checks for .c and .h files derived from non-distributed .y sources. - required=bison + required=yacc . ./defs || Exit 1 -set -e - cat >> configure.in << 'END' AC_PROG_CC AC_PROG_YACC diff --cc tests/yacc4.test index 8f272b25e,1d508edc0..06376ec4c --- a/tests/yacc4.test +++ b/tests/yacc4.test @@@ -16,9 -16,11 +16,9 @@@ # Some simple tests of ylwrap functionality. - required='bison gcc' + required='yacc gcc' . ./defs || Exit 1 -set -e - cat >> configure.in << 'END' AC_PROG_CC AC_PROG_YACC diff --cc tests/yacc6.test index 10507569c,bbb587e42..c127d15d7 --- a/tests/yacc6.test +++ b/tests/yacc6.test @@@ -20,9 -20,11 +20,9 @@@ # Also make sure depcomp does not needlessly update headers. # Report from Paolo Bonzini. - required='gcc bison GNUmake' + required='gcc yacc GNUmake' . ./defs || Exit 1 -set -e - cat > configure.in << 'END' AC_INIT([yacc6], [1.0]) # `aux' is not an acceptable file/directory name on Windows systems diff --cc tests/yacc7.test index ce236dfa4,6d4815d78..5cea7afc5 --- a/tests/yacc7.test +++ b/tests/yacc7.test @@@ -21,9 -21,11 +21,9 @@@ # Also check that the sources of the generated parser are distributed. # PR/47. - required=bison + required=yacc . ./defs || Exit 1 -set -e - cat >> configure.in << 'END' AC_PROG_CC AC_PROG_YACC diff --cc tests/yaccdry.test index 4daa04af5,d30fb802e..f30e7f3f2 --- a/tests/yaccdry.test +++ b/tests/yaccdry.test @@@ -16,9 -16,11 +16,9 @@@ # Removal recovery rules for headers should not remove files with `make -n'. - required=bison + required=yacc . ./defs || Exit 1 -set -e - cat >> configure.in << 'END' AC_PROG_CC AC_PROG_YACC diff --cc tests/yaccvpath.test index 170936ffd,52092fa2b..c998373c6 --- a/tests/yaccvpath.test +++ b/tests/yaccvpath.test @@@ -23,9 -23,11 +23,9 @@@ # Please keep this in sync with sister test `yacc-d-vpath.test'. - required=bison + required=yacc . ./defs || Exit 1 -set -e - distdir=$me-1.0 cat >> configure.in << 'END'