source: BOOK/final-system/common/flex.xml@ 93aa336

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 93aa336 was 3373dd11, checked in by Jim Gifford <clfs@…>, 19 years ago

r668@server (orig r666): manuel | 2005-11-08 15:25:13 -0800
Removing SBUs and DUs. Chapter final-system, round 6.

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