3 # Simplistic script to rebuild our documentation with sphinx-build
5 # Python needs to find simgrid on my machine, but not ctest -- sorry for the hack
6 if [ -e /opt/simgrid ] ; then chmod +x /opt/simgrid; fi
10 if [ "x$1" != 'xdoxy' -a -e build/xml ] ; then
11 echo "Doxygen not rerun: 'doxy' was not provided as an argument"
13 rm -rf build/xml source/api/
14 cd source; doxygen; cd ..
17 if [ "x$1" != 'xjava' -a -e source/java ] ; then
18 echo "javasphinx not rerun: 'java' was not provided as an argument"
21 javasphinx-apidoc --force -o source/java/ ../src/bindings/java/org/simgrid/msg
22 rm -f source/java/packages.rst # api_generated/source_java_packages.rst
23 rm -f source/java/org/simgrid/msg/package-index.rst # api_generated/source_java_org_simgrid_msg_package-index.rst
24 for f in source/java/org/simgrid/msg/* ; do
25 # Add the package name to the page titles
26 (echo -n "class org.simgrid.msg."; cat $f )>tmp
28 sed -i 's/==/========================/' $f # That's the right length knowing that I add 'class org.simgrid.msg.'
30 # sed -i 's/^.. java:type:: public class /.. java:type:: public class org.simgrid.msg/' source/java/org/simgrid/msg/*
31 echo "javasphinx relaunched"
34 PYTHONPATH=../lib sphinx-build -M html source build ${SPHINXOPTS}
38 perl -pe 's/(xlink:href="(?:http|.*\.html))/target="_top" $1/' \
39 source/img/graphical-toc.svg > build/html/graphical-toc.svg
42 echo "Undocumented examples:"
43 for ex in $( (cd .. ; \
44 find examples/s4u/ -name '*.cpp'; \
45 find examples/python -name '*.py'; \
48 if grep -q "example-tab:: $ex" ../examples/README.rst ; then :
49 # echo "found example-tab:: $ex"
50 elif grep -q "showfile:: $ex" ../examples/README.rst ; then :
57 if [ -e /usr/bin/linkchecker ] ; then
58 linkchecker --no-status -o csv --ignore-url='.*\.css$' --ignore-url=build/html/_modules --ignore-url=public/java/org build/html \
60 | grep -v 'urlname;parentname;baseref;result;warningstring'
63 echo "Install linkchecker to have it executed when you build the doc."