X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=utils%2Fghc-cabal%2Fghc.mk;h=f495048d22f609e6e00cfd4dd9a08ba3195c0a14;hb=1d9983e852b11a16b77d549b8acb6ba4abdf6601;hp=b4b599d1115e28edaeeb42346bce08669185cf8c;hpb=49fb21e21496611dc2ccfd311e2b64fc4eb93023;p=ghc-hetmet.git diff --git a/utils/ghc-cabal/ghc.mk b/utils/ghc-cabal/ghc.mk index b4b599d..f495048 100644 --- a/utils/ghc-cabal/ghc.mk +++ b/utils/ghc-cabal/ghc.mk @@ -21,6 +21,10 @@ CABAL_CONSTRAINT := --constraint="Cabal == $(CABAL_DOTTED_VERSION)" $(GHC_CABAL_INPLACE) : $(GHC_CABAL_DIR)/dist/build/tmp/ghc-cabal$(exeext) | $$(dir $$@)/. "$(CP)" $< $@ +$(GHC_CABAL_DIR)/dist/build/tmp/ghc-cabal$(exeext): $(wildcard libraries/Cabal/Distribution/*/*/*.hs) +$(GHC_CABAL_DIR)/dist/build/tmp/ghc-cabal$(exeext): $(wildcard libraries/Cabal/Distribution/*/*.hs) +$(GHC_CABAL_DIR)/dist/build/tmp/ghc-cabal$(exeext): $(wildcard libraries/Cabal/Distribution/*.hs) + $(GHC_CABAL_DIR)/dist/build/tmp/ghc-cabal$(exeext): $(GHC_CABAL_DIR)/ghc-cabal.hs | $$(dir $$@)/. bootstrapping/. "$(GHC)" $(SRC_HC_OPTS) --make $(GHC_CABAL_DIR)/ghc-cabal.hs -o $@ \ -Wall $(WERROR) \ @@ -75,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/^[^"]*"/ ["/; s/"[^"]*$$/"] ++/; 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