Commit fb783aea authored by Ian Lynagh's avatar Ian Lynagh

Fix build with Solaris sed

Rather than trying to handle tabs with sed portably, we just use tr to
remove them before we start.
parent 8e63e8ea
......@@ -598,6 +598,7 @@ PIC = pic
PREPROCESSCMD = $(CC) -E
RANLIB = @RANLIB@
SED = @SedCmd@
TR = tr
SHELL = /bin/sh
HaveDtrace = @HaveDtrace@
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment