source: sasmodels/doc/Makefile @ 1e11735

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

build docs for models

  • Property mode set to 100644
File size: 4.0 KB
RevLine 
[19dcb933]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
34model/img/%: ../sasmodels/models/img/%
35        $(COPY) $< $@
36
37model/%.rst: ../sasmodels/models/%.py
38        $(PYTHON) genmodel.py $< $@
39
40.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest build
41
42help:
43        @echo "Please use \`make <target>' where <target> is one of"
44        @echo "  html      to make standalone HTML files"
45        @echo "  dirhtml   to make HTML files named index.html in directories"
46        @echo "  pickle    to make pickle files"
47        @echo "  json      to make JSON files"
48        @echo "  htmlhelp  to make HTML files and a HTML help project"
49        @echo "  qthelp    to make HTML files and a qthelp project"
50        @echo "  latex     to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
51        @echo "  changes   to make an overview of all changed/added/deprecated items"
52        @echo "  linkcheck to check all external links for integrity"
53        @echo "  doctest   to run all doctests embedded in the documentation (if enabled)"
54
55api: genapi.py
56        $(RMDIR) api
57        $(PYTHON) genapi.py
58
59model:
60        $(MKDIR) model
61        $(MKDIR) model/img
62
63build: model $(MODELS_RST) $(IMG_DEST) api
64        #cd ../.. && python setup.py build
65
66upload:
67        scp -r _build/html/* reflectometry.org:web/danse/docs/sasmodels
68        scp _build/latex/SASModels.pdf reflectometry.org:web/danse/download
69
70clean:
71        -rm -rf _build model api
72
73html: build
74        $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html
75        @echo
76        @echo "Build finished. The HTML pages are in _build/html."
77
78dirhtml:
79        $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) _build/dirhtml
80        @echo
81        @echo "Build finished. The HTML pages are in _build/dirhtml."
82
83pickle:
84        $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) _build/pickle
85        @echo
86        @echo "Build finished; now you can process the pickle files."
87
88json:
89        $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) _build/json
90        @echo
91        @echo "Build finished; now you can process the JSON files."
92
93htmlhelp:
94        $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) _build/htmlhelp
95        @echo
96        @echo "Build finished; now you can run HTML Help Workshop with the" \
97              ".hhp project file in _build/htmlhelp."
98
99qthelp:
100        $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) _build/qthelp
101        @echo
102        @echo "Build finished; now you can run "qcollectiongenerator" with the" \
103              ".qhcp project file in _build/qthelp, like this:"
104        @echo "# qcollectiongenerator _build/qthelp/Periodic Table.qhcp"
105        @echo "To view the help file:"
106        @echo "# assistant -collectionFile _build/qthelp/Periodic Table.qhc"
107
108latex: build
109        $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) _build/latex
110        @echo
111        @echo "Build finished; the LaTeX files are in _build/latex."
112        @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
113              "run these through (pdf)latex."
114
115pdf: latex
116        $(MAKE) -C _build/latex all-pdf
117
118changes:
119        $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) _build/changes
120        @echo
121        @echo "The overview file is in _build/changes."
122
123linkcheck:
124        $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) _build/linkcheck
125        @echo
126        @echo "Link check complete; look for any errors in the above output " \
127              "or in _build/linkcheck/output.txt."
128
129doctest:
130        $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) _build/doctest
131        @echo "Testing of doctests in the sources finished, look at the " \
132              "results in _build/doctest/output.txt."
Note: See TracBrowser for help on using the repository browser.