X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lexer-gcc-3.1.sh;h=1898f27eb8b5f9cefc9ba97d3806cd8a5de0430e;hb=e80bf02da133a03d26f648305e1d7ced532b3481;hp=c9b8a389d64bb86040c8857a37b12f37f541f7f3;hpb=02796a5753dd1223bac6c553ec8e5f0882a492b7;p=lilypond.git diff --git a/lexer-gcc-3.1.sh b/lexer-gcc-3.1.sh index c9b8a389d6..1898f27eb8 100755 --- a/lexer-gcc-3.1.sh +++ b/lexer-gcc-3.1.sh @@ -8,7 +8,7 @@ FLEXLEXER=OK if [ -z "$FLEXLEXER" ]; then -includes="$HOME/usr/include /usr/local/include /usr/include" +includes="$HOME/usr/include $PREFIX/include /usr/local/include /usr/include" for i in $includes; do file=$i/FlexLexer.h @@ -43,9 +43,9 @@ if [ -z "$FLEXLEXER" ]; then echo -n "Copying and fixing $file... " mkdir -p lily/$outdir rm -f lily/$outdir/FlexLexer.h -sed -e 's/iostream.h/iostream/' \ - -e 's/\/std::istream/' \ - -e 's/\/std::ostream/' \ +perl -p -e 's/iostream.h/iostream/g;' \ + -e 's/\bistream\b/std::istream/g;' \ + -e 's/\bostream\b/std::ostream/' \ $file > lily/$outdir/FlexLexer.h echo "done" @@ -58,9 +58,9 @@ if [ -f GNUmakefile ]; then 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' \ - -e 's/\/std::cerr/g' \ + perl -p -e 's/\bcin\b/std::cin/g;' \ + -e 's/\bcout\b/std::cout/g;' \ + -e 's/\bcerr\b/std::cerr/g' \ $file.orig > $file echo "done" fi