]> git.saurik.com Git - bison.git/blame_incremental - tests/bison.in
* TODO (Complaint submessage indentation): New.
[bison.git] / tests / bison.in
... / ...
CommitLineData
1#! @SHELL@
2# @configure_input@
3# Wrapper around a non installed bison to make it work as an installed one.
4
5abs_top_srcdir='@abs_top_srcdir@'
6abs_top_builddir='@abs_top_builddir@'
7
8# Use the shipped files, not those installed.
9BISON_PKGDATADIR=$abs_top_srcdir/data
10export BISON_PKGDATADIR
11$PREBISON "$abs_top_builddir/src/bison" ${1+"$@"}
12status=$?
13
14# As a special dark magic, if we are actually using this wrapper to
15# compile Bison's src/parse-gram.y, post-process the synclines to
16# avoid dependencies on the user's set up (srcdir vs. builddir).
17PERL=perl
18
19for i
20do
21 case $i in
22 */src/parse-gram.y)
23 if $PERL --version >/dev/null; then
24 # We are called by ylwrap which still uses y.tab.*, and
25 # post-processes the synclines on y.tab.c itself. Don't let it
26 # do it. Besides, it leaves "parse-gram.y" as the source,
27 # dropping the src/ part.
28 perl -pi -e 's{"y\.tab\.}{"src/parse-gram.}g;' \
29 -e 's{".*/(parse-gram\.y)"}{"src/$1"}g;' \
30 y.tab.[ch]
31 fi
32 ;;
33 esac
34done
35
36exit $status
37
38# Local Variables:
39# mode: shell-script
40# End: