/
Makefile
66 lines (54 loc) · 1.82 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Main Rules
# ==========
#
# make [all]: does a sandboxed install of zombie trellys.
# Assumes you have Cabal installed, and that the default
# Cabal install dir is on your path (~/.cabal/bin for
# default "per-user" setup). A trellys binary will be
# installed in ./cabal-dev/bin/trellys, and symlinked
# to test/trellys (the only place you're expected to run
# `trellys`).
#
# make test: runs all tests in ./test.
#
# make sandbox-trellys:
# does a sandboxed install or trellys-core. Quicker than
# `make all`. Assumes you ran `make all` previously.
#
# make install: does a `cabal install` of trellys-core.
#
# make ghci, make cabal-dev-ghci: start ghci with appropriate includes.
.PHONY: all sandbox-install sandbox-uninstall sandbox-trellys \
install uninstall clean test ghci cabal-dev-ghci
all: sandbox-install
sandbox-install: sandbox-trellys
sandbox-uninstall:
-rm -rf cabal-dev
sandbox-trellys: cabal-dev
cabal-dev install --disable-documentation .
ln -fs `pwd`/cabal-dev/bin/trellys test
# You need to have the cabal install dir on your path (by default
# ~/.cabal/bin) so that `cabal-dev` command is found.
cabal-dev:
cabal install cabal-dev
install:
# cabal install
cd src && cabal install
uninstall:
-ghc-pkg unregister `ghc-pkg list | grep trellys`
@echo
@echo You need to manually delete any trellys binaries on your path.
@echo You can find them with \`which trellys\`
clean:
-rm -rf src/dist
test:
cd test && make
etags:
find ./ -name .svn -prune -o -name '*.hs' -print | xargs hasktags --etags
# Start ghci through cabal-dev.
#
# This kind of works, but I'm not sure how to load the Trellys (main)
# module here and it's not available from `:m + Trellys` in the ghci
# started.
cabal-dev-ghci:
cd src && cabal-dev ghci