doc/Makefile
author Guillaume Vandevelde <gvandevelde@logilab.fr>
Thu, 13 Feb 2020 13:56:12 +0100
branch3.26
changeset 12876 fe9bd0e937e4
parent 11057 0b59724cb3f2
permissions -rw-r--r--
[pkg] version 3.26.15
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10491
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
     1
SRC=.
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
     2
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
     3
# You can set these sphinx variables from the command line.
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
     4
SPHINXOPTS    =
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
     5
SPHINXBUILD   = sphinx-build
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
     6
PAPER         =
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
     7
#BUILDDIR      = build
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
     8
BUILDDIR      = _build
11057
0b59724cb3f2 Reorganize source tree to have a "cubicweb" top-level package
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 10491
diff changeset
     9
CWDIR         = ../cubicweb
10491
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    10
JSDIR         = ${CWDIR}/web/data
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    11
JSTORST       = tools/pyjsrest.py
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    12
BUILDJS       = js_api
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    13
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    14
# Internal variables for sphinx
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    15
PAPEROPT_a4     = -D latex_paper_size=a4
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    16
PAPEROPT_letter = -D latex_paper_size=letter
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    17
ALLSPHINXOPTS   = -d ${BUILDDIR}/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    18
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    19
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    20
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    21
.PHONY: help clean html web pickle htmlhelp latex changes linkcheck
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    22
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    23
help:
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    24
	@echo "Please use \`make <target>' where <target> is one of"
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    25
	@echo "  all       to make standalone HTML files, developer manual and API doc"
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    26
	@echo "  html      to make standalone HTML files"
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    27
	@echo "---  "
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    28
	@echo "  pickle    to make pickle files (usable by e.g. sphinx-web)"
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    29
	@echo "  htmlhelp  to make HTML files and a HTML help project"
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    30
	@echo "  latex     to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    31
	@echo "  changes   to make an overview over all changed/added/deprecated items"
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    32
	@echo "  linkcheck to check all external links for integrity"
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    33
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    34
clean:
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    35
	rm -f *.html
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    36
	-rm -rf ${BUILDDIR}/html ${BUILDDIR}/doctrees
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    37
	-rm -rf ${BUILDJS}
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    38
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    39
all: html
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    40
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    41
# run sphinx ###
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    42
html: js
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    43
	mkdir -p ${BUILDDIR}/html ${BUILDDIR}/doctrees
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    44
	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) ${BUILDDIR}/html
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    45
	@echo
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    46
	@echo "Build finished. The HTML pages are in ${BUILDDIR}/html."
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    47
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    48
js:
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    49
	mkdir -p ${BUILDJS}
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    50
	$(JSTORST) -p ${JSDIR} -o ${BUILDJS}
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    51
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    52
pickle:
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    53
	mkdir -p ${BUILDDIR}/pickle ${BUILDDIR}/doctrees
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    54
	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) ${BUILDDIR}/pickle
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    55
	@echo
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    56
	@echo "Build finished; now you can process the pickle files or run"
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    57
	@echo "  sphinx-web ${BUILDDIR}/pickle"
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    58
	@echo "to start the sphinx-web server."
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    59
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    60
web: pickle
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    61
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    62
htmlhelp:
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    63
	mkdir -p ${BUILDDIR}/htmlhelp ${BUILDDIR}/doctrees
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    64
	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) ${BUILDDIR}/htmlhelp
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    65
	@echo
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    66
	@echo "Build finished; now you can run HTML Help Workshop with the" \
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    67
	      ".hhp project file in ${BUILDDIR}/htmlhelp."
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    68
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    69
latex:
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    70
	mkdir -p ${BUILDDIR}/latex ${BUILDDIR}/doctrees
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    71
	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) ${BUILDDIR}/latex
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    72
	@echo
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    73
	@echo "Build finished; the LaTeX files are in ${BUILDDIR}/latex."
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    74
	@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    75
	      "run these through (pdf)latex."
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    76
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    77
changes:
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    78
	mkdir -p ${BUILDDIR}/changes ${BUILDDIR}/doctrees
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    79
	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) ${BUILDDIR}/changes
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    80
	@echo
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    81
	@echo "The overview file is in ${BUILDDIR}/changes."
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    82
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    83
linkcheck:
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    84
	mkdir -p ${BUILDDIR}/linkcheck ${BUILDDIR}/doctrees
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    85
	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) ${BUILDDIR}/linkcheck
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    86
	@echo
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    87
	@echo "Link check complete; look for any errors in the above output " \
c67bcee93248 [doc] Restructure the documentation
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    88
	      "or in ${BUILDDIR}/linkcheck/output.txt."