6.43. Flex-2.5.37

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

Приблизительное время сборки: 0.4 SBU
Требует свободного места на диске: 39 MB

6.43.1. Installation of Flex

First, fix some regression tests:

patch -Np1 -i ../flex-2.5.37-bison-2.6.1-1.patch

Prepare Flex for compilation:

./configure --prefix=/usr             \
            --docdir=/usr/share/doc/flex-2.5.37

Compile the package:

make

To test the results (about 0.5 SBU), issue:

make check

Установим пакет:

make install

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

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

A few programs do not 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 -v 755 /usr/bin/lex

6.43.2. Contents of Flex

Installed programs: flex, flex++ (link to flex), and lex
Installed libraries: libfl.a and libfl_pic.a
Installed directories: /usr/share/doc/flex-2.5.37

Краткое описание

flex

A tool for generating programs that recognize patterns in text; it allows for the versatility to specify the rules for pattern-finding, eradicating the need to develop a specialized program

flex++

An extension of flex, is used for generating C++ code and classes. It is a symbolic link to flex

lex

A script that runs flex in lex emulation mode

libfl.a

The flex library