Fixes automake bug#7648.
The current logic of ylwrap is to call yacc in a sub directory, and
pull out of it all the files that were requested on its command line.
Reverse this approach: export *all* the files created in the
subdirectory, but rename them according to what the command says.
This way, extra files, such as position.hh, location.hh and stack.hh
for C++ parsers, but also parser.xml or parser.dot if XML or Dot
output is enabled, will be preserved.
* lib/ylwrap (pairlist): Remove.
(main loop): Don't loop over pairlist, but over the files in the
temporary directory.
* t/list-of-tests.mk (XFAIL_TESTS): Fixes t/yacc-bison-skeleton-cxx.sh.
* THANKS (James Bostock): Add, he reported bug#7648.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Inoue inoue@ainet.or.jp
Jack Kelly jack@jackkelly.name
James Amundson amundson@users.sourceforge.net
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
James Henstridge james@daa.com.au
James R. Van Zandt jrv@vanzandt.mv.com
James Youngman jay@gnu.org
#! /bin/sh
# ylwrap - wrapper for lex/yacc invocations.
#! /bin/sh
# ylwrap - wrapper for lex/yacc invocations.
-scriptversion=2012-07-13.14; # UTC
+scriptversion=2012-07-14.08; # UTC
# Copyright (C) 1996-2012 Free Software Foundation, Inc.
#
# Copyright (C) 1996-2012 Free Software Foundation, Inc.
#
# The parser itself, the first file, is the destination of the .y.c
# rule in the Makefile.
parser=$1
# The parser itself, the first file, is the destination of the .y.c
# rule in the Makefile.
parser=$1
-# The list of file to rename: FROM TO...
-pairlist=
# 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.
# 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.
- pairlist="$pairlist $from $to"
rename_sed="${rename_sed}s|"`quote_for_sed "$from"`"|$to|g;"
done
rename_sed="${rename_sed}s|"`quote_for_sed "$from"`"|$to|g;"
done
ret=$?
if test $ret -eq 0; then
ret=$?
if test $ret -eq 0; then
- set X $pairlist
- shift
- while test "$#" -ne 0; do
- from=$1
- to=$2
+ 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 '../'.
if test -f "$from"; then
# If $2 is an absolute path name, then just use that,
# otherwise prepend '../'.
XFAIL_TESTS = \
t/all.sh \
XFAIL_TESTS = \
t/all.sh \
-t/yacc-bison-skeleton-cxx.sh \
t/cond17.sh \
t/gcj6.sh \
t/override-conditional-2.sh \
t/cond17.sh \
t/gcj6.sh \
t/override-conditional-2.sh \