Use $(HC), not $(GHC) to compile ghc-inplace
authorSimon Marlow <simonmar@microsoft.com>
Wed, 4 Jul 2007 13:57:04 +0000 (13:57 +0000)
committerSimon Marlow <simonmar@microsoft.com>
Wed, 4 Jul 2007 13:57:04 +0000 (13:57 +0000)
$(GHC) is always the installed compiler, $(HC) changes depending on
the stage.  This has the nice effect that we build stage2/ghc-inplace
using the stage1 compiler, and get to take advantage of bugfixes in
stage1 relative to $(GHC) (in particular I want the non-blocking stdin
fix for stage2, otherwise piping the testsuite output through tee
fails).

compiler/Makefile

index f330340..5e5504b 100644 (file)
@@ -715,7 +715,7 @@ $(INPLACE_HS): Makefile $(FPTOOLS_TOP)/mk/config.mk
        echo "main = do args <- getArgs; rawSystem \"$(TOP_ABS)/$(GHC_COMPILER_DIR_REL)/$(GHC_PROG)\" (\"-B$(TOP_ABS)\":args) >>= exitWith" >> $@
 
 $(INPLACE_PROG): $(INPLACE_HS)
        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)
 
 
 all :: $(INPLACE_PROG)