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