source: final-system/common/flex.xml@ af98896

Last change on this file since af98896 was bf8c11f, checked in by Jim Gifford <clfs@…>, 19 years ago

r627@server (orig r625): jim | 2005-10-31 12:59:34 -0800
Import of Cross-LFS Book

  • Property mode set to 100644
File size: 4.7 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 <!ENTITY % patches-entities SYSTEM "../../patches.ent">
6 %general-entities;
7 %patches-entities;
8]>
9
10<sect1 id="ch-system-flex" role="wrap">
11 <?dbhtml filename="flex.html"?>
12
13 <title>Flex-&flex-version;</title>
14
15 <indexterm zone="ch-system-flex">
16 <primary sortas="a-Flex">Flex</primary>
17 </indexterm>
18
19 <sect2 role="package">
20 <title/>
21
22 <para>The Flex package contains a utility for generating programs that
23 recognize patterns in text.</para>
24
25 <segmentedlist>
26 <segtitle>&buildtime;</segtitle>
27 <segtitle>&diskspace;</segtitle>
28
29 <seglistitem>
30 <seg>Not checked yet</seg>
31 <seg>Not checked yet</seg>
32 </seglistitem>
33 </segmentedlist>
34
35 <segmentedlist>
36 <segtitle>&dependencies;</segtitle>
37
38 <seglistitem>
39 <seg>Bash, Binutils, Bison, Coreutils, Diffutils,
40 GCC, Gettext, Glibc, Grep, M4, Make, and Sed</seg>
41 </seglistitem>
42 </segmentedlist>
43
44 </sect2>
45
46 <sect2 role="installation">
47 <title>Installation of Flex</title>
48
49 <para os="a">Flex contains several known bugs. Fix these with the following
50 patch:</para>
51
52<screen os="b"><userinput>patch -Np1 -i ../&flex-fixes-patch;</userinput></screen>
53
54 <para os="c">The GNU autotools detects that the Flex source code has been
55 modified by the previous patch and tries to update the man page
56 accordingly. This does not work correctly on many systems, and the
57 default page is fine, so make sure it does not get regenerated:</para>
58
59<screen os="d"><userinput>touch doc/flex.1</userinput></screen>
60
61 <para os="e">Prepare Flex for compilation:</para>
62
63<screen><userinput>./configure --prefix=/usr</userinput></screen>
64
65 <para os="f">Compile the package:</para>
66
67<screen os="g"><userinput>make</userinput></screen>
68
69 <para os="h">To test the results, issue:
70 <userinput>make check</userinput>.</para>
71
72 <para os="i">Install the package:</para>
73
74<screen os="j"><userinput>make install</userinput></screen>
75
76 <para os="k">There are some packages that expect to find the
77 <filename class="libraryfile">lex</filename> library in <filename
78 class="directory">/usr/lib</filename>. Create a symlink to account for
79 this:</para>
80
81<screen os="l"><userinput>ln -s libfl.a /usr/lib/libl.a</userinput></screen>
82
83 <para os="m">A few programs do not know about <command>flex</command> yet and
84 try to run its predecessor, <command>lex</command>. To support those
85 programs, create a wrapper script named <filename>lex</filename> that
86 calls <filename>flex</filename> in <command>lex</command> emulation
87 mode:</para>
88
89<screen os="n"><userinput>cat &gt; /usr/bin/lex &lt;&lt; "EOF"
90<literal>#!/bin/sh
91# Begin /usr/bin/lex
92
93exec /usr/bin/flex -l "$@"
94
95# End /usr/bin/lex</literal>
96EOF
97chmod 755 /usr/bin/lex</userinput></screen>
98
99 </sect2>
100
101 <sect2 id="contents-flex" role="content">
102 <title>Contents of Flex</title>
103
104 <segmentedlist>
105 <segtitle>Installed programs</segtitle>
106 <segtitle>Installed library</segtitle>
107
108 <seglistitem>
109 <seg>flex and lex</seg>
110 <seg>libfl.a</seg>
111 </seglistitem>
112 </segmentedlist>
113
114 <variablelist>
115 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
116 <?dbfo list-presentation="list"?>
117 <?dbhtml list-presentation="table"?>
118
119 <varlistentry id="flex">
120 <term><command>flex</command></term>
121 <listitem>
122 <para>A tool for generating programs that recognize patterns in text;
123 it allows for the versatility to specify the rules for pattern-finding,
124 eradicating the need to develop a specialized program</para>
125 <indexterm zone="ch-system-flex flex">
126 <primary sortas="b-flex">flex</primary>
127 </indexterm>
128 </listitem>
129 </varlistentry>
130
131 <varlistentry id="lex">
132 <term><command>lex</command></term>
133 <listitem>
134 <para>A script that runs <command>flex</command> in
135 <command>lex</command> emulation mode</para>
136 <indexterm zone="ch-system-flex lex">
137 <primary sortas="b-lex">lex</primary>
138 </indexterm>
139 </listitem>
140 </varlistentry>
141
142 <varlistentry id="libfl.a">
143 <term><filename class="libraryfile">libfl.a</filename></term>
144 <listitem>
145 <para>The <filename class="libraryfile">flex</filename> library</para>
146 <indexterm zone="ch-system-flex libfl.a">
147 <primary sortas="c-libfl.a">libfl.a</primary>
148 </indexterm>
149 </listitem>
150 </varlistentry>
151
152 </variablelist>
153
154 </sect2>
155
156</sect1>
Note: See TracBrowser for help on using the repository browser.