Get rid of `#if CABAL` conditionals
[packages/hoopl.git] / src / mkfile
1 PKG=hoopl
2 SRC=Graph Label GraphUtil Fuel MkGraph Dataflow
3 VERSION=`awk '$1 == "Version:" { print $2 }' $PKG.cabal`
4 HOOPL=Compiler/Hoopl
5 HS=${SRC:%=$HOOPL/%.hs}
6 O=${SRC:%=$HOOPL/%.o}
7 CABAL=hoopl
8 CONFIG=.config.$CABAL
9
10 all:V: $O hoopl.pdf
11
12 dist:V: hoopl.pdf
13         cabal sdist
14
15 hoopl.pdf: ../paper/dfopt.pdf
16         cp -a -v $prereq $target
17
18 test:V: 
19         cabal install --enable-documentation
20         (cd ../testing && mk test)
21
22 install:V: $CONFIG
23         cabal install --enable-documentation
24
25 build:V: $CONFIG
26         cabal build
27
28 check:V: $CONFIG
29         cabal check
30
31 upload:V: hoopl.pdf $CONFIG
32         cabal build
33         cabal sdist
34         cabal upload dist/$PKG-$VERSION.tar.gz
35
36 config:V: $CONFIG
37
38 .config.&:D: &.cabal
39         cabal configure --user > $target
40
41 clean:V:
42         rm -f `find [A-Z]* ../testing -name '*.o' -o '*.hi'`
43
44 %.pdf: %.tex
45         (cd `dirname $prereq`; mk `basename $target`)
46
47
48 %.o: %.hs
49         ghc --make -c $prereq
50
51
52 clean:V:
53         rm -f $HOOPL/*.o
54         rm -f $HOOPL/*.hi
55         rm -f *~ $HOOPL/*~