Version 1.0.1
[linpy.git] / Makefile
1 NAME=linpy
2
3 PYTHON=python3
4 SETUP=$(PYTHON) setup.py
5 RM=rm -rf
6
7 .PHONY: default
8 default:
9 @echo "$(NAME) – A polyhedral library based on isl"
10 @echo
11 @echo "Makefile usage:"
12 @echo " make build build the extension modules"
13 @echo " make test run the test suite"
14 @echo " make doc generate the documentation"
15 @echo " make view_doc open the documentation index"
16 @echo " make clean remove the generated files"
17 @echo " make upload upload the module on PyPI"
18
19 .PHONY: build
20 build:
21 $(SETUP) build_ext --inplace
22
23 .PHONY: test
24 test: build
25 $(PYTHON) -m unittest -v
26
27 .PHONY: doc
28 doc:
29 $(MAKE) -C doc html
30
31 .PHONY: view_doc
32 view_doc: doc
33 xdg-open doc/_build/html/index.html >/dev/null 2>&1
34
35 .PHONY: clean
36 clean:
37 $(RM) build dist MANIFEST venv LinPy.egg-info $(NAME)/_islhelper.*.so
38 find . -name __pycache__ | xargs $(RM)
39 $(MAKE) -C doc $@
40
41 .PHONY: upload
42 upload:
43 $(SETUP) register sdist upload