buildbot: Do a ./darcs-all get after unpacking the snapshot
[packages/dph.git] / dph-buildbot / src / BuildGhc.hs
1
2 -- | Build stages concerning GHC.
3 module BuildGhc
4 ( ghcUnpack
5 , ghcBuild)
6 where
7 import BuildBox
8
9 ghcUnpack :: String -> String -> Build ()
10 ghcUnpack fileSnapShot dirScratch
11 = inDir dirScratch
12 $ do
13 outLn "* Cleaning house"
14 clobberDir "ghc-head"
15
16 outLn "* Unpacking GHC"
17
18 outLn $ " - Unpacking snapshot " ++ fileSnapShot
19 ssystem $ "tar zxf " ++ fileSnapShot
20
21 outLn $ " - Updating snapshot"
22 inDir "ghc-head"
23 $ do ssystem "./darcs-all pull -av"
24 ssystem "./darcs-all get"
25 ssystem "./darcs-all pull -av"
26
27
28 ghcBuild :: String -> Build ()
29 ghcBuild buildPath
30 = inDir buildPath
31 $ do outLn "* Building GHC"
32
33 ssystem "perl boot"
34 ssystem "./configure"
35 ssystem "make"
36
37 inDir "inplace/bin"
38 $ ssystem $ "ln -s ghc-stage2 ghc"
39
40 outBlank
41 outBlank