Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
another thing that SMPI cannot do yet
[simgrid.git] / docs / Build.sh
1 #! /bin/sh
2 #
3 # Simplistic script to rebuild our documentation with sphinx-build
4
5 set -e
6
7 if [ "x$1" != 'xdoxy' -a -e build/xml ] ; then
8   echo "Doxygen not rerun: 'doxy' was not provided as an argument"
9 else
10   rm -rf build/xml source/api/
11   cd source; doxygen; cd ..
12 fi
13
14 if [ "x$1" != 'xjava' -a -e source/java ] ; then
15   echo "javasphinx not rerun: 'java' was not provided as an argument"
16 else
17   rm -rf source/java
18   javasphinx-apidoc --force -o source/java/ ../src/bindings/java/org/simgrid/msg
19   rm -f source/java/packages.rst # api_generated/source_java_packages.rst
20   rm -f source/java/org/simgrid/msg/package-index.rst # api_generated/source_java_org_simgrid_msg_package-index.rst
21   for f in source/java/org/simgrid/msg/* ; do
22     # Add the package name to the page titles
23     (echo -n "class org.simgrid.msg."; cat $f )>tmp
24     mv tmp $f
25     sed -i 's/==/========================/' $f # That's the right length knowing that I add 'class org.simgrid.msg.'
26   done
27 #  sed -i 's/^.. java:type:: public class /.. java:type:: public class org.simgrid.msg/' source/java/org/simgrid/msg/*
28   echo "javasphinx relaunched"
29 fi
30
31 sphinx-build -M html source build ${SPHINXOPTS}
32
33 set +x
34
35 cat source/img/graphical-toc.svg \
36  | perl -pe 's/(xlink:href="http)/target="_top" $1/' \
37  | perl -pe 's/(xlink:href=".*?.html)/target="_top" $1/' \
38  > build/html/graphical-toc.svg
39
40 echo "List of missing references:"
41 for f in `(grep '<name>' build/xml/msg_8h.xml; \
42            grep '<name>' build/xml/namespacesimgrid_1_1s4u.xml; \
43            grep '<innerclass refid=' build/xml/namespacesimgrid_1_1s4u.xml ; \
44           ) |sed 's/<[^>]*>//g'|sort` 
45 do
46
47   if grep $f source/*rst | grep -q '.. doxygen[^::]*:: '"$f"'$' ||
48      grep $f source/*rst | grep -q '.. doxygen[^::]*:: simgrid::[^:]*::[^:]*::'"$f"'$'  ; then :   
49 #    echo "$f documented"
50   else 
51     if grep -q $f ignored_symbols ; then : 
52 #      echo "$f ignored" # not documented
53     else
54       echo "$f"
55     fi
56   fi
57 done