summaryrefslogtreecommitdiff
path: root/admin/build-doc
blob: aee1a48345c76880c9d441195385f1877df8d634 (plain)
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
#!/bin/sh
set -e
cd "$(dirname "$0")"
cd ..

install -d -m0755 build-doc

if [ ! -e build-doc/doxygen/xml ]; then
    doxygen
fi

dia --filter=png-libart --export=doc/overview.png.tmp doc/overview.dia
mv -- doc/overview.png.tmp doc/overview.png

cd build-doc

if [ ! -e virtualenv ]; then
    virtualenv --no-site-packages virtualenv
fi
if [ ! -x virtualenv/bin/sphinx-build ]; then
    ./virtualenv/bin/pip install sphinx
fi

# ugly kludge until breathe is distutils-friendly
install -d breathe
cd breathe
if [ ! -e .git ]; then
    git init
fi
if [ -z "$(git rev-parse --default HEAD)" ]; then
    git pull --ff-only https://github.com/michaeljones/breathe.git master
fi
cd ..

install -d -m0755 \
    output/html \
    output/man
./virtualenv/bin/sphinx-build -a -b dirhtml -d doctrees ../doc output/html
./virtualenv/bin/sphinx-build -a -b man -d doctrees ../doc output/man