source: trunk/m4/bison_ylwrap.sh @ 1

Revision 1, 787 bytes checked in by mmamonski, 13 years ago (diff)

Torque/PBS DRMAA initial commit

  • Property svn:executable set to *
Line 
1#!/bin/sh
2# ylwrap script specially crafted for Bison
3
4input="$1"; shift
5
6while true; do
7        case "$1" in
8                "")  exit 1;;
9                --)  shift; break;;
10                *)   shift;;
11        esac
12done
13
14prog="$1"; shift; args=($@)
15if [ ${prog} != "bison" ]; then
16        cat >&2 <<EOF
17 * ERROR: Bison was not found at configuration time while some sources are
18 * build by it.  Either install Bison <http://www.gnu.org/software/bison/>
19 * or download tarball with generated sources included (than you will
20 * not be able to modify .y files).
21EOF
22        exit 1
23fi
24
25real_args=()
26for i in ${args[@]}; do
27        case "$i" in
28                -y)  ;;
29                --yacc)  ;;
30                *)  real_args=(${real_args[@]} "$i") ;;
31        esac
32done
33
34echo "${prog} --output=`basename ${input} .y`.c ${real_args[@]} ${input}"
35${prog} --output=`basename ${input} .y`.c ${real_args[@]} ${input}
36
37
Note: See TracBrowser for help on using the repository browser.