]> git.saurik.com Git - bison.git/blob - tests/bison.in
* TODO (Complaint submessage indentation): New.
[bison.git] / tests / bison.in
1 #! @SHELL@
2 # @configure_input@
3 # Wrapper around a non installed bison to make it work as an installed one.
4
5 abs_top_srcdir='@abs_top_srcdir@'
6 abs_top_builddir='@abs_top_builddir@'
7
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+"$@"}
12 status=$?
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).
17 PERL=perl
18
19 for i
20 do
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
34 done
35
36 exit $status
37
38 # Local Variables:
39 # mode: shell-script
40 # End: