Debian Codegraph @

Makefile

raw
1 ###################################################################################################
2 # License:
3 # MIT License
4 #
5 # Copyright (c) 2015-2022 by Martin Scharrer <[email protected]>
6 #
7 # Permission is hereby granted, free of charge, to any person obtaining a copy of this software
8 # and associated documentation files (the "Software"), to deal in the Software without
9 # restriction, including without limitation the rights to use, copy, modify, merge, publish,
10 # distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
11 # Software is furnished to do so, subject to the following conditions:
12 #
13 # The above copyright notice and this permission notice shall be included in all copies or
14 # substantial portions of the Software.
15 #
16 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
17 # BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
19 # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 #
22 ###################################################################################################
23
24 .PHONY: all test Install plugins dist clean doc release
25
26 all: test
27
28 test:
29 @echo ""; echo "Running tests:"
30 @python -m coverage run --branch -m unittest discover
31 @python -m coverage report
32 @python -m coverage html
33
34 coverage: test
35
36 dist:
37 @python setup.py test sdist bdist_wheel
38
39
40 clean:
41 @${RM} -rf dist bdist build */__pycache__ */*.pyc *.egg-info coverage_html_report
42
43
44 doc:
45 @echo ""; echo "Extracting documentation:"
46 @cd docs/; export PYTHONPATH=..; python ../create/crctable.py > source/crctable.rst
47 @cd docs/; sphinx-apidoc -f -o source ../crccheck
48 @cd docs/; sphinx-build -b html source build
49
50
51 update:
52 @test -z "$$(git status --porcelain crccheck/crc.py)" || (echo "crccheck/crc.py has uncommitted changes. Aborting!" && exit 1)
53 @cd create/; python dl.py > ../crccheck/crc.py
54 @test -z "$$(git status --porcelain crccheck/crc.py)" || echo "crccheck/crc.py has been updated."
55
56
57 release: clean test doc dist
58