forked from pycket/pycket
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
68 lines (47 loc) · 1.81 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
#/usr/bin/make -f
#
# Path of pypy checkout
PYPYPATH ?= pypy
# Invocation of pytest, defaults to pypy's stuff
# but may also be `py.test`
PYTEST ?= $(PYPYPATH)/pytest.py
RPYTHON ?= $(PYPYPATH)/rpython/bin/rpython --batch
TRANSLATE_TARGETS := translate-jit translate-no-callgraph translate-no-two-state \
translate-no-strategies translate-no-type-size-specialization
PYFILES := $(shell find . -name '*.py' -type f)
.PHONY: all translate-jit-all $(TRANSLATE_TARGETS) translate-no-jit
.PHONY: setup test coverage
translate-jit-all: $(TRANSLATE_TARGETS)
all: translate-jit-all translate-no-jit
translate-jit: pycket-c
translate-no-prune-env: pycket-c-no-prune-env
translate-no-two-state: pycket-c-no-two-state
translate-no-callgraph: pycket-c-no-callgraph
translate-no-strategies: pycket-c-no-strategies
translate-no-type-size-specialization: pycket-c-no-type-size-specialization
translate-no-jit: pycket-c-nojit
pycket-c: $(PYFILES)
$(RPYTHON) -Ojit targetpycket.py
pycket-c-no-prune-env: $(PYFILES)
$(RPYTHON) -Ojit targetpycket.py --no-prune-env
pycket-c-no-two-state: $(PYFILES)
$(RPYTHON) -Ojit targetpycket.py --no-two-state
pycket-c-no-callgraph: $(PYFILES)
$(RPYTHON) -Ojit targetpycket.py --no-callgraph
pycket-c-no-strategies: $(PYFILES)
$(RPYTHON) -Ojit targetpycket.py --no-strategies
pycket-c-no-type-size-specialization: $(PYFILES)
$(RPYTHON) -Ojit targetpycket.py --no-type-size-specialization
pycket-c-nojit: $(PYFILES)
$(RPYTHON) targetpycket.py
setup:
raco pkg install -t dir pycket/pycket-lang/ || \
raco pkg update --link pycket/pycket-lang
hg -R $(PYPYPATH) pull && \
hg -R $(PYPYPATH) update
test: $(PYFILES)
$(PYTEST) pycket
coverage: pycket/test/coverage_report .coverage
pycket/test/coverage_report .coverage: $(PYFILES)
$(PYTEST) pycket --cov pycket \
--cov-report=term-missing --cov-report=html