Commit | Line | Data |
---|---|---|
33a01fd2 | 1 | ?RCS: $Id$ |
d8875586 MBT |
2 | ?RCS: |
3 | ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi | |
cf39bd7e | 4 | ?RCS: |
33a01fd2 | 5 | ?RCS: You may redistribute only under the terms of the Artistic License, |
d8875586 MBT |
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 | |
33a01fd2 | 8 | ?RCS: that same Artistic License; a copy of which may be found at the root |
d8875586 MBT |
9 | ?RCS: of the source tree for dist 4.0. |
10 | ?RCS: | |
11 | ?RCS: $Log: yacc.U,v $ | |
12 | ?RCS: Revision 3.0.1.1 1994/05/13 15:28:48 ram | |
13 | ?RCS: patch27: added byacc as another alternative (ADO) | |
14 | ?RCS: | |
15 | ?RCS: Revision 3.0 1993/08/18 12:10:03 ram | |
16 | ?RCS: Baseline for dist 3.0 netwide release. | |
17 | ?RCS: | |
18 | ?MAKE:yacc yaccflags: Guess Myread Loc Oldconfig byacc bison cat test | |
19 | ?MAKE: -pick add $@ %< | |
20 | ?S:yacc: | |
21 | ?S: This variable holds the name of the compiler compiler we | |
22 | ?S: want to use in the Makefile. It can be yacc, byacc, or bison -y. | |
23 | ?S:. | |
24 | ?S:yaccflags: | |
25 | ?S: This variable contains any additional yacc flags desired by the | |
26 | ?S: user. It is up to the Makefile to use this. | |
27 | ?S:. | |
28 | ?T:comp | |
29 | : determine compiler compiler | |
30 | echo " " | |
31 | comp='yacc' | |
32 | if $test -f "$byacc$_exe"; then | |
33 | comp="byacc or $comp" | |
34 | fi | |
35 | if $test -f "$bison$_exe"; then | |
36 | comp="$comp or bison -y" | |
37 | fi | |
38 | case "$yacc" in | |
39 | '') | |
40 | yacc=`./loc yacc yacc $pth` | |
41 | if $test -f "$yacc$_exe"; then | |
42 | dflt='yacc' | |
43 | elif $test -f "$byacc$_exe"; then | |
44 | dflt='byacc' | |
45 | elif $test -f "$bison$_exe"; then | |
46 | dflt='bison' | |
47 | else | |
48 | dflt='' | |
49 | fi | |
50 | ;; | |
51 | *) dflt="$yacc";; | |
52 | esac | |
53 | rp="Which compiler compiler ($comp) shall I use?" | |
54 | . ./myread | |
55 | yacc="$ans" | |
56 | case "$yacc" in | |
57 | *bis*) | |
58 | case "$yacc" in | |
59 | *-y*) ;; | |
60 | *) | |
61 | yacc="$yacc -y" | |
62 | echo "(Adding -y option to bison to get yacc-compatible behaviour.)" | |
63 | ;; | |
64 | esac | |
65 | ;; | |
66 | esac | |
67 | ||
68 | @if yaccflags | |
69 | : see if we need extra yacc flags | |
70 | dflt="$yaccflags" | |
71 | case "$dflt" in | |
72 | '') dflt=none;; | |
73 | esac | |
74 | $cat <<EOH | |
75 | ||
76 | Your yacc program may need extra flags to normally process the parser sources. | |
77 | Do NOT specify any -d or -v flags here, since those are explicitly known | |
78 | by the various Makefiles. However, if your machine has strange/undocumented | |
79 | options (like -Sr# on SCO to specify the maximum number of grammar rules), then | |
80 | please add them here. To use no flags, specify the word "none". | |
81 | ||
82 | EOH | |
83 | rp="Any additional yacc flags?" | |
84 | . ./myread | |
85 | case "$ans" in | |
86 | none) yaccflags='';; | |
87 | *) yaccflags="$ans";; | |
88 | esac | |
89 | ||
90 | @end |