Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove Java bindings. They are not updated since maybe 10 years
[simgrid.git] / docs / Build.sh
1 #! /bin/bash
2 #
3 # Copyright (c) 2018-2023. The SimGrid Team. All rights reserved.
4
5 # This program is free software; you can redistribute it and/or modify it
6 # under the terms of the license (GNU LGPL) which comes with this package.
7
8 # Simplistic script to rebuild our documentation with sphinx-build
9
10 # If you are missing some dependencies, try: pip3 install --requirement docs/requirements.txt
11
12 # Python needs to find simgrid on my machine, but not ctest -- sorry for the hack
13 if [ -e /opt/simgrid ] ; then chmod +x /opt/simgrid; fi
14
15 set -e
16 set -o pipefail
17
18 if [ "x$1" != 'xdoxy' ] && [ -e build/xml ] ; then
19   echo "Doxygen not rerun: 'doxy' was not provided as an argument"
20 else
21   set -x
22   rm -rf build/xml source/api/
23   (cd source; doxygen 2>&1; cd ..) | (grep -v "is not documented." || true) # XXXXX Reduce the verbosity for now
24   set +x
25 fi
26
27 if [ "x$1" != 'xlogs' ] && [ -e build/log_categories.rst ] ; then
28   echo "Log categories not extracted: 'logs' was not provided as an argument"
29 else
30   set -x
31   perl ./bin/extract_logs_hierarchy.pl ../ > build/log_categories.rst
32   set +x
33 fi
34
35 set +x
36
37 perl -pe 's/(xlink:href="(?:http|.*\.html))/target="_top" $1/' \
38      source/img/graphical-toc.svg > build/html/graphical-toc.svg
39
40 echo
41 echo "Undocumented examples:"
42 for ex in $( (cd .. ; \
43               find examples/cpp/   -name '*.cpp'; \
44               find examples/c/     -name '*.c'; \
45               find examples/python -name '*.py'; \
46              ) | sort )
47 do
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 :
51     else
52         echo $ex
53     fi
54 done
55
56 set +e # Don't fail
57 if [ -e /usr/bin/linkchecker ] ; then
58     linkchecker --no-status -o csv --ignore-url='.*\.css$' --ignore-url=build/html/_modules build/html \
59      | grep -v '^#' \
60      | grep -v 'urlname;parentname;baseref;result;warningstring'
61   echo "done."
62 else
63   echo "Install linkchecker to have it executed when you build the doc."
64 fi
65