flex.xml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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>To have the results tested, issue:
  18. <userinput>make bigcheck</userinput>.</para>
  19. <para>And install the package:</para>
  20. <screen><userinput>make install</userinput></screen>
  21. <para>There are some packages that expect to find the <emphasis>lex</emphasis>
  22. library in <filename>/usr/lib</filename>. Create a symlink to account for
  23. this:</para>
  24. <screen><userinput>ln -s libfl.a /usr/lib/libl.a</userinput></screen>
  25. <para>A few programs don't know about <command>flex</command> yet and try
  26. to run its predecessor <command>lex</command>. To support those programs,
  27. create a wrapper script named <filename>lex</filename> that calls
  28. <command>flex</command> in <emphasis>lex</emphasis> emulation mode:</para>
  29. <screen><userinput>cat &gt; /usr/bin/lex &lt;&lt; "EOF"</userinput>
  30. #!/bin/sh
  31. # Begin /usr/bin/lex
  32. exec /usr/bin/flex -l "$@"
  33. # End /usr/bin/lex
  34. <userinput>EOF
  35. chmod 755 /usr/bin/lex</userinput></screen>
  36. </sect2>
  37. &aa-flex-shortdesc;
  38. &aa-flex-desc;
  39. </sect1>