-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
80 lines (65 loc) · 1.58 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
73
74
75
76
77
78
79
80
YAML = stack_m1.yaml
TESTS = $(wildcard examples/*.pi)
ERRORS = $(wildcard errors/*.pi)
DEST = [email protected]:public_html/Software/FairCheck/
STACK = stack --stack-yaml $(YAML)
NULL =
SOURCES = \
Atoms.hs \
Checker.hs \
Common.hs \
Exceptions.hs \
Formula.hs \
Node.hs \
Predicate.hs \
Process.hs \
Relation.hs \
Render.hs \
Resolver.hs \
Interpreter.hs \
Tree.hs \
Type.hs \
$(NULL)
all:
@$(STACK) build
docs:
@$(STACK) exec haddock -- --package-name FairCheck --hide Parser --ignore-link-symbol=Parser --html -o docs $(SOURCES:%=src/%)
watch:
@$(STACK) build --file-watch
install:
@$(STACK) install
dist:
@cabal sdist
sync:
@make -C html
@scp html/*.* $(DEST)
@scp dist/*.tar.gz $(DEST)
info:
@$(STACK) exec happy -- -i src/Parser.y
%.check_ok:
@faircheck --log $(@:%.check_ok=%) || echo
check_examples:
@echo
@echo "SCRIPTS THAT MUST PASS"
@echo "–————————————————————–"
@for i in $(TESTS); do make -s $$i.check_ok; done
%.check:
@faircheck --log $(@:%.check=%) || echo
check_errors:
@echo
@echo "SCRIPTS THAT MUST FAIL"
@echo "–————————————————————–"
@for i in $(ERRORS); do make -s $$i.check; done
update_licence:
for hs in `find src -name "*.hs"`; do \
TEMP=`mktemp`; \
cp LICENSE.hs $$TEMP; \
tail -n +17 <$$hs >>$$TEMP; \
mv $$TEMP $$hs; \
done
check: check_examples check_errors
@echo
.PHONY: dist clean check check_examples check_errors docs
clean:
@$(STACK) clean
@rm -f `$(STACK) path --local-bin`/faircheck