2 # ylwrap - wrapper for lex/yacc invocations.
3 # Written by Tom Tromey <tromey@cygnus.com>, Aug 11 1996
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2, or (at your option)
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 # ylwrap PROG [OUTPUT DESIRED]... -- [ARGS]...
21 # * PROG is program to run.
22 # * OUTPUT is file PROG generates
23 # * DESIRED is file we actually want
24 # * ARGS are passed to PROG
25 # Any number of OUTPUT,DESIRED pairs may be used.
32 while test "$#" -ne 0; do
33 if test "$1" = "--"; then
36 pairlist
="$pairlist $1"
40 $prog ${1+"$@"} ||
exit $?
46 while test "$#" -ne 0; do
48 mv "$1" "$2" || status
=$?
50 # A missing file is only an error for the first file. This is a
51 # blatant hack to let us support using "yacc -d". If -d is not
52 # specified, we don't want an error when the header file is
54 if test $first = yes; then