source: sasmodels/doc/Makefile @ 61ba623

core_shell_microgelscostrafo411magnetic_modelrelease_v0.94release_v0.95ticket-1257-vesicle-productticket_1156ticket_1265_superballticket_822_more_unit_tests
Last change on this file since 61ba623 was 61ba623, checked in by Paul Kienzle <pkienzle@…>, 10 years ago

redo model table of contents to use doc category from model

  • Property mode set to 100644
File size: 4.1 KB
Line 
1# Makefile for Sphinx documentation
2#
3
4# You can set these variables from the command line.
5PYTHON       ?= python
6SPHINXOPTS    =
7SPHINXBUILD   = $(PYTHON) -m  sphinx.__init__
8PAPER        ?= letter
9BUILDDIR      = _build
10ifdef ComSpec
11    RMDIR   = del /s/q/f
12    CPDIR   = xcopy /q/e/i
13    MKDIR   = mkdir
14    PATHSEP = $(strip \)
15    COPY    = copy
16else
17    RMDIR   = rm -rf
18    CPDIR   = cp -rp
19    MKDIR   = mkdir -p
20    PATHSEP = $(strip /)
21    COPY    = cp
22endif
23
24# Internal variables.
25PAPEROPT_a4     = -D latex_paper_size=a4
26PAPEROPT_letter = -D latex_paper_size=letter
27ALLSPHINXOPTS   = -d _build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
28
29IMG_SOURCE = $(wildcard ../sasmodels/models/img/*)
30IMG_DEST = $(patsubst ../sasmodels/models/img/%,model/img/%,$(IMG_SOURCE))
31MODELS_PY = $(wildcard ../sasmodels/models/[a-z]*.py)
32MODELS_RST = $(patsubst ../sasmodels/models/%.py,model/%.rst,$(MODELS_PY))
33
34help:
35        @echo "Please use \`make <target>' where <target> is one of"
36        @echo "  html      to make standalone HTML files"
37        @echo "  dirhtml   to make HTML files named index.html in directories"
38        @echo "  pickle    to make pickle files"
39        @echo "  json      to make JSON files"
40        @echo "  htmlhelp  to make HTML files and a HTML help project"
41        @echo "  qthelp    to make HTML files and a qthelp project"
42        @echo "  latex     to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
43        @echo "  changes   to make an overview of all changed/added/deprecated items"
44        @echo "  linkcheck to check all external links for integrity"
45        @echo "  doctest   to run all doctests embedded in the documentation (if enabled)"
46
47model/img/%: ../sasmodels/models/img/%
48        $(COPY) $< $@
49
50model/%.rst: ../sasmodels/models/%.py
51        $(PYTHON) genmodel.py $< $@
52
53ref/models/index.rst: gentoc.py $(MODELS_PY)
54        $(PYTHON) gentoc.py $(MODELS_PY)
55
56.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest build
57
58api: genapi.py
59        $(RMDIR) api
60        $(PYTHON) genapi.py
61
62model:
63        $(MKDIR) model
64        $(MKDIR) model/img
65
66build: model $(MODELS_RST) $(IMG_DEST) api ref/models/index.rst
67        #cd ../.. && python setup.py build
68
69upload:
70        scp -r _build/html/* reflectometry.org:web/danse/docs/sasmodels
71        scp _build/latex/SASModels.pdf reflectometry.org:web/danse/download
72
73clean:
74        -rm -rf _build model api
75
76html: build
77        $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html
78        @echo
79        @echo "Build finished. The HTML pages are in _build/html."
80
81dirhtml:
82        $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) _build/dirhtml
83        @echo
84        @echo "Build finished. The HTML pages are in _build/dirhtml."
85
86pickle:
87        $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) _build/pickle
88        @echo
89        @echo "Build finished; now you can process the pickle files."
90
91json:
92        $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) _build/json
93        @echo
94        @echo "Build finished; now you can process the JSON files."
95
96htmlhelp:
97        $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) _build/htmlhelp
98        @echo
99        @echo "Build finished; now you can run HTML Help Workshop with the" \
100              ".hhp project file in _build/htmlhelp."
101
102qthelp:
103        $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) _build/qthelp
104        @echo
105        @echo "Build finished; now you can run "qcollectiongenerator" with the" \
106              ".qhcp project file in _build/qthelp, like this:"
107        @echo "# qcollectiongenerator _build/qthelp/Periodic Table.qhcp"
108        @echo "To view the help file:"
109        @echo "# assistant -collectionFile _build/qthelp/Periodic Table.qhc"
110
111latex: build
112        $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) _build/latex
113        @echo
114        @echo "Build finished; the LaTeX files are in _build/latex."
115        @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
116              "run these through (pdf)latex."
117
118pdf: latex
119        $(MAKE) -C _build/latex all-pdf
120
121changes:
122        $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) _build/changes
123        @echo
124        @echo "The overview file is in _build/changes."
125
126linkcheck:
127        $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) _build/linkcheck
128        @echo
129        @echo "Link check complete; look for any errors in the above output " \
130              "or in _build/linkcheck/output.txt."
131
132doctest:
133        $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) _build/doctest
134        @echo "Testing of doctests in the sources finished, look at the " \
135              "results in _build/doctest/output.txt."
Note: See TracBrowser for help on using the repository browser.