flex.xml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <sect1 id="ch-system-flex" xreflabel="Flex">
  2. <title>Installing Flex-&flex-version;</title>
  3. <?dbhtml filename="flex.html" dir="chapter06"?>
  4. <para>The Flex package contains a utility for generating programs that
  5. recognize patterns in text.</para>
  6. <screen>&buildtime; &flex-time;
  7. &diskspace; &flex-compsize;</screen>
  8. &aa-flex-down;
  9. &aa-flex-dep;
  10. <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
  11. <sect2>
  12. <title>Installation of Flex</title>
  13. <para>Prepare Flex for compilation:</para>
  14. <screen><userinput>./configure --prefix=/usr</userinput></screen>
  15. <para>Compile the package:</para>
  16. <screen><userinput>make</userinput></screen>
  17. <para>This package has a test suite available which can perform a number of
  18. checks to ensure it built correctly. Should you choose to run it, the
  19. following command will do so:</para>
  20. <screen><userinput>make bigcheck</userinput></screen>
  21. <para>And install the package:</para>
  22. <screen><userinput>make install</userinput></screen>
  23. <para>There are some packages that expect to find the <emphasis>lex</emphasis>
  24. library in <filename>/usr/lib</filename>. Create a symlink to account for
  25. this:</para>
  26. <screen><userinput>ln -s libfl.a /usr/lib/libl.a</userinput></screen>
  27. <para>A few programs don't know about <command>flex</command> yet and try
  28. to run its predecessor <command>lex</command>. To support those programs,
  29. create a wrapper script named <filename>lex</filename> that calls
  30. <command>flex</command> in <emphasis>lex</emphasis> emulation mode:</para>
  31. <screen><userinput>cat &gt; /usr/bin/lex &lt;&lt; "EOF"</userinput>
  32. #!/bin/sh
  33. # Begin /usr/bin/lex
  34. exec /usr/bin/flex -l "$@"
  35. # End /usr/bin/lex
  36. <userinput>EOF
  37. chmod 755 /usr/bin/lex</userinput></screen>
  38. </sect2>
  39. &aa-flex-shortdesc;
  40. &aa-flex-desc;
  41. </sect1>