File: rules

package info (click to toggle)
breathe 4.12.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 1,752 kB
  • sloc: python: 9,895; cpp: 1,434; makefile: 508; ansic: 154; sh: 50
file content (44 lines) | stat: -rwxr-xr-x 1,266 bytes parent folder | download
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
#!/usr/bin/make -f

PY3DEF=$(shell py3versions -vd)
SPHINXBUILD="/usr/share/sphinx/scripts/python{version.major}/sphinx-build"

# Build documentation for readthedocs
export READTHEDOCS=True
# Do not build for Travis
export TRAVIS_CI=False

%:
	dh $@ --with=python3,sphinxdoc --buildsystem=pybuild

override_dh_auto_clean:
	dh_auto_clean
	$(MAKE) distclean
	rm -rf html

override_dh_auto_build:
	dh_auto_build
	# Link mathjax in _static
	ln -s /usr/share/javascript/mathjax \
		documentation/source/_static/mathjax
	pybuild --system=custom -p $(PY3DEF) --build \
		--build-args="env PYTHONPATH={build_dir} $(MAKE) SPHINXBUILD=$(SPHINXBUILD)"
	mv documentation/build/html html

override_dh_auto_test:
	# We test breathe by building the documention. The documentation has already
	# been built for the default Python 3 version, so we do not need to do this
	# again.

override_dh_auto_install:
	dh_auto_install -- \
		--after-install='mv debian/tmp/usr/bin/breathe-apidoc debian/tmp/usr/bin/python{version.major}-breathe-apidoc'

override_dh_installdocs:
	# Do not copy mathjax to the binary package
	dh_installdocs -X_static/mathjax

override_dh_sphinxdoc:
	# dh_link creates the link for mathjax after dh_sphinxdoc, so ignore
	# MathJax.js
	dh_sphinxdoc -XMathJax.js