-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
72 lines (56 loc) · 1.49 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
67
68
69
70
71
72
E := SymphonyMain.mainDefault
NAME := symphony
STACK_ARGS := --trace --ghci-options '-fexternal-interpreter -prof'
STACK_ARGS :=
$(NAME): build
rm -f $(NAME)
ln -s `stack path --local-install-root`/bin/$(NAME) ./
all-examples: $(NAME)
./$(NAME) example $(FLAGS) basic
./$(NAME) example $(FLAGS) gcd
extern/uvmhs/stack.yaml:
git submodule update --init --recursive $(@D)
.stack-work:
stack setup
.PHONY: build
build: extern/uvmhs/stack.yaml .stack-work
stack build
# stack build --flag symphony:par --extra-lib-dirs=$(CURDIR)/extern/symphony-runtime/target/release
build-profile: .stack-work
stack build --profile --flag symphony:par --extra-lib-dirs=$(CURDIR)/extern/symphony-runtime/target/debug
.PHONY: dev
dev: .stack-work
ghcid --command="stack ghci $(STACK_ARGS)" --warnings --test $E
.PHONY: eval
eval: .stack-work
stack ghci $(STACK_ARGS) --ghci-options '-e $E'
.PHONY: run
run: .stack-work
stack run -- $(ARGS)
.PHONY: trace
trace: .stack-work
stack run --trace -- $(ARGS)
.PHONY: profile
profile: .stack-work
stack run --profile -- $(ARGS) +RTS -p
.PHONY: ghci
ghci: .stack-work
stack ghci
.PHONY: docs
docs: .stack-work
stack haddock
rm -rf ./docs
cp -r `stack path --local-doc-root` ./docs
.PHONY: clean
clean:
stack clean --full
rm -f $(NAME).cabal
rm -rf docs
.PHONY:
re:
touch src/Symphony.hs
.PHONY: hoogle
hoogle:
stack hoogle -- generate --local
(sleep 1 && open http://localhost:8080/?scope=package%3A$(NAME)) &
stack hoogle -- server --local --port=8080