Corrected the use of the -fno-warn-tabs flag in the alex files so that it works under GHC 6.6.x

This commit is contained in:
Neil Brown 2008-01-28 12:03:03 +00:00
parent 9cd2da3b0e
commit 2120b830dc
3 changed files with 22 additions and 4 deletions

View File

@ -43,12 +43,30 @@ CompilerCommands.hs: Makefile
echo -e 'cxxCommand :: String -> String -> String\n' >> CompilerCommands.hs
echo -e 'cxxCommand inp out = "$(CXX) $(TOCK_CXXFLAGS) -x c++ -o " ++ out ++ " " ++ inp ++ " $(TOCK_CXXLDFLAGS)"\n' >> CompilerCommands.hs
# Both these results are near-identical. The -g flag to alex tells it to generate
# a lexer optimised for GHC. The other part of the rule inserts the
# -fno-warn-tabs flag under GHC >= 6.8, but doesn't add anything under previous
# versions of GHC
frontends/LexOccam.hs: frontends/LexOccam.x
alex frontends/LexOccam.x
alex -g frontends/LexOccam.x -o frontends/LexOccam.temphs
if GHC68
echo "{- OPTIONS_GHC -fno-warn-tabs -}\n" > frontends/LexOccam.hs
cat frontends/LexOccam.temphs >> frontends/LexOccam.hs
rm frontends/LexOccam.temphs
else
mv frontends/LexOccam.temphs frontends/LexOccam.hs
endif
frontends/LexRain.hs: frontends/LexRain.x
alex frontends/LexRain.x
alex -g frontends/LexRain.x -o frontends/LexRain.temphs
if GHC68
echo "{- OPTIONS_GHC -fno-warn-tabs -}\n" > frontends/LexRain.hs
cat frontends/LexRain.temphs >> frontends/LexRain.hs
rm frontends/LexRain.temphs
else
mv frontends/LexRain.temphs frontends/LexRain.hs
endif
common/TagAST.hs: GenTagAST$(EXEEXT)
./GenTagAST$(EXEEXT) > common/TagAST.hs

View File

@ -1,4 +1,4 @@
{ {-# OPTIONS_GHC -fno-warn-unused-imports -fno-warn-tabs #-}
{ {-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-
Tock: a compiler for parallel languages
Copyright (C) 2007 University of Kent

View File

@ -1,4 +1,4 @@
{ {-# OPTIONS_GHC -fno-warn-unused-imports -fno-warn-tabs #-}
{ {-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-
Tock: a compiler for parallel languages
Copyright (C) 2007 University of Kent