From 53fd7924ddcd7a7825cba05e585d7e5b123ada1c Mon Sep 17 00:00:00 2001 From: jan Date: Fri, 5 Jul 2002 14:31:02 +0000 Subject: [PATCH] * lexer-gcc-3.1.sh: Fixes and more comments. * Documentation/topdocs/INSTALL.texi: Add comment about gcc-3.0.4 problems. --- ChangeLog | 5 +++++ Documentation/topdocs/INSTALL.texi | 5 +++++ lexer-gcc-3.1.sh | 20 ++++++++++++++------ 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9826ebd839..3ce8c8c048 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2002-07-05 Jan Nieuwenhuizen + * lexer-gcc-3.1.sh: Fixes and more comments. + + * Documentation/topdocs/INSTALL.texi: Add comment about gcc-3.0.4 + problems. + * lily/include/stream.hh: * lily/include/moment.hh: * lily/include/midi-stream.hh: diff --git a/Documentation/topdocs/INSTALL.texi b/Documentation/topdocs/INSTALL.texi index a7ced0fd3c..a0f923d636 100644 --- a/Documentation/topdocs/INSTALL.texi +++ b/Documentation/topdocs/INSTALL.texi @@ -623,6 +623,11 @@ send bug reports to @email{bug-lilypond@@gnu.org}. Bugs that are not fault of LilyPond are documented here. +@unnumberedsubsec Gcc-3.0.4 + +Gcc 3.0.4, is a bit flaky. Try downgrading to 2.95.x, or if you're +adventurous (see below), upgrading to 3.1.x. + @unnumberedsubsec Flex-2.5.4a and gcc-3.x Flex 2.5.4a does not produce g++-3.0 compliant C++ code. To compile diff --git a/lexer-gcc-3.1.sh b/lexer-gcc-3.1.sh index 7d816302b8..944497fdf9 100755 --- a/lexer-gcc-3.1.sh +++ b/lexer-gcc-3.1.sh @@ -2,6 +2,8 @@ # # script documenting fixes for flex-2.5.4 and gcc-3.1 +set -e + includes="$HOME/usr/include /usr/local/include /usr/include" for i in $includes; do @@ -25,7 +27,9 @@ fi if [ -n "$CONF" ]; then CONFIGSUFFIX=-$CONF - ENABLECONFIG="--enable-config=$CONF" + SETCONF="CONF=$CONF " + setconf="conf=$CONF " + ENABLECONFIG="--enable-config=$CONF " fi outdir=out$CONFIGSUFFIX @@ -38,13 +42,14 @@ sed -e 's/iostream.h/iostream/' \ $file > lily/$outdir/FlexLexer.h echo "done" -file=lily/$outdir/lexer.cc -rm -f $file -make conf=$CONF -C lily $outdir/lexer.cc || exit 0 -if [ -f "$file" ]; then +if [ -f GNUmakefile ]; then echo -n "Generating and fixing $file... " + file=lily/$outdir/lexer.cc + rm -f $file + make conf=$CONF -C lily $outdir/lexer.cc > /dev/null 2>&1 || true + mv $file $file.orig sed -e 's/\/std::cin/g' \ -e 's/\/std::cout/g' \ @@ -57,7 +62,10 @@ cat <