forked from Qiskit/qiskit-metapackage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (38 loc) · 1.63 KB
/
Makefile
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
45
46
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
.PHONY: doc autodoc autodoc_qiskit autodoc_aqua autodoc_chemistry clean
# Define the paths where the different packages are placed. If present in an
# environment variable with the same name (ie. "PATH_QISKIT=/a/b/c make doc"),
# the environment variable value will take precedence.
PATH_QISKIT ?= $(shell pip show qiskit-terra | grep Location | sed 's/Location: //')
PATH_AQUA ?= $(shell pip show qiskit-aqua | grep Location | sed 's/Location: //')
PATH_CHEMISTRY ?= $(shell pip show qiskit-chemistry | grep Location | sed 's/Location: //')
autodoc_qiskit:
ifneq ($(PATH_QISKIT), )
sphinx-apidoc --output docs/autodoc --separate --implicit-namespaces --private --module-first -d 16 \
$(PATH_QISKIT)/qiskit
endif
autodoc_aqua:
ifneq ($(PATH_AQUA), )
sphinx-apidoc --output docs/autodoc --separate --implicit-namespaces --private --module-first -d 16 \
$(PATH_AQUA)/qiskit_aqua
endif
autodoc_chemistry:
ifneq ($(PATH_CHEMISTRY), )
sphinx-apidoc --output docs/autodoc --separate --implicit-namespaces --private --module-first -d 16 \
$(PATH_CHEMISTRY)/qiskit_chemistry
endif
autodoc: autodoc_qiskit autodoc_aqua autodoc_chemistry
ifneq ($(PATH_TERRA) $(PATH_AQUA) $(PATH_CHEMISTRY), )
rm -f docs/autodoc/modules.rst
endif
doc: autodoc
make -C docs html
rm -rf docs/_build/html/_static/font
find docs/_build/html/_static/material-design-lite-1.3.0 -type f ! \
\( -name 'material.blue-indigo.min.css' -o -name 'LICENSE' \) -delete
clean:
make -C docs clean
rm -rf docs/autodoc