From a71985b9defc28b469787393193fdbe5904cab96 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Tue, 6 Aug 2013 19:22:52 +0900 Subject: Add generation of package documentation Documentation is generated in html format into the docs folder. The idea is that with further commits we can automatically generate and package the documentation into a zip file that can be published to the package index. Change-Id: Ia5719bda59b6224fc05e2021e9054e29990ad22a --- Makefile | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index f69e63e..549e84f 100644 --- a/Makefile +++ b/Makefile @@ -20,10 +20,34 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. +PWD := $(shell pwd) + all: test test: clean unittests pyflakes pep8 pep257 pylint +docs: html + +html: sphinx + bash -c "\ + source ./pygerritenv/bin/activate && \ + export PYTHONPATH=$(PWD) && \ + cd docs && \ + make html && \ + cd $(PWD)" + +sphinx: docenvsetup + bash -c "\ + source ./pygerritenv/bin/activate && \ + sphinx-apidoc \ + -V \"$(TAG)\" \ + -R \"$(TAG)\" \ + -H \"Pygerrit\" \ + -A \"Sony Mobile Communications\" \ + --full \ + --force \ + -o docs pygerrit" + pylint: testenvsetup bash -c "\ source ./pygerritenv/bin/activate && \ @@ -55,6 +79,11 @@ testenvsetup: envsetup source ./pygerritenv/bin/activate && \ pip install --upgrade -r test_requirements.txt" +docenvsetup: envsetup + bash -c "\ + source ./pygerritenv/bin/activate && \ + pip install --upgrade -r doc_requirements.txt" + envsetup: envinit bash -c "\ source ./pygerritenv/bin/activate && \ @@ -65,4 +94,4 @@ envinit: clean: @find . -type f -name "*.pyc" -exec rm -f {} \; - @rm -rf pygerritenv pygerrit.egg-info build dist + @rm -rf pygerritenv pygerrit.egg-info build dist docs -- cgit v1.2.1