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

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

r781@server (orig r779): jim | 2005-11-30 22:14:06 -0800

r836@server: jim | 2005-11-30 22:13:02 -0800
Text updates to final-system


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