Commit | Line | Data |
---|---|---|
d8875586 MBT |
1 | ?RCS: $Id: lex.U 1 2006-08-24 12:32:52Z rmanfredi $ |
2 | ?RCS: | |
3 | ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi | |
cf39bd7e | 4 | ?RCS: |
d8875586 MBT |
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 4.0. | |
10 | ?RCS: | |
11 | ?RCS: Orginal Author: Graham Stoney <greyham@research.canon.oz.au> | |
12 | ?RCS: | |
13 | ?RCS: $Log: lex.U,v $ | |
14 | ?RCS: Revision 3.0.1.3 1994/10/29 16:22:50 ram | |
15 | ?RCS: patch36: spurious single quote could cause Configure to crash | |
16 | ?RCS: patch36: (reported by Xavier Le Vourch <xavierl@eiffel.com>.) | |
17 | ?RCS: | |
18 | ?RCS: Revision 3.0.1.2 1994/08/29 16:27:09 ram | |
19 | ?RCS: patch32: added lexflags variable for lex flags setting | |
20 | ?RCS: | |
21 | ?RCS: Revision 3.0.1.1 1994/05/06 15:06:01 ram | |
22 | ?RCS: patch23: added trailing blank line for metalint | |
23 | ?RCS: | |
24 | ?RCS: Revision 3.0 1993/08/18 12:08:55 ram | |
25 | ?RCS: Baseline for dist 3.0 netwide release. | |
26 | ?RCS: | |
27 | ?MAKE:lex lexflags: Guess Myread Oldconfig flex test | |
28 | ?MAKE: -pick add $@ %< | |
29 | ?S:lex: | |
30 | ?S: This variable holds the name of the lexical analyser generator we | |
31 | ?S: want to use in the Makefile. It can be lex or flex. | |
32 | ?S:. | |
33 | ?S:lexflags: | |
34 | ?S: This variable holds any flags that should be passed to the lexical | |
35 | ?S: analyzer. It is up to the Makefile to use it. | |
36 | ?S:. | |
37 | : determine lexical analyser generator | |
38 | case "$lex" in | |
39 | '') | |
40 | dflt=lex;; | |
41 | *) | |
42 | dflt="$lex";; | |
43 | esac | |
44 | echo " " | |
45 | if $test -f "$flex"; then | |
46 | rp='Which lexical analyser generator (lex or flex) shall I use?' | |
47 | else | |
48 | rp='Which lexical analyser generator shall I use?' | |
49 | fi | |
50 | . ./myread | |
51 | lex="$ans" | |
52 | ||
53 | @if lexflags | |
54 | : if using lex this will normally be useless, but flex frequently takes args | |
55 | echo " " | |
56 | case "$lexflags" in | |
57 | '') dflt='none';; | |
58 | *) dflt="$lexflags";; | |
59 | esac | |
60 | rp="What flags should be given to $lex?" | |
61 | . ./myread | |
62 | case "$ans" in | |
63 | none) lexflags='';; | |
64 | *) lexflags="$ans";; | |
65 | esac | |
66 | ||
67 | @end |