3 # script documenting fixes for flex-2.5.4 and gcc-3.1
5 includes="$HOME/usr/include /usr/local/include /usr/include"
9 if [ -f "$file" ]; then
16 if [ -z "$file" ]; then
18 FlexLexer.h not found in $includes
20 Please install flex, or find and fix FlexLexer.h by hand.
26 if [ -n "$CONF" ]; then
28 ENABLECONFIG="--enable-config=$CONF"
30 outdir=out$CONFIGSUFFIX
32 echo -n "Copying and fixing $file... "
34 rm -f lily/$outdir/FlexLexer.h
35 sed -e 's/iostream.h/iostream/' \
36 -e 's/\<istream\>/std::istream/' \
37 -e 's/\<ostream\>/std::ostream/' \
38 $file > lily/$outdir/FlexLexer.h
41 file=lily/$outdir/lexer.cc
43 make conf=$CONF -C lily $outdir/lexer.cc || exit 0
45 if [ -f "$file" ]; then
46 echo -n "Generating and fixing $file... "
49 sed -e 's/\<cin\>/std::cin/g' \
50 -e 's/\<cout\>/std::cout/g' \
51 -e 's/\<cerr\>/std::cerr/g' \
58 Remove config.cache before rerunning ./configure
60 Reconfigure doing something like:
62 CPPFLAGS=-I$(pwd)/lily/$outdir ./configure $ENABLECONFIG