3 # Wrapper around a non installed bison to make it work as an installed one.
5 abs_top_srcdir='@abs_top_srcdir@'
6 abs_top_builddir='@abs_top_builddir@'
8 # Use the shipped files, not those installed.
9 BISON_PKGDATADIR=$abs_top_srcdir/data
10 export BISON_PKGDATADIR
11 $PREBISON "$abs_top_builddir/src/bison" ${1+"$@"}
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).
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;' \