Debian Codegraph @

Makefile

raw symbols SCIP
1 #!/usr/bin/make -f
2 INSTALL ?= install
3 PREFIX ?= /usr/local
4 MANPAGES ?= pybuild.1 pybuild-autopkgtest.1 dh_python3.1
5 DVERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: (.+),\1,p' || echo 'DEVEL')
6 VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p' || echo 'DEVEL')
7
8 clean:
9 make -C tests clean
10 make -C pydist clean
11 find . -name '*.py[co]' -delete
12 find . -name __pycache__ -type d | xargs rm -rf
13 rm -f .coverage $(MANPAGES)
14 rm -rf .pybuild
15
16 dist:
17 git archive --format=tar --prefix=dh-python-$(VERSION)/ HEAD \
18 | xz -9 -c >../dh-python_$(VERSION).orig.tar.xz
19
20 install:
21 $(INSTALL) -m 755 -d $(DESTDIR)$(PREFIX)/bin \
22 $(DESTDIR)$(PREFIX)/share/debhelper/autoscripts/ \
23 $(DESTDIR)$(PREFIX)/share/perl5/Debian/Debhelper/Sequence/ \
24 $(DESTDIR)$(PREFIX)/share/perl5/Debian/Debhelper/Buildsystem/ \
25 $(DESTDIR)$(PREFIX)/share/dh-python/dhpython/build \
26 $(DESTDIR)$(PREFIX)/share/dh-python/dist
27 $(INSTALL) -m 644 pydist/*_fallback $(DESTDIR)$(PREFIX)/share/dh-python/dist/
28 $(INSTALL) -m 644 dhpython/*.py $(DESTDIR)$(PREFIX)/share/dh-python/dhpython/
29 $(INSTALL) -m 644 dhpython/build/*.py $(DESTDIR)$(PREFIX)/share/dh-python/dhpython/build/
30 $(INSTALL) -m 755 pybuild $(DESTDIR)$(PREFIX)/share/dh-python/
31 $(INSTALL) -m 755 pybuild-autopkgtest $(DESTDIR)$(PREFIX)/share/dh-python/
32 $(INSTALL) -m 755 dh_python3 $(DESTDIR)$(PREFIX)/share/dh-python/
33 sed -i -e 's/DEVELV/$(DVERSION)/' $(DESTDIR)$(PREFIX)/share/dh-python/pybuild
34 sed -i -e 's/DEVELV/$(DVERSION)/' $(DESTDIR)$(PREFIX)/share/dh-python/dh_python3
35
36 $(INSTALL) -m 644 dh/pybuild.pm $(DESTDIR)$(PREFIX)/share/perl5/Debian/Debhelper/Buildsystem/
37 $(INSTALL) -m 644 dh/python3.pm $(DESTDIR)$(PREFIX)/share/perl5/Debian/Debhelper/Sequence/
38 $(INSTALL) -m 644 autoscripts/* $(DESTDIR)$(PREFIX)/share/debhelper/autoscripts/
39
40 %.1: %.rst
41 rst2man $< > $@
42
43 %.htm: %.rst
44 rst2html $< > $@
45
46 manpages: $(MANPAGES)
47
48 dist_fallback:
49 make -C pydist $@
50
51 mypy:
52 mypy --strict dh_python3 dhpython/ tests/*.py
53 mypy --strict pybuild
54
55 black:
56 black $(BLACK_ARGS) pybuild dh_python3 dhpython/ pydist/*.py tests/*.py
57
58 pyupgrade:
59 pyupgrade --py311-plus dh_python3 pybuild pydist/*.py tests/*.py $(shell find dhpython -name *.py)
60
61 # TESTS
62 nose:
63 #nosetests3 --verbose --with-doctest --with-coverage
64 nose2-3 --verbose --plugin nose2.plugins.doctests --with-doctest
65
66 tests: nose
67 make -C tests
68
69 test%:
70 make -C tests $@
71
72 .PHONY: clean tests test% check_versions