%general-entities; ]> Flex-&flex-version; Flex <para>The Flex package contains a utility for generating programs that recognize patterns in text.</para> </sect2> <sect2 role="installation"> <title>Installation of Flex Make sure that Flex doesn't try to include headers from /usr/include. cp -v Makefile.in{,.orig} sed "s/-I@includedir@//g" Makefile.in.orig > Makefile.in Prepare Flex for compilation: ./configure --prefix=/usr --host=${CLFS_TARGET} Compile the package: make Install the package: make DESTDIR=${CLFS} 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 ${CLFS}/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 > ${CLFS}/usr/bin/lex << "EOF" #!/bin/sh # Begin /usr/bin/lex exec /usr/bin/flex -l "$@" # End /usr/bin/lex EOF chmod -v 755 ${CLFS}/usr/bin/lex Contents of Flex Installed programs Installed library flex and lex libfl.a Short Descriptions 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 lex A script that runs flex in lex emulation mode lex libfl.a The flex library libfl.a