forked from jubatus/website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
OMakefile
131 lines (103 loc) · 3.5 KB
/
OMakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
.SUBDIRS: source
# .DEFAULT: $(OCamlProgram $(PROGRAM), $(FILES))
.DEFAULT: help
BOOTSTRAP = ./bootstrap.py
BUILDOUT = bin/buildout
.PHONY: buildout
# for Sphinx
sphinxopts =
SPHINXBUILD = sphinx-build
paper =
builddir = build
srcdir = source
supplementdir = supplement
langs = en ja
sources = $(find $(srcdir) -name *.rst)
# Internal variables.
paperopt_a4 = -D latex_paper_size=a4
paperopt_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = $(sphinxopts) # $(paperopt_$(paper)) $(sphinxopts) .
.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex man changes linkcheck doctest singlehtml
$(BUILDOUT):
python $(BOOTSTRAP) -d init
buildout: $(BUILDOUT) $(BOOTSTRAP) buildout.cfg
$(SPHINXBUILD): buildout
$(BUILDOUT)
help_message = $"""
Please use `make <target>' where <target> is one of
html to make standalone HTML files
dirhtml to make HTML files named index.html in directories
pickle to make pickle files
json to make JSON files
htmlhelp to make HTML files and a HTML help project
qthelp to make HTML files and a qthelp project
latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
man to make manual page files
changes to make an overview of all changed/added/deprecated items
linkcheck to check all external links for integrity
doctest to run all doctests embedded in the documentation (if enabled)
"""
help:
eprintln( $(help_message) )
clean:
-rm -rf $(builddir)/*
DepBuild(target, message) =
$(target): $(sources) # $(SPHINXBUILD)
foreach(lang, $(langs)):
$(SPHINXBUILD) -b $(target) $(ALLSPHINXOPTS) \
-d $(builddir)/doctrees/$(lang) \
$(srcdir)/$(lang) \
$(builddir)/$(target)/$(lang)
/bin/cp -rf $(supplementdir)/* $(builddir)
eprintln( $(message) )
# # In fact I'd like to write like following:
# Dep_map. =
# extends $(Map)
# $|json| = $''' hoge '''
# $|pickle| = $''' hage '''
# $(Dep_map.map $(DepBuild) )
DepBuild( singlehtml, $''''
Build finished. The HTML pages are in $(builddir)/html.
'''' )
DepBuild( html, $''''
Build finished. The HTML pages are in $(builddir)/html.
'''' )
DepBuild( dirhtml, $''''
Build finished. The HTML pages are in $(builddir)/dirhtml.
'''')
DepBuild( pickle, $''''
Build finished; now you can process the pickle files.
'''')
DepBuild( json, $''''
Build finished; now you can process the JSON files.
'''')
DepBuild( htmlhelp, $'''
Build finished; now you can run HTML Help Workshop with the
.hhp project file in $(builddir)/htmlhelp.
''')
DepBuild( qthelp, $''''
Build finished; now you can run "qcollectiongenerator" with the
.qhcp project file in $(builddir)/qthelp, like this:
# qcollectiongenerator $(builddir)/qthelp/CouchDBtheDefinitiveGuideTranslationtoJapanese.qhcp
To view the help file:
# assistant -collectionFile $(builddir)/qthelp/CouchDBtheDefinitiveGuideTranslationtoJapanese.qhc
'''')
DepBuild( latex, $''''
Build finished; the LaTeX files are in $(builddir)/latex.
Run 'make all-pdf' or 'make all-ps' in that directory to
run these through (pdf)latex.
'''')
DepBuild( man, $''''
Build finished. The manual pages are in $(builddir)/man.
'''' )
DepBuild( changes, $''''
The overview file is in $(builddir)/changes.
'''')
DepBuild( linkcheck, $''''
Link check complete; look for any errors in the above output
or in $(builddir)/linkcheck/output.txt.
'''')
DepBuild( doctest, $''''
Testing of doctests in the sources finished, look at the
results in $(builddir)/doctest/output.txt.
'''')