3 # script documenting fixes for flex-2.5.4 and gcc-3.1
9 if [ -z "$FLEXLEXER" ]; then
11 includes
="$HOME/usr/include /usr/local/include /usr/include"
13 for i
in $includes; do
15 if [ -f "$file" ]; then
22 if [ -z "$file" ]; then
24 FlexLexer.h not found in $includes
26 Please install flex, or find and fix FlexLexer.h by hand.
33 if [ -n "$CONF" ]; then
37 ENABLECONFIG
="--enable-config=$CONF "
39 outdir
=out
$CONFIGSUFFIX
41 if [ -z "$FLEXLEXER" ]; then
43 echo -n "Copying and fixing $file... "
45 rm -f lily
/$outdir/FlexLexer.h
46 sed -e 's/iostream.h/iostream/' \
47 -e 's/\<istream\>/std::istream/' \
48 -e 's/\<ostream\>/std::ostream/' \
49 $file > lily
/$outdir/FlexLexer.h
54 if [ -f GNUmakefile
]; then
55 file=lily
/$outdir/lexer.cc
56 echo -n "Generating and fixing $file... "
58 make conf
=$CONF -C lily
$outdir/lexer.cc
> /dev
/null
2>&1 || true
61 sed -e 's/\<cin\>/std::cin/g' \
62 -e 's/\<cout\>/std::cout/g' \
63 -e 's/\<cerr\>/std::cerr/g' \
70 Remove config.cache before rerunning ./configure
72 Reconfigure, refix, and make doing something like:
75 CPPFLAGS=-I$(pwd)/lily/$outdir ./configure $ENABLECONFIG