flex-inst.xml 835 B

123456789101112131415161718192021222324252627282930
  1. <sect2>
  2. <title>Installation of Flex</title>
  3. <para>Install Flex by running the following commands:</para>
  4. <para><screen><userinput>./configure --prefix=/usr &amp;&amp;
  5. make &amp;&amp;
  6. make install &amp;&amp;
  7. ln -s libfl.a /usr/lib/libl.a</userinput></screen></para>
  8. <para>Some programs don't know about flex and try to find the lex program
  9. (flex is a (better) alternative for lex). So to please those few
  10. programs out there we'll create a bash script called lex that calls flex
  11. and have it emulate lex.</para>
  12. <para>Create a new file <filename>/usr/bin/lex</filename> by running the
  13. following:</para>
  14. <para><screen><userinput>cat &gt; /usr/bin/lex &lt;&lt; "EOF"</userinput>
  15. #!/bin/sh
  16. # Begin /usr/bin/lex
  17. exec /usr/bin/flex -l "$@"
  18. # End /usr/bin/lex
  19. <userinput>EOF
  20. chmod 755 /usr/bin/lex</userinput></screen></para>
  21. </sect2>