forked from hpyproject/hpy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
52 lines (43 loc) · 1.69 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
.PHONY: all
all: hpy.universal
.PHONY: hpy.universal
hpy.universal:
python3 setup.py build_ext -if
.PHONY: dist-info
dist-info:
python3 setup.py dist_info
debug:
HPY_DEBUG=1 make all
autogen:
python3 -m hpy.tools.autogen .
cppcheck-build-dir:
mkdir -p $(or ${CPPCHECK_BUILD_DIR}, .cppcheck)
cppcheck: cppcheck-build-dir
# azure pipelines doesn't show stderr, so we write the errors to a file and cat it later :(
cppcheck --version
cppcheck \
--error-exitcode=1 \
--cppcheck-build-dir=$(or ${CPPCHECK_BUILD_DIR}, .cppcheck) \
--output-file=$(or ${CPPCHECK_BUILD_DIR}, .cppcheck)/output.txt \
--enable=warning,performance,portability,information,missingInclude \
--inline-suppr \
--suppress=allocaCalled \
-I hpy/devel/include/ \
-I hpy/devel/include/common/ \
-I hpy/devel/include/cpython/ \
-I hpy/devel/include/universal/ \
-I hpy/universal/src/ \
--force \
-D NULL=0 \
. || (cat $(or ${CPPCHECK_BUILD_DIR}, .cppcheck)/output.txt && false)
infer:
python3 setup.py build_ext -if -U NDEBUG | compiledb
# see commit cd8cd6e for why we need to ignore debug_ctx.c
@infer --fail-on-issue --compilation-database compile_commands.json --report-blacklist-path-regex "hpy/debug/src/debug_ctx.c"
valgrind:
PYTHONMALLOC=malloc valgrind --suppressions=hpy/tools/valgrind/python.supp --suppressions=hpy/tools/valgrind/hpy.supp --leak-check=full --show-leak-kinds=definite,indirect --log-file=/tmp/valgrind-output python -m pytest --valgrind --valgrind-log=/tmp/valgrind-output test/
docs-examples-tests:
python docs/examples/simple-example/setup.py install
python docs/examples/mixed-example/setup.py install
python docs/examples/snippets/setup.py install
pytest docs/examples/tests.py