📄 flex.html
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content= "application/xhtml+xml; charset=iso-8859-1" /> <title> 10.23. Flex-2.5.33 </title> <link rel="stylesheet" href="../stylesheets/lfs.css" type="text/css" /> <meta name="generator" content="DocBook XSL Stylesheets V1.69.1" /> <link rel="stylesheet" href="../stylesheets/lfs-print.css" type= "text/css" media="print" /> </head> <body id="lfs" class="CLFS-SVN-20060417-MIPS"> <div class="navheader"> <div class="headertitles"> <h4> Cross-Compiled Linux From Scratch - Version CLFS-SVN-20060417-MIPS </h4> <h3> Chapter 10. Installing Basic System Software </h3> </div> <ul class="headerlinks"> <li class="prev"> <a accesskey="p" href="sed.html" title="Sed-4.1.5">Prev</a> <p> Sed-4.1.5 </p> </li> <li class="next"> <a accesskey="n" href="gettext.html" title= "Gettext-0.14.5">Next</a> <p> Gettext-0.14.5 </p> </li> <li class="up"> <a accesskey="u" href="chapter.html" title= "Chapter 10. Installing Basic System Software">Up</a>. </li> <li class="home"> <a accesskey="h" href="../index.html" title= "Cross-Compiled Linux From Scratch - Version CLFS-SVN-20060417-MIPS"> Home</a> </li> </ul> </div> <div class="wrap" lang="en" xml:lang="en"> <div class="titlepage"> <h1 class="sect1"> 10.23. Flex-2.5.33 </h1> </div> <div class="package" lang="en" xml:lang="en"> <p> The Flex package contains a utility for generating programs that recognize patterns in text. </p> <div class="segmentedlist"> <div class="seglistitem"> <div class="seg"> <strong><span class="segtitle">Installation depends on:</span></strong> <span class="seg">Bash, Binutils, Bison, Coreutils, Diffutils, GCC, Gettext, Glibc, Grep, M4, Make, Patch, and Sed</span> </div> </div> </div> </div> <div class="installation" lang="en" xml:lang="en"> <div class="titlepage"> <h2 class="sect2"> 10.23.1. Installation of Flex </h2> </div> <p> Prepare Flex for compilation: </p> <pre class="userinput"><kbd class="command">./configure --prefix=/usr</kbd></pre> <p> Compile the package: </p> <pre class="userinput"><kbd class="command">make</kbd></pre> <p> To test the results, issue: <strong class="userinput"><tt>make check</tt></strong>. </p> <p> Install the package: </p> <pre class="userinput"><kbd class="command">make install</kbd></pre> <p> There are some packages that expect to find the <tt class= "filename">lex</tt> library in <tt class="filename">/usr/lib</tt>. Create a symlink to account for this: </p> <pre class="userinput"><kbd class="command">ln -sv libfl.a /usr/lib/libl.a</kbd></pre> <p> A few programs do not know about <span><strong class= "command">flex</strong></span> yet and try to run its predecessor, <span><strong class="command">lex</strong></span>. To support those programs, create a wrapper script named <tt class= "filename">lex</tt> that calls <tt class="filename">flex</tt> in <span><strong class="command">lex</strong></span> emulation mode: </p> <pre class="userinput"><kbd class="command">cat > /usr/bin/lex << "EOF"<tt class="literal">#!/bin/sh# Begin /usr/bin/lexexec /usr/bin/flex -l "$@"# End /usr/bin/lex</tt>EOFchmod -v 755 /usr/bin/lex</kbd></pre> </div> <div class="content" lang="en" xml:lang="en"> <div class="titlepage"> <a id="contents-flex" name="contents-flex"></a> <h2 class="sect2"> 10.23.2. Contents of Flex </h2> </div> <div class="segmentedlist"> <div class="seglistitem"> <div class="seg"> <strong><span class="segtitle">Installed programs:</span></strong> <span class="seg">flex and lex</span> </div> <div class="seg"> <strong><span class="segtitle">Installed library:</span></strong> <span class="seg">libfl.a</span> </div> </div> </div> <div class="variablelist"> <h3> <a id="id3673888" name="id3673888"></a>Short Descriptions </h3> <table border="0"> <col align="left" valign="top" /> <tbody> <tr> <td> <a id="flex" name="flex"></a><span class= "term"><span><strong class= "command">flex</strong></span></span> </td> <td> <p> A tool for generating programs that recognize patterns in text; it allows for the versatility to specify the rules for pattern-finding, eradicating the need to develop a specialized program </p> </td> </tr> <tr> <td> <a id="lex" name="lex"></a><span class= "term"><span><strong class= "command">lex</strong></span></span> </td> <td> <p> A script that runs <span><strong class= "command">flex</strong></span> in <span><strong class= "command">lex</strong></span> emulation mode </p> </td> </tr> <tr> <td> <a id="libfl.a" name="libfl.a"></a><span class= "term"><tt class="filename">libfl.a</tt></span> </td> <td> <p> The <tt class="filename">flex</tt> library </p> </td> </tr> </tbody> </table> </div> </div> </div> <div class="navfooter"> <ul> <li class="prev"> <a accesskey="p" href="sed.html" title="Sed-4.1.5">Prev</a> <p> Sed-4.1.5 </p> </li> <li class="next"> <a accesskey="n" href="gettext.html" title= "Gettext-0.14.5">Next</a> <p> Gettext-0.14.5 </p> </li> <li class="up"> <a accesskey="u" href="chapter.html" title= "Chapter 10. Installing Basic System Software">Up</a>. </li> <li class="home"> <a accesskey="h" href="../index.html" title= "Cross-Compiled Linux From Scratch - Version CLFS-SVN-20060417-MIPS"> Home</a>. </li> </ul> </div> </body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -