-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathMakefile
58 lines (44 loc) · 1.11 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
# General project-wide tasks
PARSERS_DIR := frontend/parse
TEST_DIR := testsuite
FLAGS := -m naive
all : compiler
# Must remove generated Lexer.hs and Parser.hs before `make`
# Otherwise Stack will choose, for example, Parser.hs instead of
# Parser.y, and Parser.hs can be outdated compared to Parser.y
.PHONY : compiler
compiler : clean_parsers runtime
stack build --copy-bins
# .PHONY : smt
# smt : runtime dependencies
# $${CABAL=cabal} install -f Z3
.PHONY : test
test : whitespace_test runtime
stack build fcore --test
.PHONY : whitespace_test
whitespace_test :
ruby $(TEST_DIR)/whitespace_check.rb
# .PHONY : dependencies
# dependencies :
# stack --no-terminal build --only-snapshot
.PHONY : runtime
runtime :
cd runtime && ant
.PHONY : parsers
parsers :
cd $(PARSERS_DIR) && make
.PHONY : clean_parsers
clean_parsers :
cd $(PARSERS_DIR) && make clean
# .PHONY : guard
# guard :
# cabal install hspec
# gem install guard-haskell
.PHONY : clean
clean :
rm -rf dist
rm -f *.class *.jar Main.java
rm -f $(TEST_DIR)/tests/run-pass/*.java
stack clean
cd $(PARSERS_DIR) && make clean
cd runtime && ant clean