source: clfs-sysroot/BOOK/final-system/common/flex.xml@ f7941b2

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

r3633@server (orig r1649): jciccone | 2006-05-25 16:48:42 -0700
Added the Initial clfs-2.0 branch using sysroot builds.

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