From: Ian Lynagh Date: Wed, 16 Dec 2009 20:43:54 +0000 (+0000) Subject: Fix build with Solaris sed X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=fb783aeaa5bc1cc60e6bb551c1cd01a097b84fad Fix build with Solaris sed Rather than trying to handle tabs with sed portably, we just use tr to remove them before we start. --- diff --git a/mk/config.mk.in b/mk/config.mk.in index f2d0776..01bbc75 100644 --- a/mk/config.mk.in +++ b/mk/config.mk.in @@ -598,6 +598,7 @@ PIC = pic PREPROCESSCMD = $(CC) -E RANLIB = @RANLIB@ SED = @SedCmd@ +TR = tr SHELL = /bin/sh HaveDtrace = @HaveDtrace@ diff --git a/utils/ghc-cabal/ghc.mk b/utils/ghc-cabal/ghc.mk index b238db9..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