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

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

r2639@server (orig r1295): chris | 2006-03-18 03:50:26 -0800
Removed remaining reference to now-nonexistent flex patch

  • Property mode set to 100644
File size: 3.9 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, Patch, 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="e">Prepare Flex for compilation:</para>
38
39<screen os="f"><userinput>./configure --prefix=/usr</userinput></screen>
40
41 <para os="g">Compile the package:</para>
42
43<screen os="h"><userinput>make</userinput></screen>
44
45 <para os="i">To test the results, issue:
46 <userinput>make check</userinput>.</para>
47
48 <para os="j">Install the package:</para>
49
50<screen os="k"><userinput>make install</userinput></screen>
51
52 <para os="l">There are some packages that expect to find the
53 <filename class="libraryfile">lex</filename> library in <filename
54 class="directory">/usr/lib</filename>. Create a symlink to account for
55 this:</para>
56
57<screen os="m"><userinput>ln -sv libfl.a /usr/lib/libl.a</userinput></screen>
58
59 <para os="n">A few programs do not know about <command>flex</command> yet and
60 try to run its predecessor, <command>lex</command>. To support those
61 programs, create a wrapper script named <filename>lex</filename> that
62 calls <filename>flex</filename> in <command>lex</command> emulation
63 mode:</para>
64
65<screen os="o"><userinput>cat &gt; /usr/bin/lex &lt;&lt; "EOF"
66<literal>#!/bin/sh
67# Begin /usr/bin/lex
68
69exec /usr/bin/flex -l "$@"
70
71# End /usr/bin/lex</literal>
72EOF
73chmod -v 755 /usr/bin/lex</userinput></screen>
74
75 </sect2>
76
77 <sect2 id="contents-flex" role="content">
78 <title>Contents of Flex</title>
79
80 <segmentedlist>
81 <segtitle>Installed programs</segtitle>
82 <segtitle>Installed library</segtitle>
83
84 <seglistitem>
85 <seg>flex and lex</seg>
86 <seg>libfl.a</seg>
87 </seglistitem>
88 </segmentedlist>
89
90 <variablelist>
91 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
92 <?dbfo list-presentation="list"?>
93 <?dbhtml list-presentation="table"?>
94
95 <varlistentry id="flex">
96 <term><command>flex</command></term>
97 <listitem>
98 <para>A tool for generating programs that recognize patterns in text;
99 it allows for the versatility to specify the rules for pattern-finding,
100 eradicating the need to develop a specialized program</para>
101 <indexterm zone="ch-system-flex flex">
102 <primary sortas="b-flex">flex</primary>
103 </indexterm>
104 </listitem>
105 </varlistentry>
106
107 <varlistentry id="lex">
108 <term><command>lex</command></term>
109 <listitem>
110 <para>A script that runs <command>flex</command> in
111 <command>lex</command> emulation mode</para>
112 <indexterm zone="ch-system-flex lex">
113 <primary sortas="b-lex">lex</primary>
114 </indexterm>
115 </listitem>
116 </varlistentry>
117
118 <varlistentry id="libfl.a">
119 <term><filename class="libraryfile">libfl.a</filename></term>
120 <listitem>
121 <para>The <filename class="libraryfile">flex</filename> library</para>
122 <indexterm zone="ch-system-flex libfl.a">
123 <primary sortas="c-libfl.a">libfl.a</primary>
124 </indexterm>
125 </listitem>
126 </varlistentry>
127
128 </variablelist>
129
130 </sect2>
131
132</sect1>
Note: See TracBrowser for help on using the repository browser.