-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
75 lines (56 loc) · 2.36 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
PYPYPATH?=~/code/python/pypy/
PYTEST?=py.test
PYTESTARGS=
RPYTHON?=$(PYPYPATH)/rpython/bin/rpython
PEP8SCRIPT?=/usr/local/bin/pep8
all: test_all
compile: bin/naulang-python naulang-no-jit
naulang-no-jit:
@mkdir -p bin/
PYTHONPATH=$(PYTHONPATH):$(PYPYPATH):. $(RPYTHON) --batch naulang/targetstandalone.py
@mv ./naulang-nojit ./bin/
naulang-jit:
@mkdir -p bin/
PYTHONPATH=$(PYTHONPATH):$(PYPYPATH):. $(RPYTHON) --batch -Ojit naulang/targetstandalone.py
@mv ./naulang-jit ./bin/
bin/naulang-python:
@mkdir -p bin/
@cat ./naulang/naulang-python.template | sed 's,{PYTHON_PATH},$(PYTHONPATH):$(PYPYPATH):.,g' > ./bin/naulang-python
@chmod +x bin/naulang-python
createdist:
python setup.py sdist
test_all: bin/naulang-python
PYTHONPATH=$(PYTHONPATH):$(PYPYPATH):. $(PYTEST) $(PYTESTARGS) tests/**/test_*.py
tests/functional/nautest.py ./bin/naulang-python ./tests/functional
test_all_compiled:
PYTHONPATH=$(PYTHONPATH):$(PYPYPATH):. $(PYTEST) $(PYTESTARGS) tests/**/test_*.py
tests/functional/nautest.py ./bin/naulang-nojit ./tests/functional
test_all_jit:
PYTHONPATH=$(PYTHONPATH):$(PYPYPATH):. $(PYTEST) $(PYTESTARGS) tests/**/test_*.py
tests/functional/nautest.py ./bin/naulang-jit ./tests/functional
test_compiler:
@PYTHONPATH=$(PYTHONPATH):$(PYPYPATH):. $(PYTEST) $(PYTESTARGS) tests/compiler/test_*.py
test_interpreter:
PYTHONPATH=$(PYTHONPATH):$(PYPYPATH):. $(PYTEST) $(PYTESTARGS) tests/interpreter/test_*.py
test_objectspace:
@PYTHONPATH=$(PYTHONPATH):$(PYPYPATH):. $(PYTEST) $(PYTESTARGS) tests/objectspace/test_*.py
test_runtime:
@PYTHONPATH=$(PYTHONPATH):$(PYPYPATH):. $(PYTEST) $(PYTESTARGS) tests/runtime/test_*.py
test_functional: bin/naulang-python
tests/functional/nautest.py --xml ./bin/naulang-python ./tests/functional
pep8:
@echo `find . -name \*.py -exec $(PEP8SCRIPT) {} \; | wc -l` PEP8 violations in this repository
pep8_verbose:
@find . -name \*.py -exec $(PEP8SCRIPT) {} \;
build_extras:
go build -ldflags='-s' tests/benchmarks/baselines/tokenring.go
mv ./tokenring ./tokenring-go
which kroc && kroc tests/benchmarks/baselines/tokenring.occ
mv ./tokenring ./tokenring-occam
clean:
rm -rf MANIFEST
rm -rf dist/
rm -rf build/
.PHONY: createdist pep8 pep8_verbose clean build build_extras all compile \
naulang-nojit naulang-jit test_all test_all_compiled test_all_jit \
test_compiler test_interpreter test_functional test_objectspace test_runtime