1# PGXN Client -- documentation makefile 2# 3# Building docs requires virtualenv already installed in the system. 4# 5# Use'make html' to build the HTML documentation. 6# 7# Copyright (C) 2011-2021 Daniele Varrazzo 8 9PYTHON := python 10ENV_DIR = $(shell pwd)/env 11ENV_BIN = $(ENV_DIR)/bin 12 13SPHINXOPTS = 14SPHINXBUILD = $(ENV_BIN)/sphinx-build 15PAPER = 16BUILDDIR = . 17 18.PHONY: env clean html 19 20default: html 21 22html: env 23 $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) \ 24 . $(BUILDDIR)/html 25 26# The environment is currently required to build the documentation. 27# It is not clean by 'make clean' 28env: 29 [ -d "$(ENV_DIR)" ] || ( \ 30 virtualenv -p "$(PYTHON)" "$(ENV_DIR)" \ 31 && "$(ENV_BIN)/pip" install -r requirements.txt) 32 33clean: 34 $(RM) -r html 35