fix documentation generation script, and fix running it on travis

This commit is contained in:
Arvid Norberg 2018-08-19 23:35:06 +02:00 committed by Arvid Norberg
parent 11a8f46921
commit 0550b7c5ab
4 changed files with 11 additions and 15 deletions

View File

@ -14,13 +14,14 @@
},
"macOS": {
"buildenv": "osx",
"homebrew": { "formulae": ["boost-build", "wget", "ccache"] },
"homebrew": { "formulae": ["wget", "ccache"] },
"buildcmd": [
"wget --quiet -O boost.zip https://dl.bintray.com/boostorg/release/1.68.0/source/boost_1_68_0.zip",
"unzip -qq boost.zip",
"rm boost.zip",
"(cd boost_1_68_0/tools/build/src/engine && ./build.sh)",
"cd simulation",
"echo \"using darwin : : ccache clang++ : <cxxflags>-std=c++11 ;\" > ~/user-config.jam",
"cd simulation",
"BOOST_ROOT=${PWD}/../boost_1_68_0 ../boost_1_68_0/tools/build/src/engine/bin.macosxx86_64/bjam --hash -j${PARALLEL}"
]
}

View File

@ -195,7 +195,7 @@ script:
- cd docs
- 'if [ "$docs" == "1" ]; then
make spell-check RST2HTML=rst2html.py AAFIGURE=echo;
make spell-check html RST2HTML=rst2html.py AAFIGURE=echo;
fi'
- cd ..

View File

@ -1,4 +1,5 @@
#!/usr/bin/env python
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
from __future__ import print_function
import glob
@ -1047,15 +1048,15 @@ def render_enums(out, enums, print_declared_reference, header_level):
width[2] = max(width[2], len(d))
print('+-' + ('-' * width[0]) + '-+-' + ('-' * width[1]) + '-+-' + ('-' * width[2]) + '-+', file=out)
print(('| ' + 'name'.ljust(width[0]) + ' | ' + 'value'.ljust(width[1]) + ' | '
'description'.ljust(width[2]) + ' |'), file=out)
print('| ' + 'name'.ljust(width[0]) + ' | ' + 'value'.ljust(width[1]) + ' | '
+ 'description'.ljust(width[2]) + ' |', file=out)
print('+=' + ('=' * width[0]) + '=+=' + ('=' * width[1]) + '=+=' + ('=' * width[2]) + '=+', file=out)
for v in e['values']:
d = v['desc'].split('\n')
if len(d) == 0:
d = ['']
print(('| ' + v['name'].ljust(width[0]) + ' | ' + v['val'].ljust(width[1]) + ' | '
+ d[0].ljust(width[2]) + ' |'), file=out)
print('| ' + v['name'].ljust(width[0]) + ' | ' + v['val'].ljust(width[1]) + ' | '
+ d[0].ljust(width[2]) + ' |', file=out)
for s in d[1:]:
print('| ' + (' ' * width[0]) + ' | ' + (' ' * width[1]) + ' | ' + s.ljust(width[2]) + ' |', file=out)
print('+-' + ('-' * width[0]) + '-+-' + ('-' * width[1]) + '-+-' + ('-' * width[2]) + '-+', file=out)

View File

@ -67,7 +67,7 @@ html: $(TARGETS:=.html) $(FIGURES:=.png) todo.html
rst: $(TARGETS:=.rst) todo.html
pdf: $(TARGETS:=.pdf) $(FIGURES:=.eps)
pdf: $(TARGETS:=.pdf) $(FIGURES:=.png)
epub: $(TARGETS:=.epub) $(FIGURES:=.png)
@ -108,7 +108,7 @@ spell-check:plain_text_out.txt
rst2epub --exit-status=2 $? $@
%.pdf:%.rst
rst2pdf --exit-status=2 $? -o $@ --stylesheets stylesheet
rst2pdf $? -o $@ --stylesheets stylesheet
%.html:%.rst
$(RST2HTML) --exit-status=2 --template=template.txt --stylesheet-path=style.css --link-stylesheet --no-toc-backlinks $? > $@
@ -122,12 +122,6 @@ ifneq ($(STAGE),)
cp $@ $(WEB_PATH)/$@
endif
%.eps:%.dot
dot -Teps $? >$@
ifneq ($(STAGE),)
cp $@ $(WEB_PATH)/$@
endif
%.png:%.diagram
$(AAFIGURE) --scale 0.6 -o $@ $?
ifneq ($(STAGE),)