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
41 echo "List of missing references:"
42 for f in $( (grep '<name>' build/xml/msg_8h.xml; \
43 grep '<name>' build/xml/namespacesimgrid_1_1s4u.xml; \
44 grep '<innerclass refid=' build/xml/namespacesimgrid_1_1s4u.xml ; \
45 ) | sed 's/<[^>]*>//g' | sort )
48 if grep $f source/*rst | grep -q '.. doxygen[^::]*:: '"$f"'$' ||
49 grep $f source/*rst | grep -q '.. doxygen[^::]*:: simgrid::[^:]*::[^:]*::'"$f"'$' ; then :
50 # echo "$f documented"
52 if grep -q $f ignored_symbols ; then :
53 # echo "$f ignored" # not documented
60 if [ -e /opt/simgrid ] ; then chmod -x /opt/simgrid; fi
63 if [ -e /usr/bin/linkchecker ] ; then
64 linkchecker --no-status -o csv --ignore-url='.*\.css$' --ignore-url=public/java/org build/html \
66 | grep -v 'urlname;parentname;baseref;result;warningstring'
69 echo "Install linkchecker to have it executed when you build the doc."