Estimated build time: 0.1 SBU Estimated required disk space: 3.4 MB
The Flex package is used to generate programs which recognize patterns in text.
Installed programs: flex, flex++ (link to flex) and lex
Installed library: libfl.a
Flex depends on: Bash, Binutils, Bison, Coreutils, Diffutils, GCC, Gettext, Glibc, Grep, M4, Make, Sed.
Prepare Flex for compilation:
Compile the package:
This package has a test suite available which can perform a number of checks to ensure it built correctly. Should you choose to run it, the following command will do so:
And install the package:
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 shell 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