diff options
Diffstat (limited to 'mcon/U/yacc.U')
-rw-r--r-- | mcon/U/yacc.U | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/mcon/U/yacc.U b/mcon/U/yacc.U index a9fe85b..4447b0b 100644 --- a/mcon/U/yacc.U +++ b/mcon/U/yacc.U @@ -1,12 +1,12 @@ -?RCS: $Id: yacc.U,v 3.0.1.1 1994/05/13 15:28:48 ram Exp $ +?RCS: $Id$ ?RCS: -?RCS: Copyright (c) 1991-1993, Raphael Manfredi +?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi ?RCS: ?RCS: You may redistribute only under the terms of the Artistic Licence, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic Licence; a copy of which may be found at the root -?RCS: of the source tree for dist 3.0. +?RCS: of the source tree for dist 4.0. ?RCS: ?RCS: $Log: yacc.U,v $ ?RCS: Revision 3.0.1.1 1994/05/13 15:28:48 ram @@ -15,7 +15,7 @@ ?RCS: Revision 3.0 1993/08/18 12:10:03 ram ?RCS: Baseline for dist 3.0 netwide release. ?RCS: -?MAKE:yacc yaccflags: Guess Myread Oldconfig byacc bison cat test +?MAKE:yacc yaccflags: Guess Myread Loc Oldconfig byacc bison cat test ?MAKE: -pick add $@ %< ?S:yacc: ?S: This variable holds the name of the compiler compiler we @@ -27,21 +27,29 @@ ?S:. ?T:comp : determine compiler compiler -case "$yacc" in -'') - dflt=yacc;; -*) - dflt="$yacc";; -esac echo " " comp='yacc' -if $test -f "$byacc"; then - dflt="$byacc" +if $test -f "$byacc$_exe"; then comp="byacc or $comp" fi -if $test -f "$bison"; then +if $test -f "$bison$_exe"; then comp="$comp or bison -y" fi +case "$yacc" in +'') + yacc=`./loc yacc yacc $pth` + if $test -f "$yacc$_exe"; then + dflt='yacc' + elif $test -f "$byacc$_exe"; then + dflt='byacc' + elif $test -f "$bison$_exe"; then + dflt='bison' + else + dflt='' + fi + ;; +*) dflt="$yacc";; +esac rp="Which compiler compiler ($comp) shall I use?" . ./myread yacc="$ans" |