]> git.llucax.com Git - personal/website.git/blob - Makefile
Update CouchSurfing B-corp video URL
[personal/website.git] / Makefile
1 # Makefile for Sphinx documentation
2 #
3
4 # You can set these variables from the command line.
5 SPHINXOPTS    =
6 SPHINXBUILD   = sphinx-build
7 PAPER         =
8
9 # Internal variables.
10 PAPEROPT_a4     = -D latex_paper_size=a4
11 PAPEROPT_letter = -D latex_paper_size=letter
12 ALLSPHINXOPTS   = -d build/.doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
13
14 .PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes
15 .PHONY: changes linkcheck doctest download upload
16
17 help:
18         @echo "Please use \`make <target>' where <target> is one of"
19         @echo "  html      to make standalone HTML files"
20         @echo "  dirhtml   to make HTML files named index.html in directories"
21         @echo "  pickle    to make pickle files"
22         @echo "  json      to make JSON files"
23         @echo "  htmlhelp  to make HTML files and a HTML help project"
24         @echo "  qthelp    to make HTML files and a qthelp project"
25         @echo "  latex     to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
26         @echo "  changes   to make an overview of all changed/added/deprecated items"
27         @echo "  linkcheck to check all external links for integrity"
28         @echo "  doctest   to run all doctests embedded in the documentation (if enabled)"
29
30 clean:
31         -rm -rf build/*
32
33 sync: download upload
34
35 download:
36         # Get new posts
37         rsync -Pa --ignore-existing \
38                 alerce:/srv/llucax/www/blog/posts/ \
39                 source/blog/posts
40         # Get new comments
41         rsync -Pa --ignore-existing \
42                 alerce:/srv/llucax/www/blog/comments/ \
43                 source/blog/comments
44         # Get modified dbs
45         cp source/blog/posts/db /tmp/blog.db.tmp
46         rsync -Pa --update --include '*/db' \
47                 --exclude posts/current --exclude 'posts/*/*' --exclude 'comments/*/*' \
48                 alerce:/srv/llucax/www/blog/comments \
49                 alerce:/srv/llucax/www/blog/posts \
50                 source/blog/
51         diff /tmp/blog.db.tmp source/blog/posts/db | grep '^-' && ( \
52                 echo "Conflict between posts DBs" && false ) || true
53         chown luca.www-data -R source/blog/comments
54         chmod a+rX,ug+w -R source/blog/comments
55
56 upload:
57         rsync -Pa --delete source/blog/ build/html/blog
58         rsync -Pa --exclude=\*.swp --exclude=\*.pyc build/html/ alerce:/srv/llucax/www
59
60 html:
61         $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) build/html
62         cd source/proj/mutest/repo && make doc && \
63                 rsync -a --delete manual.* ../releases ../../../../build/html/proj/mutest/ && \
64                 ln -fs manual.html ../../../../build/html/proj/mutest/index.html
65         cd source/proj/eventxx/repo && doxygen && \
66                 rsync -a --delete doc/html/ ../releases ../../../../build/html/proj/eventxx/
67         rsync -a --delete source/proj/mutt-nntp-debian/files/ build/html/proj/mutt-nntp-debian/files
68         rsync -a --delete source/proj/sadba/files/ build/html/proj/sadba/files
69         rsync -a source/resume/*.pdf build/html/resume/
70         rsync -a source/proj/dgc/*.pdf build/html/proj/dgc/
71         rsync -a source/proj/dgc/*.bz2 build/html/proj/dgc/
72         rsync -a source/proj/dgc/*.png build/html/proj/dgc/
73         rsync -a source/robots.txt build/html/
74         @echo
75         @echo "Build finished. The HTML pages are in build/html."
76
77 dirhtml:
78         $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) build/dirhtml
79         @echo
80         @echo "Build finished. The HTML pages are in build/dirhtml."
81
82 pickle:
83         $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) build/pickle
84         @echo
85         @echo "Build finished; now you can process the pickle files."
86
87 json:
88         $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) build/json
89         @echo
90         @echo "Build finished; now you can process the JSON files."
91
92 htmlhelp:
93         $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) build/htmlhelp
94         @echo
95         @echo "Build finished; now you can run HTML Help Workshop with the" \
96               ".hhp project file in build/htmlhelp."
97
98 qthelp:
99         $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) build/qthelp
100         @echo
101         @echo "Build finished; now you can run "qcollectiongenerator" with the" \
102               ".qhcp project file in build/qthelp, like this:"
103         @echo "# qcollectiongenerator build/qthelp/Lala.qhcp"
104         @echo "To view the help file:"
105         @echo "# assistant -collectionFile build/qthelp/Lala.qhc"
106
107 latex:
108         $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) build/latex
109         @echo
110         @echo "Build finished; the LaTeX files are in build/latex."
111         @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
112               "run these through (pdf)latex."
113
114 changes:
115         $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) build/changes
116         @echo
117         @echo "The overview file is in build/changes."
118
119 linkcheck:
120         $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) build/linkcheck
121         @echo
122         @echo "Link check complete; look for any errors in the above output " \
123               "or in build/linkcheck/output.txt."
124
125 doctest:
126         $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) build/doctest
127         @echo "Testing of doctests in the sources finished, look at the " \
128               "results in build/doctest/output.txt."