X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FMakefile;h=252da0d08c8ee23b016b130bcd442070e675bba5;hb=f83010b119096699d1efef2f7bb45460719c48f9;hp=c832f43776836c5e8d4e5536f0126eb561844757;hpb=a171dac28baada2036577e7b0b4d7cc1c6836952;p=ghc-hetmet.git diff --git a/compiler/Makefile b/compiler/Makefile index c832f43..252da0d 100644 --- a/compiler/Makefile +++ b/compiler/Makefile @@ -367,7 +367,7 @@ SRC_HC_OPTS += -Istage$(stage) ALL_DIRS = \ utils basicTypes types hsSyn prelude rename typecheck deSugar coreSyn \ - specialise simplCore stranal stgSyn simplStg codeGen main \ + vectorise specialise simplCore stranal stgSyn simplStg codeGen main \ profiling parser cprAnalysis ndpFlatten iface cmm # Make sure we include Config.hs even if it doesn't exist yet... @@ -410,11 +410,16 @@ endif # enabled when we are bootstrapping with the same version of GHC, and # the interpreter is supported on this platform. +ifeq "$(bootstrapped)" "YES" +SRC_HC_OPTS += -package hpc +PKG_DEPENDS += hpc +endif + ifeq "$(GhcWithInterpreter) $(bootstrapped)" "YES YES" # Yes, include the interepreter, readline, and Template Haskell extensions -SRC_HC_OPTS += -DGHCI -package template-haskell -package hpc -PKG_DEPENDS += template-haskell hpc +SRC_HC_OPTS += -DGHCI -package template-haskell +PKG_DEPENDS += template-haskell # Should GHCI be building info tables in the TABLES_NEXT_TO_CODE style # or not? @@ -710,12 +715,20 @@ EXCLUDED_SRCS += $(INPLACE_HS) # will go wrong when we use it in a Haskell string below. TOP_ABS=$(subst \\,/,$(FPTOOLS_TOP_ABS_PLATFORM)) +ifeq "$(stage)" "1" +EnvImport = System.Environment +GetArgs = getArgs +else +EnvImport = GHC.Environment +GetArgs = getFullArgs +endif + $(INPLACE_HS): Makefile $(FPTOOLS_TOP)/mk/config.mk - echo "import System.Cmd; import System.Environment; import System.Exit" > $@ - echo "main = getArgs >>= \args -> rawSystem \"$(TOP_ABS)/$(GHC_COMPILER_DIR_REL)/$(GHC_PROG)\" (\"-B$(TOP_ABS)\":args) >>= exitWith" >> $@ + echo "import System.Cmd; import $(EnvImport); import System.Exit" > $@ + echo "main = do args <- $(GetArgs); rawSystem \"$(TOP_ABS)/$(GHC_COMPILER_DIR_REL)/$(GHC_PROG)\" (\"-B$(TOP_ABS)\":args) >>= exitWith" >> $@ $(INPLACE_PROG): $(INPLACE_HS) - $(GHC) --make $< -o $@ + $(HC) --make $< -o $@ all :: $(INPLACE_PROG)