Flex-2.5.4a
Prev | Chapter 6. Installing basic system software | Next

## Flex-2.5.4a

The Flex package contains a utility for generating programs that recognize patterns in text.

    Approximate build time:  0.1 SBU
    Required disk space:     3.4 MB

Flex installation depends on: Bash, Binutils, Bison, Coreutils, Diffutils, GCC, Gettext, Glibc, Grep, M4, Make, Sed.

### Installation of Flex

Prepare Flex for compilation:

    ./configure --prefix=/usr

Compile the package:

    make

To test the results, issue: `make bigcheck`.

Now install the package:

    make install

There are some packages that expect to find the lex library in `/usr/lib`. Create a symlink to account for this:

    ln -s libfl.a /usr/lib/libl.a

A few programs don't know about flex yet and try to run its predecessor lex. To support those programs, create a wrapper script named `lex` that calls flex in lex emulation mode:

    cat > /usr/bin/lex << "EOF"
    #!/bin/sh
    # Begin /usr/bin/lex

    exec /usr/bin/flex -l "$@"

    # End /usr/bin/lex
    EOF
    chmod 755 /usr/bin/lex

### Contents of Flex

Installed programs: flex, flex++ (link to flex) and lex

Installed library: libfl.a

### Short descriptions

flex is a tool for generating programs that recognize patterns in text. Pattern recognition is useful in many applications. From a set of rules on what to look for, flex makes a program that looks for those patterns. The reason to use flex is that it is much easier to specify the rules for a pattern-finding program than to write the program.

flex++ invokes a version of flex that is used exclusively for C++ scanners.

libfl.a is the flex library.

Prev | Up | Next
Sed-4.0.9 | Home | Gettext-0.14.1