-
Notifications
You must be signed in to change notification settings - Fork 237
/
Makefile
64 lines (57 loc) · 1.61 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
TESTS := test/parse/*.bril \
test/print/*.json \
test/ts*/*.ts \
test/check/*.bril \
test/interp*/core*/*.bril \
test/interp*/char*/*.bril \
test/interp*/float/*.bril \
test/interp*/mem*/*.bril \
test/interp*/mixed/*.bril \
test/interp*/spec*/*.bril \
test/interp*/ssa*/*.bril \
examples/test/*/*.bril \
benchmarks/core/*.bril \
benchmarks/float/*.bril \
benchmarks/mem/*.bril \
benchmarks/mixed/*.bril \
CHECKS := test/parse/*.bril \
test/interp/core/*.bril \
test/interp/char/*.bril \
test/interp/float/*.bril \
test/interp/mixed/*.bril \
test/interp/spec/*.bril \
test/interp/ssa/*.bril \
test/interp/mem/*.bril \
examples/test/*/*.bril \
benchmarks/core/*.bril \
benchmarks/float/*.bril \
benchmarks/mem/*.bril \
benchmarks/mixed/*.bril \
# https://stackoverflow.com/a/25668869
EXECUTABLES = bril2json bril2txt ts2bril brili brilck
.PHONY: test
test:
$(foreach exec,$(EXECUTABLES), $(if $(shell which $(exec)),,$(error "No $(exec) in PATH: Either refer to the documentation for their installation instructions or run a subset of the tests manually with `turnt test/interp*/**/*.bril`")))
turnt $(TURNTARGS) $(TESTS)
.PHONY: check
check:
for fn in $(CHECKS) ; do \
bril2json -p < $$fn | brilck $$fn || failed=1 ; \
done ; \
exit $$failed
.PHONY: book
book:
rm -rf book
mdbook build
.PHONY: ts
ts:
cd bril-ts ; \
yarn ; \
yarn build
.PHONY: deploy
RSYNCARGS := --compress --recursive --checksum --itemize-changes \
--delete -e ssh --perms --chmod=Du=rwx,Dgo=rx,Fu=rw,Fog=r \
--exclude=.DS_Store
DEST := courses:coursewww/capra.cs.cornell.edu/htdocs/bril
deploy: book
rsync $(RSYNCARGS) ./book/ $(DEST)