source: chapter06/flex.xml@ 86333de

Last change on this file since 86333de was 86333de, checked in by Jeremy Huntwork <jhuntwork@…>, 16 years ago

Merged r8469, r8470, r8471, r8472, r8473, r8474, r8478, r8479, r8480, r8481, r8482, r8483, r8484, r8485, r8486, r8487, r8488, r8489, r8490, r8491, r8492, r8493, r8494, r8495, r8500, r8501 from trunk to jh branch

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/jh/BOOK@8502 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 4.1 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../general.ent">
5 %general-entities;
6]>
7
8<sect1 id="ch-system-flex" role="wrap">
9 <?dbhtml filename="flex.html"?>
10
11 <sect1info condition="script">
12 <productname>flex</productname>
13 <productnumber>&flex-version;</productnumber>
14 <address>&flex-url;</address>
15 </sect1info>
16
17 <title>Flex-&flex-version;</title>
18
19 <indexterm zone="ch-system-flex">
20 <primary sortas="a-Flex">Flex</primary>
21 </indexterm>
22
23 <sect2 role="package">
24 <title/>
25
26 <para>The Flex package contains a utility for generating programs that
27 recognize patterns in text.</para>
28
29 <segmentedlist>
30 <segtitle>&buildtime;</segtitle>
31 <segtitle>&diskspace;</segtitle>
32
33 <seglistitem>
34 <seg>&flex-ch6-sbu;</seg>
35 <seg>&flex-ch6-du;</seg>
36 </seglistitem>
37 </segmentedlist>
38
39 </sect2>
40
41 <sect2 role="installation">
42 <title>Installation of Flex</title>
43
44 <para>Prepare Flex for compilation:</para>
45
46<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
47
48 <para>Compile the package:</para>
49
50<screen><userinput remap="make">make</userinput></screen>
51
52 <para>The testsuite in this version of Flex does nothing useful before it
53 ends with an error.</para>
54
55<!--<screen><userinput remap="test">make check</userinput></screen>-->
56
57 <para>Install the package:</para>
58
59<screen><userinput remap="install">make install</userinput></screen>
60
61 <para>There are some packages that expect to find the
62 <filename class="libraryfile">lex</filename> library in <filename
63 class="directory">/usr/lib</filename>. Create a symlink to account for
64 this:</para>
65
66<screen><userinput remap="install">ln -sv libfl.a /usr/lib/libl.a</userinput></screen>
67
68 <para>A few programs do not know about <command>flex</command> yet and
69 try to run its predecessor, <command>lex</command>. To support those
70 programs, create a wrapper script named <filename>lex</filename> that
71 calls <filename>flex</filename> in <command>lex</command> emulation
72 mode:</para>
73
74<screen><userinput remap="install">cat &gt; /usr/bin/lex &lt;&lt; "EOF"
75<literal>#!/bin/sh
76# Begin /usr/bin/lex
77
78exec /usr/bin/flex -l "$@"
79
80# End /usr/bin/lex</literal>
81EOF
82chmod -v 755 /usr/bin/lex</userinput></screen>
83
84 </sect2>
85
86 <sect2 id="contents-flex" role="content">
87 <title>Contents of Flex</title>
88
89 <segmentedlist>
90 <segtitle>Installed programs</segtitle>
91 <segtitle>Installed library</segtitle>
92
93 <seglistitem>
94 <seg>flex and lex</seg>
95 <seg>libfl.a</seg>
96 </seglistitem>
97 </segmentedlist>
98
99 <variablelist>
100 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
101 <?dbfo list-presentation="list"?>
102 <?dbhtml list-presentation="table"?>
103
104 <varlistentry id="flex">
105 <term><command>flex</command></term>
106 <listitem>
107 <para>A tool for generating programs that recognize patterns in text;
108 it allows for the versatility to specify the rules for pattern-finding,
109 eradicating the need to develop a specialized program</para>
110 <indexterm zone="ch-system-flex flex">
111 <primary sortas="b-flex">flex</primary>
112 </indexterm>
113 </listitem>
114 </varlistentry>
115
116 <varlistentry id="lex">
117 <term><command>lex</command></term>
118 <listitem>
119 <para>A script that runs <command>flex</command> in
120 <command>lex</command> emulation mode</para>
121 <indexterm zone="ch-system-flex lex">
122 <primary sortas="b-lex">lex</primary>
123 </indexterm>
124 </listitem>
125 </varlistentry>
126
127 <varlistentry id="libfl.a">
128 <term><filename class="libraryfile">libfl.a</filename></term>
129 <listitem>
130 <para>The <filename class="libraryfile">flex</filename> library</para>
131 <indexterm zone="ch-system-flex libfl.a">
132 <primary sortas="c-libfl.a">libfl.a</primary>
133 </indexterm>
134 </listitem>
135 </varlistentry>
136
137 </variablelist>
138
139 </sect2>
140
141</sect1>
Note: See TracBrowser for help on using the repository browser.