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