hs-boehmgc/buildsystem: rm of tempdir after cabal install caused problems with foreig...
[mate.git] / tools / installhaskellenv.sh
1 #!/bin/bash -x
2
3 CABAL_OPT="--enable-shared -p"
4
5 function gitinstall {
6         url=$1
7         git clone $url tmprepo
8         cd tmprepo
9         cabal install $CABAL_OPT
10         cd ..
11         rm -rf tmprepo
12 }
13
14 #hs: i ran into the problem that cabal install does not execute
15 #my Setup.hs - as workaround i invoke runhaskell Setup.hs etc directly
16 function gitinstallWithCustomSetup {
17         url=$1
18         git clone $url hs-boehmgc
19         cd hs-boehmgc
20         runhaskell Setup.hs configure --user $CABAL_OPT
21         runhaskell Setup.hs build 
22         runhaskell Setup.hs install
23         cd ..
24 }
25
26 rm -rf ~/.ghc ~/.cabal
27 cabal update
28 cabal install cabal-install $CABAL_OPT
29 export PATH=~/.cabal/bin:$PATH
30 cabal update
31 cabal install missingh $CABAL_OPT
32 cabal install heap $CABAL_OPT
33 cabal install plugins $CABAL_OPT
34 cabal install split $CABAL_OPT
35
36 # cabal install hs-java $CABAL_OPT
37 gitinstall git://wien.tomnetworks.com/hs-java.git
38
39 cabal install disassembler $CABAL_OPT
40 # cabal install harpy $CABAL_OPT
41 gitinstall git://wien.tomnetworks.com/harpy.git
42
43 gitinstallWithCustomSetup git://wien.tomnetworks.com/hs-boehmgc.git 
44
45 echo DONE