diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-07-16 11:16:15 +0200 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-07-16 11:16:15 +0200 |
commit | 094b83a641e3b5b4aedf8820cb2af9d1c32cb476 (patch) | |
tree | b0f3e355941214e9a3325237690c6ba483e6008c | |
parent | 7eccbf44fcee432c20ccd95b384f1c3494e4712c (diff) | |
parent | 455437e864ee89f3e09b2d18a7215a79291925d1 (diff) | |
download | automake-094b83a641e3b5b4aedf8820cb2af9d1c32cb476.tar.gz |
Merge branch 'maint'
* maint:
fixup: delete "# serial" line in m4/amversion.in
news: update about recent ylwrap changes and fixes
m4: get rid of "# serial" lines
configure: ${#param} must be supported by the shell for the testsuite
yacc tests: fix a spurious failure with parallel make
ylwrap: use proper quoting inside a `...` substitution
ylwrap: don't uselessly reset the exit status in case of failure
ylwrap: fix C++ support for Bison
ylwrap: refactor: move loop invariant
ylwrap: refactoring: don't rely on the file order
tests: upgrade and fix Bison test case
tests: fix bison input file
ylwrap: comment changes
ylwrap: modernize idioms
ylwrap: rename header inclusion in generated parsers
ylwrap: simplify the list of renamings
ylwrap: refactor: less duplication
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
-rw-r--r-- | NEWS | 18 | ||||
-rw-r--r-- | THANKS | 1 | ||||
-rw-r--r-- | configure.ac | 8 | ||||
-rwxr-xr-x | lib/ylwrap | 172 | ||||
-rw-r--r-- | m4/amversion.in | 2 | ||||
-rw-r--r-- | m4/amversion.m4 | 2 | ||||
-rw-r--r-- | m4/ar-lib.m4 | 2 | ||||
-rw-r--r-- | m4/as.m4 | 2 | ||||
-rw-r--r-- | m4/auxdir.m4 | 2 | ||||
-rw-r--r-- | m4/cond-if.m4 | 3 | ||||
-rw-r--r-- | m4/cond.m4 | 2 | ||||
-rw-r--r-- | m4/depend.m4 | 1 | ||||
-rw-r--r-- | m4/depout.m4 | 1 | ||||
-rw-r--r-- | m4/dmalloc.m4 | 2 | ||||
-rw-r--r-- | m4/gcj.m4 | 2 | ||||
-rw-r--r-- | m4/init.m4 | 2 | ||||
-rw-r--r-- | m4/install-sh.m4 | 2 | ||||
-rw-r--r-- | m4/lead-dot.m4 | 2 | ||||
-rw-r--r-- | m4/lex.m4 | 2 | ||||
-rw-r--r-- | m4/lispdir.m4 | 2 | ||||
-rw-r--r-- | m4/maintainer.m4 | 2 | ||||
-rw-r--r-- | m4/make.m4 | 2 | ||||
-rw-r--r-- | m4/minuso.m4 | 2 | ||||
-rw-r--r-- | m4/missing.m4 | 3 | ||||
-rw-r--r-- | m4/options.m4 | 2 | ||||
-rw-r--r-- | m4/protos.m4 | 2 | ||||
-rw-r--r-- | m4/python.m4 | 1 | ||||
-rw-r--r-- | m4/runlog.m4 | 2 | ||||
-rw-r--r-- | m4/sanity.m4 | 2 | ||||
-rw-r--r-- | m4/silent.m4 | 2 | ||||
-rw-r--r-- | m4/strip.m4 | 2 | ||||
-rw-r--r-- | m4/substnot.m4 | 2 | ||||
-rw-r--r-- | m4/tar.m4 | 2 | ||||
-rw-r--r-- | m4/upc.m4 | 2 | ||||
-rw-r--r-- | m4/vala.m4 | 2 | ||||
-rw-r--r-- | t/list-of-tests.mk | 2 | ||||
-rwxr-xr-x | t/yacc-bison-skeleton-cxx.sh | 20 | ||||
-rwxr-xr-x | t/yacc-bison-skeleton.sh | 8 | ||||
-rwxr-xr-x | t/yacc-d-basic.sh | 9 |
39 files changed, 143 insertions, 156 deletions
@@ -139,10 +139,28 @@ New in 1.12.3: giving more useful warnings than a bare "command not found" from a make recipe would. +* M4 files: + + - The '.m4' files provided by Automake does not define serial numbers + anymore. This should cause no difference in the behaviour of aclocal + though. + * Automake Testsuite: - Some testsuite weaknesses and spurious failures have been fixed. +* Long-standing bugs: + + - Instead of renaming only self-references of files (typically for + #lines), ylwrap now also renames references to the other generated + files. This fixes support for GLR and C++ parsers from Bison (PR + automake/491 and automake bug#7648): 'parser.c' now properly + #includes 'parser.h' instead of 'y.tab.h'. + + - Generated files unknown to ylwrap are now preserved. This fixes + C++ support for Bison (automake bug#7648): location.hh and the + like are no longer discarded. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ New in 1.12.2: @@ -150,6 +150,7 @@ Imacat imacat@mail.imacat.idv.tw Inoue inoue@ainet.or.jp Jack Kelly jack@jackkelly.name James Amundson amundson@users.sourceforge.net +James Bostock james.bostock@gmail.com James Henstridge james@daa.com.au James R. Van Zandt jrv@vanzandt.mv.com James Youngman jay@gnu.org diff --git a/configure.ac b/configure.ac index bbaf12cde..69edd9a45 100644 --- a/configure.ac +++ b/configure.ac @@ -303,6 +303,14 @@ AC_DEFUN([_AM_CHECK_CANDIDATE_SHELL], [], [am_score=1; break]) _AM_CHECK_SHELL_FEATURE([$1], + [supports \${@%:@var}], + [zero='' one='x' twelve=' foobar baz!' \ + && test ${@%:@zero} -eq 0 \ + && test ${@%:@one} -eq 1 \ + && test ${@%:@twelve} -eq 12], + [], [am_score=1; break]) + + _AM_CHECK_SHELL_FEATURE([$1], [supports \${var@%:@glob} and \${var%glob}], [v=a/b/c \ && test ${v@%:@*/} = b/c \ diff --git a/lib/ylwrap b/lib/ylwrap index 6879d8deb..7befa46de 100755 --- a/lib/ylwrap +++ b/lib/ylwrap @@ -1,7 +1,7 @@ #! /bin/sh # ylwrap - wrapper for lex/yacc invocations. -scriptversion=2011-08-25.18; # UTC +scriptversion=2012-07-14.08; # UTC # Copyright (C) 1996-2012 Free Software Foundation, Inc. # @@ -29,6 +29,37 @@ scriptversion=2011-08-25.18; # UTC # bugs to <bug-automake@gnu.org> or send patches to # <automake-patches@gnu.org>. +get_dirname () +{ + case $1 in + */*|*\\*) printf '%s\n' "$1" | sed -e 's|\([\\/]\)[^\\/]*$|\1|';; + # Otherwise, we want the empty string (not "."). + esac +} + +# guard FILE +# ---------- +# The CPP macro used to guard inclusion of FILE. +guard() +{ + printf '%s\n' "$from" \ + | sed \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\ + -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g' +} + +# quote_for_sed [STRING] +# ---------------------- +# Return STRING (or stdin) quoted to be used as a sed pattern. +quote_for_sed () +{ + case $# in + 0) cat;; + 1) printf '%s\n' "$1";; + esac \ + | sed -e 's|[][\\.*]|\\&|g' +} + case "$1" in '') echo "$0: No files given. Try '$0 --help' for more information." 1>&2 @@ -62,19 +93,6 @@ EOF ;; esac -get_dirname () -{ - case $1 in - */*|*\\*) printf '%s\n' "$1" | sed -e 's,\([\\/]\)[^\\/]*$,\1,';; - # Otherwise, we want the empty string (not "."). - esac -} - -quote_for_sed () -{ - # FIXME: really we should care about more than '.' and '\'. - sed -e 's,[\\.],\\&,g' -} # The input. input="$1" @@ -90,15 +108,40 @@ case "$input" in input="`pwd`/$input" ;; esac +input_rx=`get_dirname "$input" | quote_for_sed` + +# Since DOS filename conventions don't allow two dots, +# the DOS version of Bison writes out y_tab.c instead of y.tab.c +# and y_tab.h instead of y.tab.h. Test to see if this is the case. +y_tab_nodot=false +if test -f y_tab.c || test -f y_tab.h; then + y_tab_nodot=true +fi -pairlist= +# The parser itself, the first file, is the destination of the .y.c +# rule in the Makefile. +parser=$1 +# A sed program to s/FROM/TO/g for all the FROM/TO so that, for +# instance, we rename #include "y.tab.h" into #include "parse.h" +# during the conversion from y.tab.c to parse.c. +rename_sed= while test "$#" -ne 0; do if test "$1" = "--"; then shift break fi - pairlist="$pairlist $1" + from=$1 + # Handle y_tab.c and y_tab.h output by DOS + if $y_tab_nodot; then + case $from in + "y.tab.c") from=y_tab.c;; + "y.tab.h") from=y_tab.h;; + esac + fi + shift + to=$1 shift + rename_sed="${rename_sed}s|"`quote_for_sed "$from"`"|$to|g;" done # The program to run. @@ -129,90 +172,55 @@ esac ret=$? if test $ret -eq 0; then - set X $pairlist - shift - first=yes - # Since DOS filename conventions don't allow two dots, - # the DOS version of Bison writes out y_tab.c instead of y.tab.c - # and y_tab.h instead of y.tab.h. Test to see if this is the case. - y_tab_nodot="no" - if test -f y_tab.c || test -f y_tab.h; then - y_tab_nodot="yes" - fi - - input_rx=`get_dirname "$input" | quote_for_sed` - - while test "$#" -ne 0; do - from="$1" - # Handle y_tab.c and y_tab.h output by DOS - if test $y_tab_nodot = "yes"; then - if test $from = "y.tab.c"; then - from="y_tab.c" - else - if test $from = "y.tab.h"; then - from="y_tab.h" - fi - fi - fi + for from in * + do + to=`printf '%s\n' "$from" | sed "$rename_sed"` if test -f "$from"; then # If $2 is an absolute path name, then just use that, # otherwise prepend '../'. - case "$2" in - [\\/]* | ?:[\\/]*) target="$2";; - *) target="../$2";; + case $to in + [\\/]* | ?:[\\/]*) target=$to;; + *) target="../$to";; esac - # We do not want to overwrite a header file if it hasn't - # changed. This avoid useless recompilations. However the - # parser itself (the first file) should always be updated, - # because it is the destination of the .y.c rule in the - # Makefile. Divert the output of all other files to a temporary - # file so we can compare them to existing versions. - if test $first = no; then + # Do not overwrite unchanged header files to avoid useless + # recompilations. Always update the parser itself: it is the + # destination of the .y.c rule in the Makefile. Divert the + # output of all other files to a temporary file so we can + # compare them to existing versions. + if test $from != $parser; then realtarget="$target" - target="tmp-`echo $target | sed s/.*[\\/]//g`" + target=tmp-`printf '%s\n' "$target" | sed 's|.*[\\/]||g'` fi - # Munge "#line" or "#" directives. - # We don't want the resulting debug information to point at - # an absolute srcdir. - # We want to use the real output file name, not yy.lex.c for - # instance. - # We want the include guards to be adjusted too. - FROM=`echo "$from" | sed \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\ - -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'` - TARGET=`echo "$2" | sed \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\ - -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'` - - sed -e "/^#/!b" -e "s,$input_rx,$input_sub_rx," -e "s,$from,$2," \ - -e "s,$FROM,$TARGET," "$from" >"$target" || ret=$? - - # Check whether header files must be updated. - if test $first = no; then + + # Munge "#line" or "#" directives. Don't let the resulting + # debug information point at an absolute srcdir. Use the real + # output file name, not yy.lex.c for instance. Adjust the + # include guards too. + FROM=`guard "$from"` + TARGET=`guard "$to"` + sed -e "/^#/!b" -e "s|$input_rx|$input_sub_rx|" -e "$rename_sed" \ + -e "s|$FROM|$TARGET|" "$from" >"$target" || ret=$? + + # Check whether files must be updated. + if test "$from" != "$parser"; then if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then - echo "$2" is unchanged + echo "$to is unchanged" rm -f "$target" else - echo updating "$2" + echo "updating $to" mv -f "$target" "$realtarget" fi fi else - # A missing file is only an error for the first file. This - # is a blatant hack to let us support using "yacc -d". If -d - # is not specified, we don't want an error when the header - # file is "missing". - if test $first = yes; then + # A missing file is only an error for the parser. This is a + # blatant hack to let us support using "yacc -d". If -d is not + # specified, don't fail when the header file is "missing". + if test "$from" = "$parser"; then ret=1 fi fi - shift - shift - first=no done -else - ret=$? fi # Remove the directory. diff --git a/m4/amversion.in b/m4/amversion.in index e44ace137..3661259a3 100644 --- a/m4/amversion.in +++ b/m4/amversion.in @@ -6,8 +6,6 @@ # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 8 - # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been diff --git a/m4/amversion.m4 b/m4/amversion.m4 index 74e79726d..368cd6438 100644 --- a/m4/amversion.m4 +++ b/m4/amversion.m4 @@ -6,8 +6,6 @@ # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 8 - # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been diff --git a/m4/ar-lib.m4 b/m4/ar-lib.m4 index 470def48c..b6b6b0f76 100644 --- a/m4/ar-lib.m4 +++ b/m4/ar-lib.m4 @@ -5,8 +5,6 @@ # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 1 - # AM_PROG_AR([ACT-IF-FAIL]) # ------------------------- # Try to determine the archiver interface, and trigger the ar-lib wrapper @@ -6,8 +6,6 @@ # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 5 - # AM_PROG_AS # ---------- AC_DEFUN([AM_PROG_AS], diff --git a/m4/auxdir.m4 b/m4/auxdir.m4 index 3dda02b26..9cd72c3e8 100644 --- a/m4/auxdir.m4 +++ b/m4/auxdir.m4 @@ -6,8 +6,6 @@ # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 - # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. diff --git a/m4/cond-if.m4 b/m4/cond-if.m4 index 80e687b17..38f5ec979 100644 --- a/m4/cond-if.m4 +++ b/m4/cond-if.m4 @@ -6,8 +6,6 @@ # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 3 - # _AM_COND_IF # _AM_COND_ELSE # _AM_COND_ENDIF @@ -17,7 +15,6 @@ m4_define([_AM_COND_IF]) m4_define([_AM_COND_ELSE]) m4_define([_AM_COND_ENDIF]) - # AM_COND_IF(COND, [IF-TRUE], [IF-FALSE]) # --------------------------------------- # If the shell condition COND is true, execute IF-TRUE, otherwise execute diff --git a/m4/cond.m4 b/m4/cond.m4 index 03644abe0..9ea857e55 100644 --- a/m4/cond.m4 +++ b/m4/cond.m4 @@ -6,8 +6,6 @@ # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 10 - # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. diff --git a/m4/depend.m4 b/m4/depend.m4 index cee31991b..cd9306173 100644 --- a/m4/depend.m4 +++ b/m4/depend.m4 @@ -5,7 +5,6 @@ # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 17 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, diff --git a/m4/depout.m4 b/m4/depout.m4 index ecf62688d..835c32bdd 100644 --- a/m4/depout.m4 +++ b/m4/depout.m4 @@ -6,7 +6,6 @@ # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 7 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ diff --git a/m4/dmalloc.m4 b/m4/dmalloc.m4 index 536ea9130..3e7fdb7b8 100644 --- a/m4/dmalloc.m4 +++ b/m4/dmalloc.m4 @@ -9,8 +9,6 @@ # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 7 - AC_DEFUN([AM_WITH_DMALLOC], [AC_MSG_CHECKING([if malloc debugging is wanted]) AC_ARG_WITH([dmalloc], @@ -7,8 +7,6 @@ # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 8 - AC_DEFUN([AM_PROG_GCJ], [AC_CHECK_TOOLS([GCJ], [gcj], [gcj]) test -z "$GCJ" && AC_MSG_ERROR([no acceptable gcj found in \$PATH]) diff --git a/m4/init.m4 b/m4/init.m4 index d841320d2..1d5dffd95 100644 --- a/m4/init.m4 +++ b/m4/init.m4 @@ -6,8 +6,6 @@ # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 22 - # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. diff --git a/m4/install-sh.m4 b/m4/install-sh.m4 index 8061e7e12..f51c02757 100644 --- a/m4/install-sh.m4 +++ b/m4/install-sh.m4 @@ -5,8 +5,6 @@ # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 8 - # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. diff --git a/m4/lead-dot.m4 b/m4/lead-dot.m4 index 8a8680539..633694fdd 100644 --- a/m4/lead-dot.m4 +++ b/m4/lead-dot.m4 @@ -5,8 +5,6 @@ # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 - # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], @@ -6,8 +6,6 @@ # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 6 - # AM_PROG_LEX # ----------- # Autoconf leaves LEX=: if lex or flex can't be found. Change that to a diff --git a/m4/lispdir.m4 b/m4/lispdir.m4 index c4840f4e2..72dcd8440 100644 --- a/m4/lispdir.m4 +++ b/m4/lispdir.m4 @@ -9,8 +9,6 @@ # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 12 - # AM_PATH_LISPDIR # --------------- AC_DEFUN([AM_PATH_LISPDIR], diff --git a/m4/maintainer.m4 b/m4/maintainer.m4 index ffc1ddfe9..62eef9c72 100644 --- a/m4/maintainer.m4 +++ b/m4/maintainer.m4 @@ -7,8 +7,6 @@ # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 8 - # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. diff --git a/m4/make.m4 b/m4/make.m4 index c4ba1a6d0..245c2e676 100644 --- a/m4/make.m4 +++ b/m4/make.m4 @@ -6,8 +6,6 @@ # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 5 - # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. diff --git a/m4/minuso.m4 b/m4/minuso.m4 index 7787ddf4b..50af200cb 100644 --- a/m4/minuso.m4 +++ b/m4/minuso.m4 @@ -5,8 +5,6 @@ # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 6 - # AM_PROG_CC_C_O # -------------- # Like AC_PROG_CC_C_O, but changed for automake. diff --git a/m4/missing.m4 b/m4/missing.m4 index 2de7fe455..a246a9c93 100644 --- a/m4/missing.m4 +++ b/m4/missing.m4 @@ -6,8 +6,6 @@ # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 8 - # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], @@ -15,7 +13,6 @@ AC_DEFUN([AM_MISSING_PROG], $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) - # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. diff --git a/m4/options.m4 b/m4/options.m4 index 76ad6428c..ebf3cf00d 100644 --- a/m4/options.m4 +++ b/m4/options.m4 @@ -6,8 +6,6 @@ # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 6 - # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], diff --git a/m4/protos.m4 b/m4/protos.m4 index 942154b58..c8c7adc2c 100644 --- a/m4/protos.m4 +++ b/m4/protos.m4 @@ -7,8 +7,6 @@ # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 6 - AC_DEFUN([AM_C_PROTOTYPES], [AC_FATAL([automatic de-ANSI-fication support has been removed])]) diff --git a/m4/python.m4 b/m4/python.m4 index 35488868e..a2478181f 100644 --- a/m4/python.m4 +++ b/m4/python.m4 @@ -9,7 +9,6 @@ # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 9 # AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # --------------------------------------------------------------------------- diff --git a/m4/runlog.m4 b/m4/runlog.m4 index 6d127a830..d983b718e 100644 --- a/m4/runlog.m4 +++ b/m4/runlog.m4 @@ -5,8 +5,6 @@ # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 1 - # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. diff --git a/m4/sanity.m4 b/m4/sanity.m4 index c90bc9809..0415711b8 100644 --- a/m4/sanity.m4 +++ b/m4/sanity.m4 @@ -6,8 +6,6 @@ # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 9 - # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], diff --git a/m4/silent.m4 b/m4/silent.m4 index d499ecb65..6746c6fa6 100644 --- a/m4/silent.m4 +++ b/m4/silent.m4 @@ -5,8 +5,6 @@ # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 3 - # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT diff --git a/m4/strip.m4 b/m4/strip.m4 index 42833ca09..d66f3f2e4 100644 --- a/m4/strip.m4 +++ b/m4/strip.m4 @@ -5,8 +5,6 @@ # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 - # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't diff --git a/m4/substnot.m4 b/m4/substnot.m4 index 64d91ff3e..1830e796d 100644 --- a/m4/substnot.m4 +++ b/m4/substnot.m4 @@ -5,8 +5,6 @@ # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 3 - # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. @@ -6,8 +6,6 @@ # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 3 - # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. @@ -6,8 +6,6 @@ # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 1 - AC_DEFUN([AM_PROG_UPC], [dnl We need OBJEXT and EXEEXT, but Autoconf doesn't offer any public dnl macro to compute them. Use AC_PROG_CC instead. diff --git a/m4/vala.m4 b/m4/vala.m4 index cc6ba53cc..5dad452bf 100644 --- a/m4/vala.m4 +++ b/m4/vala.m4 @@ -6,8 +6,6 @@ # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 6 - # Check whether the Vala compiler exists in $PATH. If it is found, the # variable VALAC is set. Optionally a minimum release number of the # compiler can be requested. diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk index 383be1b6e..2a2899254 100644 --- a/t/list-of-tests.mk +++ b/t/list-of-tests.mk @@ -30,8 +30,6 @@ t/pm/Version3.pl XFAIL_TESTS = \ t/all.sh \ -t/yacc-bison-skeleton-cxx.sh \ -t/yacc-bison-skeleton.sh \ t/cond17.sh \ t/gcj6.sh \ t/override-conditional-2.sh \ diff --git a/t/yacc-bison-skeleton-cxx.sh b/t/yacc-bison-skeleton-cxx.sh index 609ebc24e..a02a25a8c 100755 --- a/t/yacc-bison-skeleton-cxx.sh +++ b/t/yacc-bison-skeleton-cxx.sh @@ -40,10 +40,15 @@ END cat > zardoz.yy << 'END' %skeleton "lalr1.cc" %defines +%locations +%union +{ + int ival; +}; %{ -#define YYSTYPE int -int yylex(YYSTYPE* yylval_param); +int yylex (yy::parser::semantic_type *yylval, + yy::parser::location_type *yylloc); %} %% @@ -51,23 +56,22 @@ start : /* empty */ %% int -yylex(YYSTYPE*) +yylex (yy::parser::semantic_type *yylval, + yy::parser::location_type *yylloc) { - return 0; + return 0; } void -yy::parser::error(const yy::parser::location_type&, const std::string& m) +yy::parser::error(const yy::parser::location_type&, const std::string&) { - return; + return; } END cat > foo.cc << 'END' #include "zardoz.hh" -using namespace std; - int main(int argc, char** argv) { diff --git a/t/yacc-bison-skeleton.sh b/t/yacc-bison-skeleton.sh index 5bf909239..f4fdf327d 100755 --- a/t/yacc-bison-skeleton.sh +++ b/t/yacc-bison-skeleton.sh @@ -30,16 +30,20 @@ cat > Makefile.am << 'END' bin_PROGRAMS = zardoz zardoz_SOURCES = zardoz.y foo.c AM_YFLAGS = -d --skeleton glr.c +BUILT_SOURCES = zardoz.h END # Parser. cat > zardoz.y << 'END' %{ -int yylex () { return 0; } -void yyerror (const char *s) { return; } +int yylex (); +void yyerror (const char *s); %} %% foobar : 'f' 'o' 'o' 'b' 'a' 'r' {}; +%% +int yylex () { return 0; } +void yyerror (const char *s) { return; } END cat > foo.c << 'END' diff --git a/t/yacc-d-basic.sh b/t/yacc-d-basic.sh index 91fbc62d8..72872f24f 100755 --- a/t/yacc-d-basic.sh +++ b/t/yacc-d-basic.sh @@ -54,7 +54,14 @@ void yyerror (char *s) {} x : 'x' {}; %% END -cp foo/parse.y bar/parse.y +# Using ylwrap, we actually generate y.tab.[ch]. Unfortunately, we +# forgot to rename #include "y.tab.h" into #include "parse.h" during +# the conversion from y.tab.c to parse.c. This was OK when Bison was +# not issuing such an #include (up to 2.6). +# +# To make sure that we perform this conversion, in bar/parse.y, use +# y.tab.h instead of parse.c. +sed -e 's/parse\.h/y.tab.h/' <foo/parse.y >bar/parse.y cat > foo/main.c << 'END' #include "parse.h" |