perl 5.0 alpha 9
[p5sagit/p5-mst-13.2.git] / U / yacc.U
1 ?RCS: $Id: yacc.U,v 3.0 1993/08/18 12:10:03 ram Exp $
2 ?RCS:
3 ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
4 ?RCS: 
5 ?RCS: You may redistribute only under the terms of the Artistic Licence,
6 ?RCS: as specified in the README file that comes with the distribution.
7 ?RCS: You may reuse parts of this distribution only within the terms of
8 ?RCS: that same Artistic Licence; a copy of which may be found at the root
9 ?RCS: of the source tree for dist 3.0.
10 ?RCS:
11 ?RCS: $Log: yacc.U,v $
12 ?RCS: Revision 3.0  1993/08/18  12:10:03  ram
13 ?RCS: Baseline for dist 3.0 netwide release.
14 ?RCS:
15 ?MAKE:yacc yaccflags: Guess Myread Oldconfig byacc bison cat test package
16 ?MAKE:  -pick add $@ %<
17 ?S:yacc:
18 ?S:     This variable holds the name of the compiler compiler we
19 ?S:     want to use in the Makefile. It can be yacc, byacc, or bison -y.
20 ?S:.
21 ?S:yaccflags:
22 ?S:     This variable contains any additional yacc flags desired by the
23 ?S:     user.  It is up to the Makefile to use this.
24 ?S:.
25 : determine compiler compiler
26 case "$yacc" in
27 '')
28         dflt=yacc;;
29 *)
30         dflt="$yacc";;
31 esac
32 echo " "
33 rp="yacc"
34 if $test -f "$byacc"; then
35         dflt="$byacc"
36         rp="byacc or $rp"
37 fi
38 if $test -f "$bison"; then
39         rp="$rp or bison -y"
40 fi
41 $cat <<EOM
42 $package no longer requires a compiler compiler, so the following is optional.
43 EOM
44 rp="Which compiler compiler ($rp) shall I use?"
45 . ./myread
46 yacc="$ans"
47 case "$yacc" in
48 *bis*)
49         case "$yacc" in
50         *-y*) ;;
51         *)
52                 yacc="$yacc -y"
53                 echo "(Adding -y option to bison to get yacc-compatible behaviour.)"
54                 ;;
55         esac
56         ;;
57 esac
58
59 @if yaccflags
60 : see if we need extra yacc flags
61 dflt="$yaccflags"
62 case "$dflt" in
63 '') dflt=none;;
64 esac
65 $cat <<EOH
66
67 Your yacc program may need extra flags to normally process the parser sources.
68 Do NOT specify any -d or -v flags here, since those are explicitely known
69 by the various Makefiles. However, if your machine has strange/undocumented
70 options (like -Sr# on SCO to specify the maximum number of grammar rules), then
71 please add them here.  To use no flags, specify the word "none".
72
73 EOH
74 rp="Any additional yacc flags?"
75 . ./myread
76 case "$ans" in
77 none) yaccflags='';;
78 *) yaccflags="$ans";;
79 esac
80
81 @end