3 # script documenting fixes for flex-2.5.4 and gcc-3.1
7 includes
="$HOME/usr/include /usr/local/include /usr/include"
11 if [ -f "$file" ]; then
18 if [ -z "$file" ]; then
20 FlexLexer.h not found in $includes
22 Please install flex, or find and fix FlexLexer.h by hand.
28 if [ -n "$CONF" ]; then
32 ENABLECONFIG
="--enable-config=$CONF "
34 outdir
=out
$CONFIGSUFFIX
36 echo -n "Copying and fixing $file... "
38 rm -f lily
/$outdir/FlexLexer.h
39 sed -e 's/iostream.h/iostream/' \
40 -e 's/\<istream\>/std::istream/' \
41 -e 's/\<ostream\>/std::ostream/' \
42 $file > lily
/$outdir/FlexLexer.h
46 if [ -f GNUmakefile
]; then
47 echo -n "Generating and fixing $file... "
49 file=lily
/$outdir/lexer.cc
51 make conf
=$CONF -C lily
$outdir/lexer.cc
> /dev
/null
2>&1 || true
54 sed -e 's/\<cin\>/std::cin/g' \
55 -e 's/\<cout\>/std::cout/g' \
56 -e 's/\<cerr\>/std::cerr/g' \
63 Remove config.cache before rerunning ./configure
65 Reconfigure, refix, and make doing something like:
68 CPPFLAGS=-I$(pwd)/lily/$outdir ./configure $ENABLECONFIG