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
#! /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.
#
# 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.
shift
to=$1
shift
- pairlist="$pairlist $from $to"
rename_sed="${rename_sed}s|"`quote_for_sed "$from"`"|$to|g;"
done
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 '../'.
ret=1
fi
fi
- shift
- shift
done
else
ret=$?