From 05c1076ba2d1a68fe7f3a5ae618f786b8898d327 Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Mon, 26 Sep 2005 18:32:28 +1000 Subject: Initial import. --- debian/bsdyacc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 debian/bsdyacc (limited to 'debian/bsdyacc') diff --git a/debian/bsdyacc b/debian/bsdyacc new file mode 100644 index 0000000..ce71f4c --- /dev/null +++ b/debian/bsdyacc @@ -0,0 +1,20 @@ +#!/bin/sh -e + +if echo "$@" | grep -q -- -o; then + OUTPUT=$(echo "$@" | + sed 's/.*-o[[:blank:]]\+\([^[:blank:]]\+\)\.c.*/\1/') + OPTIONS=$(echo "$@" | + sed 's/\(.*\)-o[[:blank:]]\+[^[:blank:]]\+\(.*\)/\1\2/') + NEW=1 +else + OUTPUT=$(echo "$@" | + sed -e 's/.*[[:blank:]]\+\([^[:blank:]]\+\)\.y.*/\1/') + OPTIONS="$@" + NEW=0 +fi + +byacc $OPTIONS +if [ $NEW = 1 ]; then + mv y.tab.c $OUTPUT.c +fi +mv y.tab.h $OUTPUT.h -- cgit 1.4.1