X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=utils%2Fghc-cabal%2Fghc.mk;h=f495048d22f609e6e00cfd4dd9a08ba3195c0a14;hb=0e5b82290dfb34c969106d6bfb6efa16f8ce63d1;hp=d0f3bd5e900cde62c101948aa68b48338570897a;hpb=1024967e845246c09c2547d4b2f17adab0fad976;p=ghc-hetmet.git diff --git a/utils/ghc-cabal/ghc.mk b/utils/ghc-cabal/ghc.mk index d0f3bd5..f495048 100644 --- a/utils/ghc-cabal/ghc.mk +++ b/utils/ghc-cabal/ghc.mk @@ -79,9 +79,11 @@ $(GHC_CABAL_DIR)/dist-dummy-ghc/build/dummy-ghc.hs : $(GHC_CABAL_DIR)/ghc.mk $(M # ( "PostfixOperators", ... # then it translates them into # ["PostfixOperators"] ++ +# Tabs are a pain to handle portably with sed, so rather than worrying +# about them we just use tr to remove them all before we start. echo 'extensions :: [String]' >> $@ echo 'extensions =' >> $@ - sed '/^xFlags/,/]/s/^[[:space:]]*([[:space:]]*\("[^"]*"\)[^"]*/ [\1] ++/p;d' compiler/main/DynFlags.hs >> $@ + '$(TR)' -d '\t' < compiler/main/DynFlags.hs | '$(SED)' '/^xFlags/,/]/s/^ *( *\("[^"]*"\)[^"]*/ [\1] ++/p;d' >> $@ echo ' []' >> $@ # We don't build dummy-ghc with Cabal, so we need to pass -package