2001-01-24 00:31:17 +00:00
|
|
|
<sect2>
|
|
|
|
<title>Installation of Flex</title>
|
|
|
|
|
2001-07-22 20:45:10 +01:00
|
|
|
<para>Install Flex by running the following commands:</para>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
2001-10-27 23:21:44 +01:00
|
|
|
<para><screen><userinput>./configure --prefix=/usr &&
|
|
|
|
make &&
|
2001-11-06 00:57:01 +00:00
|
|
|
make install</userinput></screen></para>
|
2001-01-24 00:31:17 +00:00
|
|
|
|
2001-11-06 00:49:29 +00:00
|
|
|
<para>Some programs don't know about flex and try to find the lex program
|
|
|
|
(flex is a (better) alternative for lex). So to please those few
|
|
|
|
programs out there we'll create a lex script that calls flex and have
|
|
|
|
it emulate lex.</para>
|
|
|
|
|
|
|
|
<para>Create a new file <filename>/usr/bin/lex</filename> by running the
|
|
|
|
following:</para>
|
|
|
|
|
|
|
|
<para><screen><userinput>cat > /usr/bin/lex << "EOF"</userinput>
|
|
|
|
#!/bin/sh
|
|
|
|
# Begin /usr/bin/lex
|
|
|
|
|
|
|
|
exec /usr/bin/flex -l "$@"
|
|
|
|
|
|
|
|
# End /usr/bin/lex
|
|
|
|
<userinput>EOF
|
|
|
|
chmod 755 /usr/bin/lex</userinput></screen></para>
|
|
|
|
|
2001-01-24 00:31:17 +00:00
|
|
|
</sect2>
|
|
|
|
|